Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I would like to be able to ssh (or log on in any fashion) to a machine, start an application and have the window appear on a screen connected ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3

    SSH, window on remote screen (not X11 forwarding)


    Hi,

    I would like to be able to ssh (or log on in any fashion) to a machine, start an application and have the window appear on a screen connected to the machine i logged on to. There are plenty of tutorials of how to do X11 forwarding to get the windows on the local screen, but i want the opposite of that. I have tried these options:

    ssh -X (-Y) hostname
    export DISPLAY='hostname:0.0'

    ssh hostname
    export DISPLAY='hostname:0.0'

    but I always get the error: "Can't open display" And I can't see anything in the man pages that would help me.

    Any suggestions?

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Hello. What works for me is to use
    Code:
    DISPLAY=:0 program_name
    Where program_name is the name of the application you are opening on the server.

    Or you can do
    Code:
    export DISPLAY=:0
    To make that the default.

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3
    Thank you very much reed9, that works beautifully.

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    620
    Quote Originally Posted by wirylattice View Post
    Hi,

    I would like to be able to ssh (or log on in any fashion) to a machine, start an application and have the window appear on a screen connected to the machine i logged on to. There are plenty of tutorials of how to do X11 forwarding to get the windows on the local screen, but i want the opposite of that. I have tried these options:

    ssh -X (-Y) hostname
    export DISPLAY='hostname:0.0'

    ssh hostname
    export DISPLAY='hostname:0.0'

    but I always get the error: "Can't open display" And I can't see anything in the man pages that would help me.

    Any suggestions?
    Code:
    ssh -XY username@hostname
    The environment variable "DISPLAY" should be set correctly, do not change it.
    run a program such as:
    Code:
    firefox

  5. #5
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3
    Hi Alf,

    Thanks for your reply, but did you read my post? I don't want the window to pop up on a screen connected to the computer I am ssh-ing from, but on the machine I am logging on to.

  6. #6
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    620
    But that makes it very hard to interact with.

Posting Permissions

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