LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-07-2006, 04:31 PM   #1
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41

Rep: Reputation: 15
Run remote X apps on remote Xserver


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
 
Old 10-08-2006, 12:42 AM   #2
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 14
Posts: 71

Rep: Reputation: 15
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.
 
Old 10-08-2006, 10:59 AM   #3
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41

Original Poster
Rep: Reputation: 15
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
 
Old 10-08-2006, 02:31 PM   #4
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 14
Posts: 71

Rep: Reputation: 15
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.
 
Old 10-08-2006, 08:30 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 10-08-2006, 09:01 PM   #6
trollman
Member
 
Registered: Jan 2004
Location: Virgina Tech
Posts: 41

Original Poster
Rep: Reputation: 15
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...
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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

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