Results 1 to 6 of 6

Thread: run graphical programs from ssh

  1. #1
    Join Date
    Nov 2008
    Location
    Maine
    Beans
    1,125
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question run graphical programs from ssh

    Hi all,
    I have an ssh server on my desktop where soe users login and run programs. One of the programs is XMOLVIEW.
    in the sshd_config i have specified that X11 Forwarding is allowed.
    But I get a variety of errors depending on what i try to open.

    I know there is a way to make it so my remote users can run graphical programs, but i dont recall how.
    I am using Ubuntu 13.04, and my desktop is running on tty7, just to specify that its not a pure ssh server.

    The graphical programs I want to run are on the server.
    users login with ssh -X -l user <IP>


    Code:
    :~$ xmolview
    Can't open display:
    
    :~$ gedit
    
    ** (gedit:6986): WARNING **: Could not open X display
    Cannot open display:
    Run 'gedit --help' to see a full list of available command line options.
    
    :~$ firefox
    
    (process:6987): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
    Error: no display specified
    can anyone point me in the right direction?
    Last edited by conradin; September 10th, 2013 at 02:31 AM.
    ~Conradin~

  2. #2
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,669
    Distro
    Xubuntu

    Re: run graphical programs from ssh

    IIRC:
    firefox --display=:0.0
    still requires ssh -X
    also run DISPLAY=:0.0 so you don't have to use --display
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  3. #3
    Join Date
    Apr 2012
    Beans
    6,809

    Re: run graphical programs from ssh

    What client are you connecting from (another *nix? Windows? Mac?) what X server is running on it?

  4. #4
    Join Date
    Aug 2007
    Location
    Canada
    Beans
    440
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: run graphical programs from ssh

    What about the instructions in the following page:

    http://vanemery.com/Linux/XoverSSH/X-over-SSH2.html
    Best, Gnusci

    "Never make a calculation until you know the answer." -- Wheeler, Spacetime Physics, pg 60.

  5. #5
    Join Date
    Aug 2006
    Beans
    65

    Re: run graphical programs from ssh

    Quote Originally Posted by conradin View Post
    Hi all,
    I have an ssh server on my desktop where soe users login and run programs. One of the programs is XMOLVIEW.
    in the sshd_config i have specified that X11 Forwarding is allowed.
    But I get a variety of errors depending on what i try to open.

    I know there is a way to make it so my remote users can run graphical programs, but i dont recall how.
    I am using Ubuntu 13.04, and my desktop is running on tty7, just to specify that its not a pure ssh server.

    The graphical programs I want to run are on the server.
    users login with ssh -X -l user <IP>


    Code:
    :~$ xmolview
    Can't open display:
    
    :~$ gedit
    
    ** (gedit:6986): WARNING **: Could not open X display
    Cannot open display:
    Run 'gedit --help' to see a full list of available command line options.
    
    :~$ firefox
    
    (process:6987): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
    Error: no display specified
    can anyone point me in the right direction?
    I had the same problem when I was trying to connect to my 12.04 server from my 13.04 workstation. However, my old machine, whose disk I now use in VirtualBox, and which still runs 12.04, was able to connect without problems.

    I haven't investigate further, but it looks like there are some compatibility problems between version of X libraries being used on those systems.
    Last edited by den_; November 11th, 2013 at 08:04 PM.

  6. #6
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    2,952
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: run graphical programs from ssh

    Note that is ForwardX11 yes is included in your ~/.ssh/config for that host (or in general for Host *) or -X is included in the command line, DISPLAY should automatically be set in the environment to forward X program output back through ssh unless disallowed by sshd_config or some other issue.

    For example this is ssh from Ubuntu 12.04 to a very old SuSE 8.2 server (Celeron 300 cpu w/158 MB RAM):
    Code:
    efflandt@xps8100-1204:~$ ssh mainpc
    Last login: Sat Oct 26 17:13:04 2013 from unknown78e40026b8ac.domain_not_set.invalid
    Have a lot of fun...
    efflandt@realhost:~> echo $DISPLAY
    localhost:10.0
    DISPLAY=:0.0 would certainly be incorrect for a forwarded display.

    While most things work as expected, when I run mozilla on the remote, for some reason it runs my local firefox with its settings (defaulting to Ubuntu Google page).
    Code:
    efflandt@realhost:~> which mozilla
    /usr/X11R6/bin/mozilla
    efflandt@realhost:~> mozilla &
    [1] 14583
    efflandt@realhost:~>
    i5 650 3.2 GHz, 8 GB, nvidia GTX 750 Ti, 32" 1080p | i7-4700MQ, 8 GB, Intel HD 4600/nvidia GTX 765M, 15.6" 1080p | etc.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •