2

I use remote desktop connection & XRDP to remote to my Ubuntu 14.04 VM which is running Xfce.

I can start any program from the Application Menu (diffuse, meld, gedit) but when I try to run those same programs from the terminal, the GUI never appears.

So for example, if I run meld --version or chromium-browser everything is fine, but if I run gedit or meld the GUI never appears. No output on the console either.

I can run some GUIs from command line - chromium-browser but firefox generates a bunch of Glib errors.

Any ideas?

6
  • from the command line if you run echo $DISPLAY does it return anything?
    – Centimane
    Sep 2 '15 at 17:03
  • :10.0, which matches my X11DisplayOffset variable in /etc/ssh/sshd_config
    – ventsyv
    Sep 2 '15 at 17:09
  • does ps aux | grep gedit after trying to launch it from command line does anything get returned? Just to confirm that it crashed/failed to start rather than not displaying properly.
    – Centimane
    Sep 2 '15 at 17:16
  • ps does return an instance of gedit running.
    – ventsyv
    Sep 2 '15 at 17:23
  • Are you trying to run Linux GUI applications and have them displayed on your Windows machine? Or are you trying to launch applications from your Windows machine and have them displayed on the (virtual) monitor of the Ubuntu VM? Or are you trying to view windows that are displayed on the monitor of the Ubuntu machine as windows on Windows? Sep 2 '15 at 22:26
1

After a little rooting around I believe your DISPLAY variable is incorrectly set. According to the user at Is there a command to list all open displays on a machine? :10 is normally used for SSH forwarding, but not a local session.

You are able to list your available displays using

ls /tmp/.X11-unix/ 

You should see X0 among them, if so set your display variable using

export DISPLAY=:0.0

If you don't see X0 and instead see something like X1 you'll want

export DISPLAY=:1.0

You can add this export line to you .bashrc to make the change permanent.

5
  • I have X0, X10, X11 & X12. When I set DISPLAY to 0, I get Gtk Warning that it cannot open display:0.0. I got it to work on display 12 though. Is there a way to close the other displays?
    – ventsyv
    Sep 2 '15 at 17:56
  • you should be able to use display :0.0 if you configure xhosts, but you shouldn't need to do that for a local session, it sounds like you have some strange configurations on your box that might merit a re-image. As for the displays X10, X11, and X12, are there currently SSH sessions to the machine? Do these displays persist after a reboot?
    – Centimane
    Sep 2 '15 at 17:59
  • I rebooted and X11 & 12 are gone, but still getting an error on X0. I think my .Xauthority file is messed up.
    – ventsyv
    Sep 2 '15 at 18:05
  • If the problem is that DISPLAY is not set correctly, the fix would be to undo whatever is overriding it. DISPLAY should be set to the correct value automatically. If the Ubuntu machine is displaying a login prompt, :0 is probably that. Sep 2 '15 at 22:28
  • @Gilles I agree that the DISPLAY variable shouldn't be overwritten, but I figure the first step is setting it properly and seeing that it fixes the issue. That's why I also recommended a re-image, hunting down where the DISPLAY is overwritten could be quite the witch-hunt.
    – Centimane
    Sep 4 '15 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.