LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Thread Tools
Old 10-07-2006, 05:31 PM   #1
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41
Thanked: 0
Run remote X apps on remote Xserver


[Log in to get rid of this advertisement]
I have a computer running MythTV, and i was wondering how i could remotely connect to that machine, and start X applications on the already-running XServer?

Thanks, Karl
trollman is offline     Reply With Quote
Old 10-08-2006, 01:42 AM   #2
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 8 and 9
Posts: 64
Thanked: 0
Re: Run remote X apps on remote Xserver

Try Putty and VNC. If your firewall only accepts SSH connections, it is possible to do the following:

1. Use Putty to create an SSH tunnel on your VNC port. I believe that the default VNC port is 5901.
2. Once you are logged in, you have to start the VNC server. On my machine, I just type "vncserver".
3. Start the VNC client on the machine that you created the SSH tunnel on.
4. Connect to "localhost:5901".
5. Type your linux password and your desktop should load up in a window. This is kind of like the linux version of Windows' Remote Desktop.

Let me know if this helps.
jc_cpu is offline     Reply With Quote
Old 10-08-2006, 11:59 AM   #3
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41
Thanked: 0

Original Poster
Thanks for your reply, but this is not what i am trying to accomplish. I will try to explain it a little better.

[Machine A] - My linux machine
[Machine B] - Other linux machine ( LAN, running X-windows)

Machine B is already up and running X, lets say for example, Xine is playing a movie.

I can connect via SSH from Machine A to Machine B, but i can not run X applications because the Xserver is being run by another user on Machine B. I would like to be able to lauch an application into that Xserver instance from another console, which happens to be remote. I hope that clears up my questions.

Karl
trollman is offline     Reply With Quote
Old 10-08-2006, 03:31 PM   #4
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 8 and 9
Posts: 64
Thanked: 0
What I described will log you into your X server on Machine B. Anytime you connect to your linux machine with SSH and VNC, you are logging into the X server. The only catch is that you will be using a different display ("1" in this case). If you already have an instance running on Machine B, you may in theory be able to connect to display 0 with VNC (the display that Machine B is currently using). You would have to check the VNC server documentation for how to run your VNC server on display 0. I've actually never done this before (it's just a crazy idea), so let me know if it works for you.
jc_cpu is offline     Reply With Quote
Old 10-08-2006, 09:30 PM   #5
MasterC
Moderator
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Thanked: 5
Quote:
Originally Posted by trollman
Thanks for your reply, but this is not what i am trying to accomplish. I will try to explain it a little better.

[Machine A] - My linux machine
[Machine B] - Other linux machine ( LAN, running X-windows)

Machine B is already up and running X, lets say for example, Xine is playing a movie.

I can connect via SSH from Machine A to Machine B, but i can not run X applications because the Xserver is being run by another user on Machine B. I would like to be able to lauch an application into that Xserver instance from another console, which happens to be remote. I hope that clears up my questions.

Karl
Assuming you want to launch something over xine, or under xine (while xine is in fullscreen mode) you could just attach and set the env variable, but you'll need to run xhost + as the user running the original x session (to allow remote connections). Then:
ssh -l whoever machineb
export DISPLAY=:0
kwrite funnyfile.txt

This would launch kwrite on DISPLAY:0 (your already running X session) and open the funnyfile.txt which of course contains helarious things you want the person to see when xine stops, things like cat < tail, which we all know will mean cat's got your tail! ha ha ha... I was watching that Simpsons episode where Bart goes to the smart school and they make stupid jokes like that, sorry.

Cool
MasterC is offline     Reply With Quote
Old 10-08-2006, 10:01 PM   #6
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41
Thanked: 0

Original Poster
Quote:
Originally Posted by MasterC
Assuming you want to launch something over xine, or under xine (while xine is in fullscreen mode) you could just attach and set the env variable, but you'll need to run xhost + as the user running the original x session (to allow remote connections). Then:
ssh -l whoever machineb
export DISPLAY=:0
kwrite funnyfile.txt

This would launch kwrite on DISPLAY:0 (your already running X session) and open the funnyfile.txt which of course contains helarious things you want the person to see when xine stops, things like cat < tail, which we all know will mean cat's got your tail! ha ha ha... I was watching that Simpsons episode where Bart goes to the smart school and they make stupid jokes like that, sorry.

Cool
Thank you, this is exactly what i was looking for. Let the games begin...
trollman is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
How to prepare XServer for remote use sarmadys Linux - Networking 4 07-30-2006 05:27 PM
Connecting to remote XServer ibrar_ Linux - Networking 4 07-09-2004 04:22 AM
Remote login with root from XServer(SUSE 9.0) Hasegagwa Linux - Networking 11 06-25-2004 02:04 AM
SSH use remote xserver? breenbaron Linux - Networking 4 06-17-2004 08:33 AM
setup Xserver for remote access drwolfson Linux - Networking 2 12-11-2003 11:57 AM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration