Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Running X applications over SSH

Hybrid View

  1. #1
    Mentor
    Join Date
    Jul 2001
    Posts
    1,666

    Running X applications over SSH

    I have started ssh with the command user@server -x, and connect just fine, then when I try to run an X application I get this error
    Error: Can't open display:
    If I try to run a Gtk application I get this error
    Gtk-WARNING **: cannot open display:
    Am I doing something wrong? I was told that I should just be able to start ssh with the -x flag then it would take care of the rest. I think the problem could be our firewall, but I don't know what port to open up.
    Cheers
    CP

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Running X applications over SSH

    Did you start X on that connection?

    I've tested it a while ago ( read as a few years ) exporting X but found not real use for this since most of my boxes are so-yesteryear-too-weak-for-real-use.

    IIRC, you need to start x for that specific session ( regardless of whether your box is already running X on TTY7 or not ). It also looks like the GTK warning was of that sort. ( sorry I can't really offer specific inside of what is going on ). I'm just shooting into the dark here.

  3. #3
    Mentor
    Join Date
    Jul 2001
    Posts
    1,666

    Re:Running X applications over SSH

    I found the problem. I was using -x, which actually disables X forwarding, when I should have been using -X. So now I can run the applications, very slowly, on my own X-server. That is all that needs to be done.
    Cheers
    CP

  4. #4

    Re:Running X applications over SSH

    [quote author=CP link=board=4;threadid=8262;start=0#msg74984 date=1070919852]very slowly[/quote]

    try ssh -C -X foo

    -C means compress

  5. #5
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Running X applications over SSH

    [quote author=CP link=board=4;threadid=8262;start=0#msg74984 date=1070919852]
    So now I can run the applications, very slowly, on my own X-server.
    [/quote]
    See, that's the main reason I stopped doing it. My boxes are too freaking slow for any use to have multiple instances of X running and export to another box. My server is P II 350 :'( .

  6. #6
    Mentor
    Join Date
    Jul 2001
    Posts
    1,666

    Re:Running X applications over SSH

    The main reason I wanted to do it was so I could access a web page only available on the internal server, which you could only view using a graphical browser. At least it saved me driving 10mins each way, so it was faster in the long run. I'm just trying it with -C now, and it doesn't seem to be much faster, but it is a bit.

  7. #7

    Re:Running X applications over SSH

    [quote author=CP link=board=4;threadid=8262;start=0#msg75038 date=1071010765]
    The main reason I wanted to do it was so I could access a web page only available on the internal server
    [/quote]

    ssh -D 1080 sshhost

    then on yourmachine you set the proxy to be localhost port 1080 type socks and type in the ip of the internal server and boom it works

    the beauty of ssh tunnels :-D

  8. #8
    Mentor
    Join Date
    Jul 2001
    Posts
    1,666

    Re:Running X applications over SSH

    Wow, that would have been easier
    Cheers
    CP

  9. #9
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Running X applications over SSH

    [quote author=gorn link=board=4;threadid=8262;start=0#msg75225 date=1071298561]
    ssh -D 1080 sshhost

    then on yourmachine you set the proxy to be localhost port 1080 type socks and type in the ip of the internal server and boom it works

    the beauty of ssh tunnels :-D
    [/quote]
    That's sounds pretty good. Can you explain a little further? I would like to try it out.

    Let's say if I want to set up between two boxes. One with Linux and another with Windows? Or is it have to be between two Linux boxes with SSH and HTTP running?

    Can you explain more, please?

    TIA

  10. #10

    Re:Running X applications over SSH

    Okay I just wrote an SSH Tunneling PET. Let me know what is good/bad. I'm gonna be out of town for a few days, when I get back maybe I'll revise it. Oh and maybe add X tunneling information, or just make it a full SSH pet.

Similar Threads

  1. Cool applications
    By pbharris in forum Linux - Software, Applications & Programming
    Replies: 195
    Last Post: 01-03-2012, 08:28 PM
  2. I use these applications
    By GnuVince in forum Linux - Software, Applications & Programming
    Replies: 17
    Last Post: 04-10-2004, 09:56 PM
  3. running remote command, then leave it running
    By Blaqb0x in forum Linux - General Topics
    Replies: 1
    Last Post: 10-03-2003, 10:36 PM
  4. Applications Menu
    By vwgtiturbo in forum Linux - General Topics
    Replies: 2
    Last Post: 12-07-2002, 03:31 PM
  5. Web Applications
    By Ashcrow in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 05-08-2002, 12:33 PM

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
  •