Unable to run a GUI app as root using su?
I am using KDE and I always log in as a user. However, there are times when I must run my editor Quanta as root (so that I can directly save files in the /var/www folder rather than go through the trouble of saving them in /home/hari and then copying them to /var/www
For this I always used to run su from a terminal window and then run the application. After quite a while now, I again tried to run Quanta as root. Code:
su Code:
Xlib: connection to ":0.0" refused by server This may have something to do with upgrading su and the config file. If anybody knows how to fix this, I would be grateful for an answer. |
hi there,
something called "xhost +" ... you need to be allowed to export the display... before su do the following Code:
xhost + Code:
export DISPLAY=$HOST:0.0 slackie1000 |
Thanks slackie1000. This works.
Are these options volatile? Will it work after a reboot or must I execute them again? |
hi there,
nope.. you need to execute again.. but i think, somewhere , somehow, you can make it standard. .. but this is out of my knowledge. sorry. regards slackie1000 |
The big mystery is that it worked earlier without this. It is only recently that it has given me that error.
So it must be a config file issue. Anybody? |
You can always press Alt-F2 to bring up the "run application" pop-up prompt. Fill-in quanta and check the option to run as a different user (root). You can also check the option to remember the root password.
|
Quote:
In the meantime if anybody can suggest a solution to the first problem (regarding su), I'd be very grateful. |
I used kdesu anyway and created a shortcut on the desktop.
Thanks for all suggestions :) |
All times are GMT -5. The time now is 09:22 PM. |