FlyingPenguins Posted June 18, 2008 Report Share Posted June 18, 2008 Occasionally, in Mandriva 2008 I need to log in as root graphically from my current account that has lower permissions. Sometimes I need to do tasks that I can't do on my normal account, such as removing entries from the GRUB config file if Mandriva decides to add extra entries onto it for some reason, or placing/removing files from protected directories. Yes, I understand the risks with doing things under root, but some things I find would be much easier doing graphically rather than in a console with su. Quote Link to comment Share on other sites More sharing options...
liquidzoo Posted June 18, 2008 Report Share Posted June 18, 2008 (edited) There is a menu option, and forgive me because I've forgotten where it is but I know it's inside one of those 'more applications' links, that will allow you to open a file browser as root which will allow you to edit those files through a gui editor if you choose. Another option, and I know you said you didn't like the command line, would be to open a terminal (or the run command option) and type: su -c 'kwrite /path/to/file' with the quotes and that will open up that file, in kwrite, as root after prompting you for the root password. Edited June 18, 2008 by liquidzoo Quote Link to comment Share on other sites More sharing options...
Greg2 Posted June 18, 2008 Report Share Posted June 18, 2008 You can also use kdesu kwrite to edit files. Alternatively, you could install the 'openasroot-kmenu' package. Then you can right-click on a file > actions > edit as root. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 18, 2008 Report Share Posted June 18, 2008 You don't need to login as root. Just use gksu in Gnome or kdesu in KDE to get the root privileges as and when you need it. For example, to edit grub config. Press ALT-F2 gksu gedit /boot/grub/menu.lst supply root password, then do what you want with the file. Or, for KDE: Press ALT-F2 kdesu kwrite /boot/grub/menu.lst will solve all your problems. The gksu/kdesu is the same as the console su command but graphically being ran. Then you just give it the command you want to run, for example gedit/kwrite to open a notepad equivalent for editing files, and then the last part the actual file to edit. Alternatively, forget the filename, and then just open it later once gedit/kwrite is running. EDIT: greg2 beat me to it lol. Quote Link to comment Share on other sites More sharing options...
FlyingPenguins Posted June 18, 2008 Author Report Share Posted June 18, 2008 Thanks for your quick replies, everyone. I was able to finish I needed to get done. The openasroot-kmenu thing works great as well. However, I found that the gksu command doesn't work. Another question, does kdesu only work with kwrite? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 18, 2008 Report Share Posted June 18, 2008 kdesu is a KDE command, whereas gksu is a gnome command. If you don't have Gnome installed and running, then it won't work for you. Therefore, kdesu is to be used with KDE, and then whatever application that follows it, kwrite, kate, konqueror, firefox, etc, etc. Quote Link to comment Share on other sites More sharing options...
Greg2 Posted June 18, 2008 Report Share Posted June 18, 2008 If you're using the KDE desktop, you would need to install gksu, but you really don't need it. You can use kdesu on most kde apps, to run them as root, but be careful. It's better for you now, until you become more familiar with Linux to use the openasroot tool (IMO). Edit: Ian beat me to it that time. Quote Link to comment Share on other sites More sharing options...
FlyingPenguins Posted June 19, 2008 Author Report Share Posted June 19, 2008 Thanks for explaining it guys. The developers really need to think of less ambiguous names. :lol: Quote Link to comment Share on other sites More sharing options...
arctic Posted June 19, 2008 Report Share Posted June 19, 2008 My approach is almost as easy as the above mentioned ones. First I install nano. Way easier to use and more intuitive editor than vi imho. Then I open a terminal window, log in as root on the command line and launch nano /boot/grub/menu.lst then edit the entries, save and exit. That's it. It is not more complicated than logging into a gui as root and it is more secure. Just give nano a try, I do believe that you will like it. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 19, 2008 Report Share Posted June 19, 2008 I use nano also, but then i tend to do most things from the command line. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted June 19, 2008 Report Share Posted June 19, 2008 The most flexible solution is using sudo, but this requires proper editing of the /etc/sudoers configuration file beforehand (via the visudo command), and some people are rather unfamiliar with the vi text editor. Quote Link to comment Share on other sites More sharing options...
willie Posted June 19, 2008 Report Share Posted June 19, 2008 If you wan't to work graphical (just like me) use "openasroot" as sayd before, there is no need to log in as "root". Besides it's by standard disabled in Mandriva Quote Link to comment Share on other sites More sharing options...
ffi Posted June 19, 2008 Report Share Posted June 19, 2008 (edited) linux needs an elevate rights button popping up in case an application needs more rights to do what you tell it to, maybe using policykit.... my new laptop uses face recognition to login, actually it's an addon made by asus, together with policykit it could make administritive rights very secure and yet unobtrusive (confirm identity and click yes to confirm administrative request).... Edited June 19, 2008 by ffi Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted June 20, 2008 Report Share Posted June 20, 2008 Linux does do this for some applications. If you try to change the clock time/date, for example, it will ask you for root password. It doesn't do it for all apps, since some can be run as normal user as well as root user just some functionality is disabled if you run it standard. Quote Link to comment Share on other sites More sharing options...
tyme Posted July 11, 2008 Report Share Posted July 11, 2008 linux needs an elevate rights button popping up in case an application needs more rights to do what you tell it to, maybe using policykit....Talk to the developers of the application in question. The ability is there, but it's up to the developers of the application to implement it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.