LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2009, 03:12 AM   #1
Urien
LQ Newbie
 
Registered: Apr 2009
Location: Elx (Spain)
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
SSH - Remote aplications in remote server


Hello!

I'm new here and my english is not very good... so I will try to explain my problems!

I have two computers (both with Ubuntu). In one I have ssh-server and in the other ssh-client. I would like to execute applications from server and display it on server (X server session).

Do you understand me? Is it possible? All information I have found on LinuxQuuestions.org and Google always try to do X11 forwoading to see the applications in client (X client session).

Thank you very much! =)
 
Old 04-02-2009, 03:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that'll normally work by default if you're exporting your DISPLAY values automatically. alternatively just add -X to your ssh command to tunnel directly inside ssh.

Not a networking question. Moved to Linux - Newbie.
 
Old 04-02-2009, 03:25 AM   #3
Urien
LQ Newbie
 
Registered: Apr 2009
Location: Elx (Spain)
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Nop

If I use "ssh IP" and type "firefox" it says "Error: no display specified"
If I use "ssh -X IP" it opens firefox in my computer (client). I would like to open it in server X session.
Then, I try things like "export DISPLAY=0.0" and (using "ssh IP") the result is "Error: cannot open display: 10.0"

Thank's. I'm newbie sorry!

Last edited by Urien; 04-02-2009 at 03:32 AM.
 
Old 04-02-2009, 03:44 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, note that the machine on which an X app is *displayed* is the server, not the place you run it from. The model is basicaly the other way round. try "export DISPLAY=:0.0" noting the :. if you have permission problems then, run "xhost +localhost" as the owner of the remoteo X server.
 
Old 04-02-2009, 03:47 AM   #5
Vit77
Member
 
Registered: Jun 2008
Location: Toronto, Canada
Distribution: SuSE, RHEL, Mageia
Posts: 132

Rep: Reputation: 17
Did you try this:
Code:
export DISPLAY=127.0.0.1:0.0
firefox
 
Old 04-02-2009, 03:49 AM   #6
Urien
LQ Newbie
 
Registered: Apr 2009
Location: Elx (Spain)
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
PROBLEM SOLVED

Only I should do:
$ ssh 192.168.1.134
$ export DISPLAY=":0.0"

And that's all! Now I can do:
$ mplayer -fs file.avi
And I see the video in the server

Thank you! =D

Edit: Thank you Vit77, it seems it works too

Last edited by Urien; 04-02-2009 at 03:50 AM.
 
Old 04-02-2009, 05:12 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
That is an odd way of running most programs. You are launching the program remotely, but you need to be at the server to run it.

Usually, you would enter: ssh -X user@host

ssh will create a proxy for x server with a display of either :10.0 or :11.0 and then tunnel the X messages through the tunnel. A program running on the remote host will display to display :10.0, which results in the program being displayed locally.

If you are wanting to play a video on another computer, then this would be OK, but if you want to run any kind of graphical program, you would need to move to the remote computer to continue.

---

You used Firefox as an example, but this is a bad program to use as an example. The wrapper program will manipulate the display itself and you won't get what you expected unless you use the -no-remote option.

---
 
Old 04-02-2009, 05:20 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well in this example, it's an avi file, so seems more logical. playing back on a laptop connected to their 60" plasma, a shop wall board display etc...
 
Old 04-03-2009, 04:07 AM   #9
Urien
LQ Newbie
 
Registered: Apr 2009
Location: Elx (Spain)
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Thank's!

Yes, my idea is to have a laptop with a projector in a lan party and, from my computer, put videos (with mplayer) or pictures (eog), etc.

Now, it works fine. Thank you!
 
Old 04-03-2009, 12:41 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'm so proud to say I've never been anywhere near a LAN party.
 
Old 04-03-2009, 06:02 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Me neither
 
Old 04-04-2009, 04:02 AM   #12
Urien
LQ Newbie
 
Registered: Apr 2009
Location: Elx (Spain)
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Jeje

I am staff and we are organizating a big one! We are from Elx (Valencia - Spain).

See you!
 
  


Reply

Tags
server, ssh, xsession



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
SSH timeout on remote server investmentbnker75 Linux - Networking 3 04-11-2008 03:00 PM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 03:01 AM
SSH Error to remote Server shawnbishop Linux - Software 1 06-04-2007 01:50 AM
Remote server, unable to SSH anymore Keiser Linux - Newbie 1 05-06-2005 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration