Tuesday, 28 February 2012

Running X applications as root

Sometimes there is a need to run some rubbish graphical installer on your Debian system (e.g. Matlab). If we try:
sudo installer

we get an error:
Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

To fix it we need tell the xserver to accept connections from other users before we start the installation:

xhost +
sudo installer

and now it works fine!

No comments:

Post a Comment