View previous topic :: View next topic |
Author |
Message |
cn73 Tux's lil' helper

Joined: 20 Nov 2003 Posts: 120 Location: Italy
|
Posted: Thu Nov 27, 2003 12:56 pm Post subject: KDE and "su" problem |
|
|
If I "su" to root from a shell, I can't access to some kde programs, like kwrite, Konqueror... . If I login directly whit root, I can! |
|
Back to top |
|
 |
dsd Developer

Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
 |
cn73 Tux's lil' helper

Joined: 20 Nov 2003 Posts: 120 Location: Italy
|
Posted: Thu Nov 27, 2003 1:23 pm Post subject: |
|
|
dsd wrote: | as normal user, under KDE:
| Why I have not the same problem with a Mandrake Installation??? |
|
Back to top |
|
 |
dsd Developer

Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Thu Nov 27, 2003 1:34 pm Post subject: |
|
|
i expect its a KDE configuration issue. try looking for some security options under the kde control centre. IIRC, mandrake defaults to some low-security settings like that. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
 |
cn73 Tux's lil' helper

Joined: 20 Nov 2003 Posts: 120 Location: Italy
|
Posted: Thu Nov 27, 2003 2:58 pm Post subject: |
|
|
My problem is that su root doesn't have the right PATH as root!
>kwrite
command not found! |
|
Back to top |
|
 |
Cossins Veteran


Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Thu Nov 27, 2003 3:30 pm Post subject: |
|
|
That might indicate that /usr/kde/3.1/bin isn't in root's $PATH...
You might add it to the ROOTPATH variable in /etc/profile.env and run env-update.
- Simon |
|
Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722
|
Posted: Thu Nov 27, 2003 4:58 pm Post subject: |
|
|
Instead of plain or use:
or
Note the space between the dash and root, it's important. The dash ensures that the shell started by su is a login shell which in turn processes the proper initialization files and adds everything to $PATH.
Also it can't hurt to run
if you started X as a normal user and then su to root and try to start programs that use the X server to display graphics (kwrite for example). If you don't you may (depending on your configuration) get an error message along the lines of
Code: |
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
kwrite: cannot connect to X server :0
|
|
|
Back to top |
|
 |
cn73 Tux's lil' helper

Joined: 20 Nov 2003 Posts: 120 Location: Italy
|
Posted: Thu Nov 27, 2003 6:28 pm Post subject: |
|
|
Ok...solved!|
my problem was a misconfiguration of .bashrc of root... adding a line
source /etc/profile
my enviroment variable and permissions are correct! |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 20630
|
|
Back to top |
|
 |
|