LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-13-2009, 08:38 AM   #1
lindylex
Member
 
Registered: Mar 2007
Posts: 192

Rep: Reputation: 17
how do I start a gui application and the Desktop on a remote computer threw ssh


I have an ssh question that I have not been able to figure out.

I am sitting in front of computer A on computer B I would like to start mplayer and have it display a movie on computer B's screen. I think a better question might be how do I start a gui application and the Desktop on a remote computer threw ssh.

Thanks

[Partial SOLUTION]

Problem 1

To start say mplayer on the remote machine do the following.

Local Machine
Log into the remote machine.
ssh me@192.2.2.2

Remote Machine
export DISPLAY=:0

mplayer ILoveLindyLex.avi

Now mplayer will play on the remote machine.

Problem 2.

How do I start the remote desktop?

I got this solution from askvictor1 on IRC "openssh" channel on Freenode network.

Thanks, Lindylex

Last edited by lindylex; 04-14-2009 at 09:06 AM.
 
Old 04-14-2009, 05:40 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
the answer depends.. if both systems are running linux and both already have running desktops then the answer would be, from computer b, ssh -X computer a, log in, then run mplayer and it should automatically forward mplayer from computer a to b
mind you full frame video might be laggy via network

you could also use xinit to start another X session with nothing but an xterm, ssh -X computer a, gnome-session& (or whatever desktop you want to run..) then run your application as normal.

but if videos on computer a playing on computer b is all you want then nfs is probably better

just add a line as such to /etc/exports on comp a
Code:
/path_to_video    ip.addr.of.compb(rw,root_squash)
then restart nfs services (/etc/init.d/nfs restart or perhaps /etc/init.d/nfs-kernel-server restart)
then add on comp b's /etc/fstab
Code:
/mount_point_for_videos   ip.addr.of.compa:/path_to_video nfs defaults 0 0
and then mount network share and play them as if they were local

Last edited by frieza; 04-14-2009 at 05:43 PM.
 
Old 04-21-2009, 07:40 AM   #3
lindylex
Member
 
Registered: Mar 2007
Posts: 192

Original Poster
Rep: Reputation: 17
frieza, or any one else reading this. I am sorry if I confused you. My goal is not to display anything on computer A from computer B. I want to use computer A as full remote control for computer B threw ssh. Currently my first solution works well for starting gui apps on computer B.


Solution 1 start GUI apps on computer B

To start say mplayer on the remote machine do the following.

Local Machine
Log into the remote machine.
Code:
ssh me@192.168.2.2
Remote Machine
Code:
export DISPLAY=:0
Code:
mplayer ILoveLindyLex.avi
I still would like to know if it is possible to start the desktop without forwarding it since I do not use a login manager on computer B.

Thanks
 
Old 04-21-2009, 07:59 AM   #4
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
lindylex:

Unless you do as suggested frieza you would not be able to open any gui on computer B and see it.

The way I see it, local machine is computer A and you want to run graphical applications on computer B !

The Partial Solution provided by you will run mplayer on computer B, but you will not be able to see it on your local machine (computer A), since you are setting the display to computer B. And if this is exactly what you want, then to start the desktop all you have to do is run the desktop application. For gnome that would be gnome-session.
 
Old 04-21-2009, 08:00 AM   #5
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
If I understand you correctly, once you're logged into B from A, you should be able to start a Desktop on B thusly:

Code:
$ startx -- :0
If you need the ability to see this desktop from A, you'll have to ensure that x11vnc (or FreeNx, et al) starts when X starts, then you can connect separately.

cheers,

Last edited by mrclisdue; 04-21-2009 at 08:04 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using DSL and ssh / ssh-server to access the Windoze desktop GUI On2ndThought Linux - Server 4 11-16-2008 02:17 PM
Remote desktop software to control desktop GUI? Phaethar Linux - Software 3 06-27-2008 09:30 AM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 03:01 AM
How do you connect to another computer and use an application running on it remote? zahadumy Linux - Software 8 05-19-2006 04:43 PM
Running remote application through SSH tuananhbirm Linux - General 1 11-15-2005 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:16 PM.

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