View Single Post
Guest | Posts: n/a | Thanked: 0 times | Joined on
#1
Just an idea.
I was bored to type "sudo gainroot" every time I opened the xterm. So I made a shortcut on the desktop, which links to a xterm, which is already "gainrooted", that means: the "sudo gainroot" command has already been typed.
I've found the idea here, a thread about desktop command-shortcuts.
My code is:
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=true
Name=su-xterm
Exec=/usr/bin/osso-xterm 'sudo gainroot'
Icon=
X-Osso-Type=application/x-executable
just put it into a file called NAMEOFTHEFILE.desktop in /usr/share/applications/hildon/.

This add an application in the menu called su-xterm. You can make a shortcut to this application on the desktop. After running it, verify if you are root by typing:
Code:
whoami
If you want a nice shortcut's icon, check this post.

I suggest to delete the shortcut to the normal xterm (if you have one), so you can't choose the wrong one. Remember: if you open a new terminal by tapping the upper bar in an opened xterm and then "new" button, you will be USER, not root. Just type "sudo gainroot" again and have fun!

(Obviously you need the rootsh package. )

Note: I'm not an expert and this is just a simple idea. Please comment!
 

The Following 3 Users Say Thank You to For This Useful Post: