Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: run a GUI program through ssh, but on server?

  1. #11
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: run a GUI program through ssh, but on server?

    this is how I do it:

    Code:
    ssh -X user@host
    then inside the ssh session:


    Code:
    w
    find the screen you want, for me it is :0

    then

    Code:
    export DISPLAY=:0
    Code:
    gui-app
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  2. #12
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: run a GUI program through ssh, but on server?

    <snip>
    Last edited by nerdy_kid; December 27th, 2010 at 04:49 PM.
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  3. #13
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: run a GUI program through ssh, but on server?

    <snip>
    Last edited by nerdy_kid; December 27th, 2010 at 04:49 PM.
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  4. #14
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: run a GUI program through ssh, but on server?

    UF is screwed up, sorry for the above.
    Last edited by nerdy_kid; December 27th, 2010 at 04:49 PM.
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  5. #15
    Join Date
    Mar 2008
    Location
    Sweden
    Beans
    75
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: run a GUI program through ssh, but on server?

    Thank you so much!!
    I got it working now!

  6. #16
    Join Date
    Mar 2008
    Location
    Sweden
    Beans
    75
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: run a GUI program through ssh, but on server?

    oh, sorry to say this but now the original behavour of ssh -Y is gone.

    Code:
    olof@main:~$ ssh -Y username@192.168.1.17
    usr/bin/xauth:  /home/username/.Xauthority not writable, changes will be ignored
    [not interesting]
    username@hokatorp-serv:~$ xclock
    X11 connection rejected because of wrong authentication.
    Error: Can't open display: localhost:10.0

    probably it's remainings from my tinkering before I got it working...

    is there a way to reset the ssh settings? a file to erase or similar.

    just to mention - I have tried this too:
    Code:
    olof@main:~$ ssh -X username@192.168.1.17
    [not interesting]
    /usr/bin/xauth:  error in locking authority file /home/username/.Xauthority
    username@hokatorp-serv:~$ w
     19:32:57 up  4:03,  3 users,  load average: 1.18, 0.65, 0.56
    USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
    username tty7     :0               15:29    4:03m  2:26   0.06s /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
    username pts/0    :0.0             15:32    3:58m 31.68s  0.78s bash
    username pts/2    main.lan         19:31    0.00s  1.29s  0.02s w
    
    sername@hokatorp-serv:~$export DISPLAY=main.lan
    but it does not work.
    Last edited by olof_; December 27th, 2010 at 07:45 PM. Reason: adding information

  7. #17
    Join Date
    Mar 2008
    Location
    Sweden
    Beans
    75
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: run a GUI program through ssh, but on server?

    now I found /etc/ssh
    and ~/.ssh/
    will it help to remove the files within?
    Last edited by olof_; December 27th, 2010 at 07:47 PM. Reason: adding info

  8. #18
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: run a GUI program through ssh, but on server?

    Quote Originally Posted by olof_ View Post
    now I found /etc/ssh
    and ~/.ssh/
    will it help to remove the files within?
    rename it to something else and see if it fixes the issue.
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  9. #19
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: run a GUI program through ssh, but on server?

    Sorry, my fault. I meant:

    env

    setenv is for other systems.

    And yes, export is the proper command to set an environment variable. X allows up to 10 screens I believe. You can use more, but you have to recompile the xorg server with larger settings.

    Sorry that I caused so much grief.

    I would normally say "google it", but that got me in trouble in another thread.
    Last edited by tgalati4; December 29th, 2010 at 01:54 AM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  10. #20
    Join Date
    Mar 2008
    Location
    Sweden
    Beans
    75
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: run a GUI program through ssh, but on server?

    I first renamed the textfiles inside the ssh folder, but it did not help.
    secondly I tried to uninstall ssh and openssh-server on both of the machines, and I thik I dare to say that now are things exactly as I wanted it to be now

    (I do not even know if I dare to ask this question), but should not

    Code:
    username@hokatorp-serv:~$ w
     17:14:58 up  2:28,  3 users,  load average: 0.00, 0.09, 0.22
    USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
    username tty7     :0               14:47    2:28m 44.40s  0.07s /bin/sh /etc/xdg/xfce4/xinitrc --
    username pts/0    :0.0             15:00   16:31   1.51s  1.51s bash
    username pts/1    main.lan         17:13    0.00s  1.27s  0.02s w
    
    username@hokatorp-serv:~$ export DISPLAY=main.lan
    turn things back to the default ssh -Y behavior?

    I know I can just disconnect and then reconnect, but it feels that there is a better way.

    Happy New Year everyone!

Page 2 of 3 FirstFirst 123 LastLast

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
  •