View previous topic :: View next topic |
Author |
Message |
simonb n00b
Joined: 27 May 2002 Posts: 21
|
Posted: Sun Jun 09, 2002 9:58 am Post subject: If I re-install, will kdesu start working? |
|
|
Hi,
I posted earlier that I can't get kdesu to work. I tried the things kindly suggested to get it working but nothing has worked.
I really *have* to fix this and I am prepared to re-install Gentoo to make it happen. I want to know how anyone else created a "normal" user after installing as root. I used the KDE user manager and added the user to the "wheel" group.
Has anyone had sucess creating a user some other way or should the method I used have worked?
If I can't get it to work this time then I will have to ditch Gentoo which will be a real shame because I have really learnt a lot from this distro.
Simon. _________________ We're spamming. -- Bob Marley |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Sun Jun 09, 2002 10:46 am Post subject: |
|
|
What errors do you get ? Start kdesu <command> from a terminal and post errors here.
After you've added the user do the wheel group, have you logged out and login again ?
A link to the previous thread would be helpful. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
simonb n00b
Joined: 27 May 2002 Posts: 21
|
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Sun Jun 09, 2002 8:56 pm Post subject: |
|
|
Hmm, so many problems, so little time Let's try one by one:
Quote: | The KDE apps are no longer in the search path, I have to type the full /usr/kde/3/bin/konsole. |
When you su do:
The - flag tells su to login as the user not just switching to it, thus setting env vars as appropriate.
Another method is to run:
Code: | source /etc/profile |
To set env vars. This will take care of the PATH problem.
Quote: | If I su to root in a console I can't start any X app. I get
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
konsole: cannot connect to X server :0.0 |
This is because the user who started the X session owns it, and by default no one can attach to it. If you su in console you need to let the system know which is the authority on this session.
try this:
Code: | su -
export XAUTHORITY=/home/<user_who_owns_xsession>/.Xauthority
konqueror |
after setting the authority straight you can run any program you like as the new user.
As for kdesu not working, maybe it's picking up the wrong path. Do you have both kde2 and kde3 installed ?
Also check the permissions on ~/.Xauthority and check the ~/.kde/socket-<machine name> and ~/.kde/tmp-<machine name> are symbolic links to /tmp/socket-<user name> and to /tmp/kde-<user name> and owned by yourself.
That was long Tell me how it goes. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
simonb n00b
Joined: 27 May 2002 Posts: 21
|
Posted: Mon Jun 10, 2002 6:01 pm Post subject: |
|
|
mksoft wrote: | Hmm, so many problems, so little time Let's try one by one:
Quote: | The KDE apps are no longer in the search path, I have to type the full /usr/kde/3/bin/konsole. |
When you su do:
The - flag tells su to login as the user not just switching to it, thus setting env vars as appropriate. |
OK, that brings the error messages down to...
konqueror: cannot connect to X server
At least now it is still in the search path and I don't get the other error messages.
Quote: |
try this:
Code: | su -
export XAUTHORITY=/home/<user_who_owns_xsession>/.Xauthority
konqueror |
|
Makes no difference regardless of whether I set XAUTHORITY as /root/.Xauthority or /home/<me>/.Xauthority.
Quote: | As for kdesu not working, maybe it's picking up the wrong path. Do you have both kde2 and kde3 installed ? |
No, I only installed KDE3.
Quote: | Also check the permissions on ~/.Xauthority and check the ~/.kde/socket-<machine name> and ~/.kde/tmp-<machine name> are symbolic links to /tmp/socket-<user name> and to /tmp/kde-<user name> and owned by yourself. |
.Xauthority is a file in /root and the /home/<me> directories owned by root and <me> respectively. The permissions are set to 600. Changing them to 777 doesn't help either. The links exist as you suggest. I am able to start KDE as root no problem and everything works. The problem is that when I am logged in as a user root can't start any KDE program such as konqueror.
Regards,
SimonB. _________________ We're spamming. -- Bob Marley |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Mon Jun 10, 2002 9:06 pm Post subject: |
|
|
Sorry, forgot one more step DISPLAY is not set. So here we go again with DISPLAY added:
Code: | su -
export XAUTHORITY=/home/<user_who_owns_xsession>/.Xauthority
export DISPLAY=:0.0
konqueror |
This should work. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
simonb n00b
Joined: 27 May 2002 Posts: 21
|
Posted: Tue Jun 11, 2002 4:30 am Post subject: |
|
|
mksoft wrote: | Sorry, forgot one more step DISPLAY is not set. So here we go again with DISPLAY added:
Code: | su -
export XAUTHORITY=/home/<user_who_owns_xsession>/.Xauthority
export DISPLAY=:0.0
konqueror |
This should work. |
Yoooohhhh00oo!!
I now have a root session of Konqueror. Thank you.
Although I don't have kdesu working, at least I have a workaround now.
Any further ideas on kdesu? Otherwise I can just replace kdesu with a script that does the above exports etc.
Regards,
Simon B. _________________ We're spamming. -- Bob Marley |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Tue Jun 11, 2002 7:34 am Post subject: |
|
|
simonb wrote: | Yoooohhhh00oo!!
I now have a root session of Konqueror. Thank you.
|
You're welcome just be carefull, it is easy to mess up things when using gui file managers as root
simonb wrote: |
Any further ideas on kdesu? Otherwise I can just replace kdesu with a script that does the above exports etc. |
Let me think about it for a while. For me X ICE stuff is black voodoo hope I can come up with something. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Fri Jun 21, 2002 11:40 am Post subject: |
|
|
Please do not cross post.
Locking this thread in favor of this one
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
|