View Single Post
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#31
I tried this with leafpad since I already added emelfm to sudoers.
[Desktop Entry]
Encoding=UTF-8
Name=Leafpad
Exec=root_leafpad.sh
Icon=leafpad
Terminal=false
Type=Application
MimeType=text/plain
Categories=GTK;Utility;TextEditor;
Nothing happens, I tried with "Terminal=true" too out of noobness but still no go.
I can click the icon, wait, click again... nothig.

cat > /usr/bin/root_leafpad.sh << EOF
#!/bin/sh
echo leafpad | root
EOF
chmod 755 /usr/bin/root_leafpad.sh
cat > /usr/bin/root_leafpad.sh << EOF
#!/bin/sh
echo emelfm2 | sudo gainroot
EOF
chmod 755 /usr/bin/root_leafpad.sh
__________________