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.
Looks like you are trying to run the program as root. Did you log into Xwindows as root? If not (you got to root via 'su') then by default root (su) cannot run Xwindows inferfaces (Gtk or Qt). I'm not sure how to allow root (su) to do so while logged in with a user account but if you need to run it as root then I'd suggest restarting Xwindows as root (assuming the answer to my initial question is no).
So when you log into Kde/Gnome (or whatever your GUI is) as root (not using 'su') it still won't let you open it? If so, that's the error it throws? What is your distro and what windows/desktop manager are you using?
Originally posted by hallamigo So when you log into Kde/Gnome (or whatever your GUI is) as root (not using 'su') it still won't let you open it? If so, that's the error it throws? What is your distro and what windows/desktop manager are you using?
it wont, you can see the error above, i'm using simple mepis (debian), using kde
Quote:
xhost +
thanx it works, but do i have to type that everytime?, if not how can i make my system do it everytime i login?
Originally posted by mike33 as an ordinary user type the command:
xhost +
Then root will be able to open windows in X.
xhost + does work but is terribly insecure. It allows any computer to control your X display remotely. It is wiser to use
Code:
xhost +127.0.0.1
which will just allow access from the local machine. It assumes that anyone running a command while logged into the machine should have permission to access the display. This is a fairly reasonable assumption for a home machine.
You don't need to do this all the time (just if you want to run a program as a different user and if you have restarted the window system since the last time you ran it). If you want to make it permanent (and you probably do) just edit your
startup files (~/.xsession & ~/.xinitrc) and add that line before the last line in the file.
Originally posted by roxxe1 uhm, noobie question, where is my xinitrc located?
tried searching for it with konqueror, but no result
my xession was located in my /etc/x11
~/.xinitrc
~ means it is in the root of your home directory, something like /home/roxxe1/.xinitrc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.