Monday, July 19, 2010

Opening files as root in ubuntu via drag and drop


By default in Ubuntu, secure files are opened in read only mode. To get read and write access to this files we need to get the root privileges. In normal case what we will do is that, we go to terminal enter into root user by sudo command, then open the required file. This lengthy procedure can be avoided by using the launcher. For this create a launcher.


To create the launcher right click on the Desktop and select "Create Launcher"


Now in the command add the command given below

gksudo "gnome-open %u"

When you drag and drop any file on this launcher (it's useful to put it on the desktop or on a panel), it will be opened as root with its own associated application. This is helpful especially when you're editing config files owned by root, since they will be opened as read only by default with gedit, etc.

1 comments:

Anonymous said...

Nice Idea

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes