Running X applications from the Konsole (under KDE)
I often install new programs, and although I'm on KDE/gnome, when i try to launch them from the Konsole, I'll get the following error:
/home/ganninu# <some X-Application>
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Gtk-WARNING **: cannot open display: :0.0
Of course, when I launch the program from the K-Menu, it launches correctly. But it's a bit daunty of having to "find" the program atthe K-Menu... Is there a quick way to still launch the application from the Konsole directly (Konsole = Terminal of KDE, not the text only mode Linux).
Run the command
and if you get an empty string back, run
if you are exporting to a specific IP-address..
After doing that, you might have to run
xhost + (to allow all IP-addresses) or
to allow certain IP-addresses to "connect" to your screen; i.e.
if it is your own computer..
Hope it helps!
PS. do not write any of the < or > around IP-addresses..
if i understand correctly, u just dont want to search for the program in the K menu.
Just press Alt+F2 and type the name of the application u want to run.
eg: evolution, kppp
Works perfectly :D
i have had already tried that as well :)) Doesn't work for my case because it requiers to be root, but unfortunately the program doesn't ask me for my root password, so i need to log in as root.
As regards to TheSpork's suggestion, I still get that error...
The bad thing is that if an application requires root privileges, alt-F2 still doesn't help... i need to log off and then login as root to run the application... This is my current situation on Debian.. On redhat i used to be prompted by the root password... do i need to pass some arguments to the executable??
i did not know such was the case with debian. I use RedHat and i thought that all distros would prompt for a root passwd.
su -c command
That will prompt you for the root-password, execute the given command, and then go back to the users shell..
I tested it with Debian Sarge (testing) using the console in Blackbox.. I guess it would work for executing graphical tools too, but I haven't tested it...
Let me know if that doesn't work..
nope it doesn't work. and i discovered why - strangely, the X-session is owned by root, so i need to be logged in as root to make it work - logging in as a normal user and then su, won't work neither. I had to merge the .Xauthority file to make it work. Mind you, everytime i restart the x-xerver i have to merge this file.
KDE launches root privilege X-apps using kdesu (c.f. the menu items for YaST).
kdesu --nonewdcop -- /sbin/yast2
which is what prompts you for the root password.
The thing is that by default, other users cannot attach to your X-server (even root).
if you are root and want to run an x-app as another user in KDE use the -u switch
kdesu -u oliver xterm
(-u not -l like su)
use -c to execute a single command
Obviously it does not prompt for the oliver's password if you are root.
thanks a bunch! that really rocks... 'kdesu xterm' is just enough - it prompts me for the root password if the application needs root privileges.
|All times are GMT -5. The time now is 12:12 PM.|