Originally Posted by
jney
what i want to do is to launch a movie with mplayer on remote pc and be able to watch it on that remote pc.
Ok. (BTW I fixed a typo above.)
You'll want to know what display to target. Usually it is :0.0 and it is set in the environment variable "Display". 'export' passes the value available to programs launched from that shell. The part before the colon is where a machine name could go, but that's left blank to mean local host, which if you are logged into the remote host is the remote host.
Code:
$ ssh -l jney pc
export DISPLAY=:0.0
mplayer /path/to/movie.mov
There's not any good basic intro to X that I know of, but some info can be found in the Display Names section of the X manual. You can use the 'geometry' settings to place the new program in a particular area on the screen.
Code:
$ ssh -l jney pc
export DISPLAY=:0.0
mplayer -geometry 400x300-1-1 /path/to/movie.mov
If you are using a key to connect to the remote machine, then you can pass the value of DISPLAY with the key itself. The section on the authorized_keys file format in sshd goes into a bit of detail. The server will have to allow PermitUserEnvironment for that user's group.
Bookmarks