PDA

View Full Version : [SOLVED] Running apps as user gdm



towheedm
February 26th, 2011, 09:58 PM
In Karmic, I could run an app as user gdm by issuing the following command (assume the app is gconf-editor)


gksudo -u gdm dbus-launch gconf-editorNow that I've switched to Marverick when I issu the same command I get this:


towheed@GA1A4CH:~$ gksudo -u gdm dbus-launch gconf-editor
No protocol specifiedNo protocol specified

** (gconf-editor:19812): CRITICAL **: Failed to parse arguments: Cannot open display:I checked my environment variable DISPLAY using:


towheed@GA1A4CH:~$ echo $DISPLAYand it returned:


:0.0Now I ran the command:


gksudo -u gdm dbus-launch gconf-editor --display=:0.0and got the same error as before.

Has either or both dbus-launch or gksudo changed their behavior os is this a bug. Note that the command does not work with any applications being run as the user gdm.

Can anyone help me?

Krytarik
February 27th, 2011, 12:58 AM
Seems to have change from Maverick onwards, try this:
http://ubuntuforums.org/showthread.php?p=10418202

towheedm
February 27th, 2011, 01:31 AM
Yep, that worked. What I did wrong was to add the localhost to the xhost instead of the localuser.

Thanks.