Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-02-2005, 01:00 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2005
Posts: 8
Rep:
|
can't start program from shell
why cant i do this no more?
Code:
root@1[~]# synaptic
(synaptic:11973): Gtk-WARNING **: cannot open display:
actually all programs i run in shell give that 
is there a way to fix it?
|
|
|
|
04-02-2005, 01:18 AM
|
#2
|
|
Member
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230
Rep:
|
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).
|
|
|
|
04-02-2005, 01:29 AM
|
#3
|
|
LQ Newbie
Registered: Apr 2005
Posts: 8
Original Poster
Rep:
|
weird
when i'm logged in as a normal user, and i type "synaptic", the shell says i should be logged in as superuser :s
and if i log as root, it wont open :s
|
|
|
|
04-02-2005, 01:32 AM
|
#4
|
|
Member
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230
Rep:
|
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?
|
|
|
|
04-02-2005, 01:34 AM
|
#5
|
|
Member
Registered: Jul 2004
Location: Houston Tx
Distribution: kubuntu, Debian, Suse 10.2
Posts: 31
Rep:
|
as an ordinary user type the command:
xhost +
Then root will be able to open windows in X.
|
|
|
|
04-02-2005, 02:24 AM
|
#6
|
|
LQ Newbie
Registered: Apr 2005
Posts: 8
Original Poster
Rep:
|
Quote:
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
thanx it works, but do i have to type that everytime?, if not how can i make my system do it everytime i login?
|
|
|
|
04-02-2005, 02:33 AM
|
#7
|
|
Senior Member
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449
Rep:
|
Quote:
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
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.
|
|
|
|
04-02-2005, 07:01 AM
|
#8
|
|
LQ Newbie
Registered: Apr 2005
Posts: 8
Original Poster
Rep:
|
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
|
|
|
|
04-02-2005, 08:12 AM
|
#9
|
|
Member
Registered: Sep 2002
Location: Novi Sad, Vojvodina
Distribution: Slackware, FreeBSD
Posts: 386
Rep:
|
Quote:
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
|
|
|
|
04-02-2005, 10:52 PM
|
#10
|
|
Member
Registered: Jun 2004
Location: Cala city
Distribution: Suse 10.0; Debian 5.0 (Lenny) Fluxbox
Posts: 240
Rep:
|
A good solution might be to type in kdesu <command> it should run properly.
|
|
|
|
04-24-2005, 03:41 PM
|
#11
|
|
LQ Newbie
Registered: Apr 2005
Posts: 8
Original Poster
Rep:
|
is kdesu the same as gnomesu?
|
|
|
|
04-24-2005, 07:58 PM
|
#12
|
|
Member
Registered: Jun 2004
Location: Cala city
Distribution: Suse 10.0; Debian 5.0 (Lenny) Fluxbox
Posts: 240
Rep:
|
uhhmm... probably. I don't use gnome, but I'm sure it is.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:01 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|