Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Can someone explain how X11 forwarding via ssh works? My understanding was that I could open an app running on a server, and just the front-end gui would appear on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie pajamabama's Avatar
    Join Date
    Jul 2005
    Location
    In another time's forgotten space
    Posts
    150

    explain ssh -X forwarding


    Can someone explain how X11 forwarding via ssh works? My understanding was that I could open an app running on a server, and just the front-end gui would appear on the client machine. Is this right?

    I logged into my desktop system, from my laptop, via ssh -X and opened MPlayer. The idea is to play music on my desktop system (with good speakers) and control it on my laptop (where I do most of my work). The playback was all chopped up, like it was doing all the decoding on my laptop, through the ssh tunnel, as well as showing the controls.

    I thought the app would run on the server. Or does it actually run locally? And if that's the case, is there a way to get it to run on the server instead?

    Thanks in advance
    HP Pavilion dv6000t
    Intel Centrino Duo 2.0GHz
    nVidia GeForce Go 7400
    Fedora 10

    ----------------------
    The real question is what time is it and why the hell am I still screwing around with my computer?

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    It should run from the server. I can 'ssh into my 'server' machine which is upstairs and have it play music with xmms. I just go:
    Code:
    ssh -X music@servermachine (or server's ip)
    Then bring up xmms and play files which can be heard from the speakers on the server machine. I don't know why your sound would be choppy... Does everything sound alright when playing music from the server itself? It should sound the same even when running Xmms or Mplayer on the server from your laptop.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  3. #3
    Linux Newbie pajamabama's Avatar
    Join Date
    Jul 2005
    Location
    In another time's forgotten space
    Posts
    150
    If I vnc to the 'server' and run mplayer, it works fine. This of course is a workable alternative, though not quite as cool.

    Perhaps it has something to do with the fact that my 'server' is Win2k running cygwin? But like I said, mplayer opens and plays perfectly well there on its own.

    The gui stuff is also very slow to load. ie menus open and populate slowly, window graphics are blank for a time. but this seems reasonable as that's all X related stuff.

    here's what I do:
    Code:
    > ssh -X me@myip
    > gmplayer
    do you know of any binaries for xmms on cygwin? Or if it's not too hard to compile for?
    HP Pavilion dv6000t
    Intel Centrino Duo 2.0GHz
    nVidia GeForce Go 7400
    Fedora 10

    ----------------------
    The real question is what time is it and why the hell am I still screwing around with my computer?

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Why not just install TightVNC on your Windows box? Then it's just a matter of bringing up Windows with vncviewer from your laptop:
    Code:
    vncviewer me@myip:5801
    Need to make sure ports for vnc are clear.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  6. #5
    Linux User Muser's Avatar
    Join Date
    May 2004
    Location
    Maryland
    Posts
    363
    Install two things on your Windows box:
    PuTTY
    Xming

    This is a much better and faster system than using Cygwin/X

  7. #6
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Quote Originally Posted by Muser
    you want this link for Xming

  8. #7
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Quote Originally Posted by pajamabama
    Perhaps it has something to do with the fact that my 'server' is Win2k running cygwin? But like I said, mplayer opens and plays perfectly well there on its own.
    I'm confused. Your server is Windows and your laptop is Linux? Are you trying to run music on the (Windows) server from a (Linux) laptop or are you going in the other direction, Windows to Linux?
    Linux Mint + IceWM Registered: #371367 New Members: click here

  9. #8
    Linux Newbie pajamabama's Avatar
    Join Date
    Jul 2005
    Location
    In another time's forgotten space
    Posts
    150
    Sorry for the confusion. I'm trying to ssh into my Windows desktop machine from a suse laptop. The windows system has better speakers, so I like to play music from there. So MPlayer is running on windows, but the frontend is on suse. Does that help?

    And about vnc...
    Quote Originally Posted by pajamabama
    If I vnc to the 'server' and run mplayer, it works fine. This of course is a workable alternative, though not quite as cool.


    And I'll definitly look into Xming. It sounds cool.
    HP Pavilion dv6000t
    Intel Centrino Duo 2.0GHz
    nVidia GeForce Go 7400
    Fedora 10

    ----------------------
    The real question is what time is it and why the hell am I still screwing around with my computer?

  10. #9
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    :drown:

    Then I'm still confused. If I'm not mistaken, Xming is an Xwindows server that installs to Windows so you can run a remote Linux desktop or Linux apps from the Windows machine. If you're wanting to run Mplayer on your Windows box remotely from your SuSE laptop, how is going in the opposite direction going to accomplish that?

    EDIT: Can you ssh into Xming/Windows from a Linux box and run Windows apps?
    Last edited by Dapper Dan; 04-19-2006 at 12:20 PM.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  11. #10
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Quote Originally Posted by pajamabama
    Sorry for the confusion. I'm trying to ssh into my Windows desktop machine from a suse laptop. The windows system has better speakers, so I like to play music from there. So MPlayer is running on windows, but the frontend is on suse. Does that help?
    Then you don't really need to have X on the Windows computer at all. Modern X apps are very inefficient over the network, so perhaps the delay in response might cause the program to make the sound choppy. The "-C" flag to ssh helps a bit, but there's no real good solution to this.

    Also, mplayer is foremost a command-line program; I personally think the GUI really sucks and only offers a tiny bit of the thousands of options and features that Mplayer has. So you can just learn to use the command-line arguments and don't have to deal with the GUI at all.

Page 1 of 2 1 2 LastLast

Posting Permissions

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