Remotely run command in local X session?
I have an HTPC (with an HDTV as the monitor) running Ubuntu Karmic, and various other computers in the house. Sometimes I want to run X11 applications (usually, but not always, XBMC) on the HTPC displayed on the HDTV, but I don't want to have to physically go to the HTPC to do so; I want to do so from another computer in the house.
If I use ssh then, of course, the applications don't run because X isn't started on the connection. I don't want to use ssh -X or ssh -Y because I don't want to forward the display to my laptop: I want to do things in the X session already running on the HDTV. I don't want to use VNC or its ilk because sharing a 1080p display over an 802.11g network is nobody's idea of fun.
What I w开发者_如何学JAVAant is a command to run in a remote bash shell that executes in the local X session. Any ideas?
Try looking into the "xhost" command
Seems like I recall, 20 years ago, "xhost +" or something like that would cause your local X server to accept all incoming requests to create windows on the screen or grab input devices.
This is probably still reasonable to do only if you are behind a home firewall.
On the machine that actually runs the program whose display you wish to forward, you specify a -display option or DISPLAY env variable to forward the graphics window.
X security has changed in the past 20 years, I'm sure... so this may or may not work for you -- but I notice the xhost command is in my ubuntu 9.10
精彩评论