Ubuntu: Make System-wide Changes and Edits Graphically CodeUnit 30 JUL 2009

Ubuntu LogoIf you are new to Linux then chances are high that the damn terminal and sudo command combination are not yet second nature to you, and as such you would much rather prefer a more graphical way of editing and moving files outside of your home folder instead of having to do everything via possibly complicated command line entries.

If so, try this: bring up a new terminal and enter gksudo nautilus

“So what?” I hear you ask, “all that happened is a new ‘explorer’ window popped up on the screen. What’s different from opening it the normal way from the system menu bar?”

Well, basically what has happened is that the command you entered allows you to open a temporary window within your user account to operate as Root, in other words giving you full system powers in whatever type of window you just launched. When you close the Root window, you lose these rights and automatically revert back to a normal system user. So essentially it saves you the hassle of logging out, logging in, logging out and then logging back in again – you can now be both Root and user simultaneously!

So how does this work? Let’s say you want to edit the /etc/apt/sources.list file. If you want to do it command-line style, you’d sudo gedit /etc/apt/sources.list and then use gedit to edit it. If you do it the graphical way we’ve been talking about, you’d run the gksudo nautilus command and a file browser window will pop up (with Root/administrator privileges just in that window). You’d browse to /etc/apt and find the file called sources.list. You’d click to open it, edit it, close it, and close the browser window, and it would be done. (If you tried it without doing the first step then you’ll quickly find out that gedit will refuse to save the file for you!)

And that’s it. A simple way of providing a more graphical interface to the more inexperienced user that needs to do more with his system than what he currently has rights to do.

Anyway, just a final disclaimer, this unbridled power is pretty dangerous and as such, always make backup copies of any configuration files you modify before modifying them. Better safe than sorry!

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.