Jump to content
xisto Community
Sign in to follow this  
jedipi

Why Can't I Install Software As Root?

Recommended Posts

When I become root with "su -" and try to install some software, such as firefox, it then says:"(firefox-installer-bin:3645): Gtk-WARNING **: cannot open display:" What's the meaning of this information? And how can I deal with it?Thanks!

Share this post


Link to post
Share on other sites

Hi...

this is becouse display :0.0 is used by another user and when you try to run it as root (by su) you violate the security, since it work like you want to run it from another computer... first you must know what display you use (usualy :0.0, but who knows...) as normal user (without su, just like that), do:

echo $DISPLAY
, then you should add your host (again as usual user), do:
xhost +localhost
and you should see something like:
localhost being added to access control list
then switch user (do su :P ) and export display (take value that gives you echo... do
export DISPLAY=:0.0
if it was :0.0.

that should make the case, hope this helped :P

PS.: Yes, I think it will continiue to run it it is console aplication, but as I remember firefox also got gtk graphic based installer, and there you must get access to display it...

Share this post


Link to post
Share on other sites

aslong as you firewall tcp port 6000 (and 6001 + if you are running more than one X server)there is no ecurety risk from disableing this securety feature by deafualt, many distro's like redhat / fedora do.

Share this post


Link to post
Share on other sites

Why don't you just go to wherever X is running (in most cases it is accessed by pressing Ctrl+Alt+F8, if that doesn't work, try that with F7, F9 and so on) and log in as root there?In GNOME or KDE, you can log out as your normal user and log in as root. Or you can open up a terminal there and use sudo to access your installation file.

Share this post


Link to post
Share on other sites

Why don't you just go to wherever X is running (in most cases it is accessed by pressing Ctrl+Alt+F8, if that doesn't work, try that with F7, F9 and so on) and log in as root there?
In GNOME or KDE, you can log out as your normal user and log in as root. Or you can open up a terminal there and use sudo to access your installation file.


Maybe he's logged in as a normal users under X and is he trying to install something by launching it as root via a terminal ?

Share this post


Link to post
Share on other sites

Just simply use sudo to do the action. Sometimes doing su on some distributions limit you purposefully or try right clicking the file on your file manager and type kdesu sh and press OK. It will launch a password window and let you run the application as root. In GNOME, it should be the same but replace kdesu with gnomesu.xboxrulz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.