LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   save as root (https://www.linuxquestions.org/questions/linux-newbie-8/save-as-root-167198/)

johntramp 04-07-2004 03:14 AM

save as root
 
hey, im using slackware 9.1 with kde. im setting up samba atm, and cant find a way to save a file from my desktop as if i was su'd. is there any way to do this or do i need to login as root first? also when i open a konsole window and su i can't use programs such as kedit. is this normal?

thanks -john

scott_R 04-07-2004 03:31 AM

For simplicities sake (I'm tired), you can open a console, locate kedit, then su to root. This is assuming you've got permission as your user to su as root (in some distros you have to be part of the 'wheel' group, or enable permission in kde/gnome). Then, type the full path to kedit (ie., /usr/bin/kedit or similar). The reason is probably that your distro disables paths for your root user (for security reasons), so you can't use a lot of user based programs as root (which you generally don't want to do anyway).

Adding the ampersand after the program will free up your console:

$ su
# /usr/bin/kedit &

another way to do this is to use the '-c' switch with su, which just runs a single program with root permissions.

Hope this helps.

johntramp 04-07-2004 04:10 AM

thanks for your help scott, i did a
#find / -iname "kedit"
and it came back with /opt/kde/bin/kedit

so i ran that as root and it said to check that "dcopserver" programme is running. but then kedit still runs just with errors everywhere. what is dcopserver? how do i run it??

johntramp 04-07-2004 04:16 AM

also i am not too sure what you mean with the -c switch...
$ su -c
Password:***
/bin/bash: -c: option requires an argument

or

$ su -c kedit
Password:****
/bin/bash: -c: option requires an argument


All times are GMT -5. The time now is 01:04 PM.