Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I become superuser in my user account (for this, i type "su -"), i can't use any program that use X server.
I get different errors, depending on the program I try to run.
For example:
lykos:~ # kwrite
kwrite: cannot connect to X server
but if I do the same not being superuser, I can open kwrite (the same happens with every program, with similar error messages). The "funny" part is that when i type kwrite in su, i do it on X, not in text-only mode, i mean, i do it in my console.
I'm on a laptop and SUSE (fresh install, performed several times) can't autodetect my monitor, but I selected LCD 1024x768@60Hz.
Also, if i login to root (normally, at login screen, not by doing su -) it loads X with no aparent problems.
Originally posted by IBall As root, try running the command
Code:
/usr/X11/bin/xhost +
This will allow your root user to connect to the X server. You will have to do this every time though...
--Ian
You're wrong here mate ... the user who runs the
xsession needs to do the xhost + , not the one that
wants to gain access to the display... but it's not
really good practice in the first place.
And he'd still have to export DISPLAY=:0.0 to
be able to get the app to connect to the local
display ...
For the normal user:
xhost +localhost
You can a) put that in a script and stick it in your
WMs/DEs autostart or b) create a ~/.xsession and
add that line before starting the actual WM to automate
the process...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.