LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices

By mrchaos at 2005-10-31 16:42
THE SETUP

It's actually really quite simple. It uses the ssh protocol to communicate between the server (host computer) and client (display on laptop). First, I run the following command on my client computer:

code:

bash$ xhost +172.21.1.101

This will allow my host (desktop computer) which resides at ip-address 172.21.1.101 on my local network to make gtk connections to my x-server running on my laptop. Then, I ssh my desktop computer from my laptop:

code:

bash$ ssh 172.21.101

type in my user password, and run the following command on my desktop computer (through the ssh connection)

code:

zax@ZAXCOMP$ export DISPLAY=172.21.1.114:0.0

This tells my desktop computer to forward any display requests to screen 0.0 on my laptop computer (at 172.21.1.114) particular to that tty session. All that needs to be done now is to type in the command of the gtk program that you want to run into the command line. It then forwards the display requests from my desktop to my laptop. The cool part about it is that mouse and keyboard requests are also exchanged between the two computers, so essentially my laptop is a part of my desktop.

USING XINE THROUGH SSH ONTO TV:

As for getting XINE to work on my TV, you need to setup a dual-view xorg.conf file, but it must be DUAL HEAD in order for the video to actually appear on the TV (you could send the video to the desktop computer, but it would appear on the computer monitor and not on the TV). Dual head means that there are two entirely separate video drivers running two entirely separate screens. You can't just use xinerama, otherwise you'd have to go back to your computer to drag the video window over to the TV (which would defeat the purpose :-D) Anyway, under the XINE control panel with "advanced" controls and the GUI tab, there's an option to send the video window to another screen separate from the control GUI: the field is called "Name of Video Display." I simply added :0.1 in this space, and it automatically sends my video window to my TV display. Pretty neat. When I run XINE on my laptop, it still sends the video window over to my TV, and my control GUI to my laptop, which is the really cool part. As I said before, you could do it with dualview and xinerama by typing in "172.21.1.101:0.0" into the "Name of Video Display" field, but it would simply go to the computer monitor instead of the TV.

SECURITY RISKS

A word of warning for the wise, I discovered online that the ssh protocol is a fairly insecure protocol. It may not be a good plan to use this protocol over the internet or large networks. I am able to use ssh simply b/c I have two routers and no port-forwarding enabled (I think ssh uses port 22), so that consequently means two levels of security between my port and the internet. There is a more secure way by using some form of cookie to mark computers, but I cannot recall this method at the moment (plus the site seems to have been taken down). However, even on a large network, if the firewall is set up to allow your local network access to port 22, but access denies access to port 22 for your WAN, I don't see any reason why there would be a security risk.

GOOD LUCK AND HAPPY HUNTING ALL YOU LINUX FANS!

by ninjabob7 on Wed, 2005-12-14 14:50
Cool. Is there a way to get your whole X desktop remotely? That would be even better. Still, very neat article. I had no idea this was so easy to do.


  



All times are GMT -5. The time now is 09:27 PM.

Main Menu
Advertisement

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration