You are not logged in.
Pages: 1
Offline
sudo kwriteLast edited by roygbiv (2011-05-26 20:25:08)
Offline
$ su -
Password: <your root password>
$ kwrite /your/conf/fileor
$ kdesu kwrite /your/conf/fileor
Alt+F2 then kdesu kwrite, then open the desired file.
If you have sudo installed,
$ sudo kwrite /your/conf/fileLast edited by hermes (2011-05-26 20:30:52)
Linux Registered User #362737
Offline
ahh, i like this one
alt+f2
$ kdesu kwrite /your/conf/file
BUT, i was hoping to navigate using the mouse. is there any way around this? i want to click the file with the mouse, so i dont have to type in the directories, its exactly what i am trying to avoid when on the dektop, so i want kwrite to prompt me for a root password, when file is clicked on by the mouse. how would i configure it to do this?
doesnt that make the most sense for a desktop environ?
Offline
Dont start graphical programs with sudo, it can mess around with the permissions in your home directory, even preventing you from login... (http://unix.stackexchange.com/questions … /3071#3071)
If you have to edit systemfiles with kwrite, start it with
kdesu kwriteFor convenience, you may create an kmenu entry that starts kwrite as root, prompting you for root password.
It's a bug planet!
Offline
ahh, i like this one
alt+f2
$ kdesu kwrite /your/conf/fileBUT, i was hoping to navigate using the mouse. is there any way around this? i want to click the file with the mouse, so i dont have to type in the directories, its exactly what i am trying to avoid when on the dektop, so i want kwrite to prompt me for a root password, when file is clicked on by the mouse. how would i configure it to do this?
doesnt that make the most sense for a desktop environ?
Not tested, but should work. Do it at your own risk!
I wouldn't do it, anyway... I'd prefer to type root password once in a while than render the system prone to vulnerabilities.
First of all you should create a .kde4/share/config/kdesurc file with the following content:
[super-user-command]
super-user-command=sudoThe above assumes you've got sudo installed and correctly configured. You should also let sudo execute kwrite without prompting for your password. Add the following to /etc/sudoers.d/10-cmnd_alias:
Cmnd_Alias EDITORS=/usr/bin/kwriteYou can add other editors separating them with commas. Then add the following to /etc/sudoers.d/20-editors:
<your username> ALL=(ALL) NOPASSWD: EDITORSReplace <your username> with your username; you can allow an entire group to execute EDITORS with NOPASSWD instead, prepending a % to the group name.
EDIT: chmod 440 10-cmnd_alias and 20-editors.
Finally create, as karoshi said (btw, thanks for the link!), a kmenu entry with 'kdesu kwrite'.
As I previously stated, I don't like this approach, because admin tasks should be done with all the precautions, and you'll agree they're not so frequent, unless you're a sysadmin or you've just installed arch, but you asked it, and this is my solution.
Last edited by hermes (2011-05-27 17:58:09)
Linux Registered User #362737
Offline
ok, that sounds good, thank you for the links and the detailed steps!
one thing, i do want it to prompt me for a password when it doesnt have access to a file, or when it knows the group is root.
i would like to create a kmenu entry with 'kdesu kwrite', i guess thats probably what i was looking for, a menu that i can click with the mouse when on the DE, that will allow me to edit conf's. thsi way the only thing i will have to type in is the password, then i can navigate the file with the mouse, and made edits, and then ctrl+s, and x out with the mouse.
how would i create that menu, i googled it, and brushed on the link included and dont see a reference as to how to do it.
unless you're a sysadmin
well, i use it for an apache "testing" server for local php/mysql development, and currently have xampp, and might upgrade to sraight apache/php/mysql/pear/phpmyadmin etc.. and i have ALOT of configuring to do. Also, knowing myself, i am probably NEVER going to leave the system alone, lol.
Last edited by wolfdogg (2011-05-27 21:10:03)
Offline
[...] so i want kwrite to prompt me for a root password [...]
Don't know why, but I read it "i want kwrite NOT to prompt me for a root password"... You can then ignore those detailed steps!
Anyway, to create a kmenu entry, just run kmenuedit, it's quite straightforward.
Linux Registered User #362737
Offline
lol. ok thanks. i thought your suggestion was on to something, i just couldnt exactly figure how i was going to approach it :-) well, thanks for the effort. i wasnt sure what i wanted either. i looked up kmenuedit, and found this documentation http://docs.kde.org/stable/en/kdebase-w … index.html unless somebody knows of something better, then i will go through it there.
Offline
You could try Root Actions Servicemenu. It's in the AUR or install for your user through KGHNS. I find it very convenient.
Offline
Pages: 1