![]() Registered Member ![]()
|
hello there,
i could need some advice on the following problem: sometimes, i want to start some kde program as a different user than the one currently logged in. for example, my fried who also uses the same computer wants to quickly check mail in kontact etc. i'm not quite sure what the best way of doing this is. since just logging in via "su newuser" and then running the command fails, i usually do a "xhost +" before that. this way it is possible for the other user to launch gui programs, but there are dbus-problems. for example, "konqueror&" returns errors like ... kdeinit4: preparing to launch /usr/bin/kded4 kdeinit4: Communication error with launcher. Exiting! konqueror(8491): couldn't create slave: "Cannot talk to klauncher: Not connected to D-Bus server" kded(8500): KUniqueApplication: Cannot find the D-Bus session server kded(8499): KUniqueApplication: Pipe closed unexpectedly. ... in the end, the program starts but is not working (for example konqueror cannot open any urls). i know i can get rid of this problem if i run eval `dbus-launch` && konqueror & instead of the plain konqueror&. this way it all works fine, but it is not a very convenient solution. does anybody know how i could configure my system in such a way that the dbus-launch becomes unnecessary? or is there a completely different way of doing what i described? best, zsaja
Last edited by zsaja on Wed Apr 08, 2009 7:07 am, edited 1 time in total.
|
![]() KDE Developer ![]()
|
You could try to modify your system setup such that login shells, e.g. new user sessions, always have their D-Bus session bus started automatically.
Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
sounds good - how would i do that? (kubuntu 8.10, if that matters) zsaja |
![]() KDE Developer ![]()
|
Sorry, no idea. Probably ask on the Ubuntu forum. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Try using:
su - newuser Notice the extra - after su. |
![]() Registered Member ![]()
|
hm, when i tries this and run something like "konqueror &" afterwards, i get "konqueror: cannot connect to X server", although i issued an "xhost +" before. zsaja |
![]() Registered Member ![]()
|
Works here... no idea what's happening at your end, maybe try it without the xhost + ?
|
![]() Administrator ![]()
|
This is because all variables referring to your users X session have been cleared by su.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
it behaves in a strange way here: when i run a "su - username" without the preceding "xhost+", i get for "dolphin&" (6635)/: KUniqueApplication: Cannot find the D-Bus session server (6634)/: KUniqueApplication: Pipe closed unexpectedly. but for "konqueror&" i get "konqueror: cannot connect to X server". in both cases, the programs do not start. :'( what is the extra dash in the su command supposed to do? maybe i have to add the respective users to certain groups? zsaja
Last edited by zsaja on Thu Apr 09, 2009 6:34 am, edited 1 time in total.
|
![]() Registered Member ![]()
|
The extra dash causes the shell to pick up the correct environment variables for the new userid, rather than inheriting those from the original one. The reason it now can't connect to the X server is that it doesn't know its address. What you need to do after the "su" is
|
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]