1

I am using ubuntu 12.04, and I am trying to ssh to log into a remote server which is also running ubuntu 12.04.

I am using "ssh -X ". I can log into the remote server smoothly, but cannot use the visual/graphical mode to open an application with GUI.

I think the problem lies in this server itself. Because I can use "ssh -X" to run GUI when connecting to another remote server. But I am not sure how to configure it to make it work.

echo $DISPLAY returns blank. Using grep X11 on /etc/ssh/sshd_config file returns:

➜ ~ cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no

I have read the following posts, but the problem is still unsolved, gedit "cannot open display" , on remote computer , using ssh - Ubuntu 12.04
Problem with X can not open display while ssh from ubuntu 13.04 to centos servers

Hope to get help from you. Thank you very much!

user2728388
  • 111
  • 4
  • Can you show an example error message you get when trying to run your application GUI after logging in? Does your environment have a DISPLAY variable, what does echo $DISPLAY show on your server login? Do you have root on the server, are you able to look into and/or edit the /etc/ssh/sshd_config file on the server? – Michael Miller Jun 16 '14 at 21:40
  • @mtmiller echo $DISPLAY shows nothing on the server machine. I can look into /etc/ssh/sshd_config file on the server, I can also ask for a root permission from my boss. – user2728388 Jun 17 '14 at 02:51
  • @mtmiller Here is an example of running GUI after logging in. I am trying to open a text file using gnome-open, the default editor is gedit. It shows the following ERROR:
    (gnome-open:24569): GConf-WARNING : Client failed to connect to the D-BUS daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 GConf Error: No D-BUS daemon running

    (gedit:24572): WARNING: Command line `dbus-launch --autolaunch=d351af25c7aa104bf2c6af1600000007 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed. Cannot open display

    – user2728388 Jun 17 '14 at 02:56
  • @Letizia, Thanks for providing this useful link. I think ssh are installed both on the server and my local machine, and I do use "ssh -X usrname@serverIP". But I am unable to open any GUI remotely. For instance, if I type in "firefox" after logging in the server, it simply shows: Error: no display specified. I have read the link you shared, but echo $DISPLAY shows nothing for me. – user2728388 Jun 17 '14 at 03:12
  • try set in .bashrc on server DISPLAY=ipRemoteDesktop:0.0 – Lety Jun 17 '14 at 07:57
  • @Letizia . I did what you said just now. But I am having the same errors as described in the upper comment. – user2728388 Jun 17 '14 at 09:01
  • sorry, the right code is: export DISPLAY=ipRemoteDesktop:0.0 After that, source .bashrc or re-login – Lety Jun 17 '14 at 10:59
  • @Letizia, I did exactly what you told. (gnome-open:27326): GConf-WARNING : Client failed to connect to the D-BUS daemon: //bin/dbus-launch terminated abnormally with the following error: No protocol specified Autolaunch error: X11 initialization failed.

    GConf Error: No D-BUS daemon running

    No protocol specified

    ** (gedit:27330): WARNING **: Command line `dbus-launch --autolaunch=d351af25c7aa104bf2c6af1600000007 --binary-syntax --close-stderr' exited with non-zero exit status 1: No protocol specified. Autolaunch error: X11 initialization failed.

    – user2728388 Jun 17 '14 at 12:03
  • I have found another post GConf Error: No D-BUS daemon running?! How to reinstall or fix?. Verify ~/.dbus permission and ownership. Check it on the server where X-session works. – Lety Jun 17 '14 at 20:04
  • @Letizia, I tried these links provided. But the problem is still there. The server has Nvidia GPUs, I believe there might be some issue with the GPU. No matter how I configure the DISPLAY environment, the remote GUI display doesn't work. I am wondering if you have more suggestions? – user2728388 Jun 19 '14 at 03:40
  • @mtmiller,the server has Nvidia GPUs, I believe there might be some issue with the GPU. No matter how I configure the DISPLAY environment, the remote GUI display doesn't work. I am wondering if you have more suggestions? – user2728388 Jun 19 '14 at 03:43
  • Check in /var/log if are present errors and add information to your question. In /var/log are present a lot of file, so try "ls -lrt" and verify if they change date and time after your command. – Lety Jun 19 '14 at 11:29
  • use dbus-monitor that display information about dbus activity. Check X-session configuration between the two server (/etc/X11/Xsession) and verify if present ~/.Xsession-error (exec ls -la ~/) – Lety Jun 19 '14 at 19:45

0 Answers0