Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
hi
i am an entirely new person in linux.
i was trying to configure minimo browser.
i downloaded mozilla-1.7.12-source.tar.gz,unzipped it and build it using make -f client.mk build_all.
i also got an executable:mozilla/dist/bin/TestGtkEmbed
but when i tried running it ,i got an error
"GTK warning :cannot open display:"
can anyone please suggest a solution?
thank you in advance
I usually recieve that error when I forgeet I am root in a shell and try to open a GTK application...basically that means if your root in a console become a normal user before trying to run it.
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282
Rep:
It sounds like it's an issue with permissions on your display. Basically, when you log into an X windows session as a user, you own that display, and other people aren't allowed to access it. This is a good thing, since your display includes your keyboard - if everyone was allowed to access it, anyone could just watch your keyboard and steal passwords, as well as virtually looking over your shoulder at what you're doing etc.
This is what lord-fu is referring to, since if you su to root, you're (temporarily) logged in as a different user, so root doesn't have access to your display. Logging out and running the command as yourself is one way of solving it, but sometimes graphical applications need root priviledges. You can control access to your display with the 'xhost' command; to allow the user 'root' to connect, issue this command as the display owner (i.e. your normal user):
Code:
$ xhost +root
and you should find that root can run graphical applications too.
i have logged in as root into the xwindow and also logged into command line as root.again when i try to run a gtk program,i am getting the same error.
i did gtk configuration manually after downloading packages,then configuring it,make and make install.i had installed gtk+-2.4.0 along with associated other packages(like atk,glib,pango,jpeg etc).
is the above mentioned error due to some problem or mistake in this installation?
please help
thank you in advance
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282
Rep:
Have you tried logging into X as your usual user, issuing the 'xhost +root' (or just 'xhost +' if that doesn't work) in a terminal window, then 'su'-ing before running your program? It may or may not solve the issue, but I wouldn't trust things to be quite how you want them for a root login to X. At the very least, it'll pin down whether it's a config issue or a libraries/other issue.
yes ,i tried that also.i logged in as normal user and gave "xhost +" from command line.i got error message as "unable to open display".
i think something is wrong with my x window.my x window is also not working properly.when i gave "startx" from command line i got error as
"/etc/X11/xinit/xinitrc-common line45:3206 segmentation fault
xmodmap "$sysmodmap" ". is my xwindow having some problem.
i have installed xorg-x11-6.8.1-12-i386.rpm and also
xorg-x11-devel-6.8.1-12.i386.rpm.is it needed that i should include some library?please suggest a solution
please help
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282
Rep:
Yeah, if you can't use xhost as the user you logged in as, there's something up. Though if you can use X at all, you should have access to the display to be able to change its access rights...
Looking on Google, all reports of the GTK warning seem to be either (i)related to SSHing into another machine (the vast majority), or (ii)people unable to start X at all. As noted, if you can log into X, that user should be able to access that display, and... hmm.
Just to check, you are trying to run things on your own monitor and not on some other computer? If so, perhaps the $DISPLAY environment variable is set so it's looking somewhere else. Try "echo $DISPLAY" from a console to see if you're inadvertently trying to start your app on a remote PC. It should almost certainly be ":0.0", so if it's not, try
Code:
export DISPLAY=:0.0
and see if you have any more success.
If that doesn't sort it out... can you run the standard X applications, and other downloaded ones? It could be that your Gtk toolkit isn't installed properly, though I probably won't be able to help you with that other than suggesting a
Code:
yum update
yum install gtk2
which even then is just a guess.
Hope one of these things sorts out your problem,
Andrzej
hi
i tried it also.but end up with no success.
i think something was wrong with my xwindow.i reinstalled it.now gtk is working properly
thank u all for ur help and support
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.