LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-12-2006, 04:41 AM   #1
dreamtheater
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
Executing graphical programs on a remote machine


Hello!

I'd like to connect to a remote machine via ssh and start a graphical program there. Right now, when I just ssh to the machine in a terminal window and start the program, my display behaves strangely (flickering and strange colours). So I figure I might need to use vnc.

I've experimented with ssh and vnc but I couldn't figure out how to do this properly.

From all I've read, I still don't understand how to use the vncserver and the vncviewer, ssh tunneling (I guess I need that, don't I?), displays, ports etc. - I'm just confused.

Can someone please point out how to accomplish this?

Thanks a lot!

P.S.: I'm using Mandriva 2007 and KDE
 
Old 10-12-2006, 05:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well essentially vnc will do the job just fine... start the vnc server on the remote machine, connect to it using the client and away you go. one thign you may have been getting confused about is that the default conventional implementation of the vnc server will create a brand new X session, but the mor recent versions of the x11-xorg server contains it's own internal vnc modules which will share the current screen, indeed i'd bet money that what control centre mandrake 2007 uses will have a tick box to enable it in there somewhere. if not you can edit tin /etc/X11/xorg.conf file yourself and add the vnc module to it. i'm not sure of the exact syntax there but google knows it.
 
Old 10-12-2006, 05:49 AM   #3
dreamtheater
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
I forgot to mention: I can't start a vncserver on the remote machine.

I once (in an earlier version of Mandrake) managed to start a new Xsession, then open a terminal window therein, do the ssh connection there and launch the program on the remote machine. I got the GUI of the program in an XVNC window in my primary Xsession. It was complicated but it worked. Now, I can't do it like that anymore. I tried to start vncserver like

Quote:
vncserver :2
and then

Quote:
vncviewer :2
but I get an error message:

Quote:
vncviewer: VNC server closed connection
I have no idea how to resolve this, because the message is not very specific.

Also, if it worked like it used to, I don't want KDE to startup a second time for it takes up so much resources, but that's a different issue, I guess.

So, regardless of what I tried, what I'm looking for is a simple solution to run that remote program on my desktop.

The remote machine, by the way, is a Sun Workstation, which I suspect is the cause for the strange colours metioned above. But as I said before, I had it working already (without strange colours) in an earlier version of Mandrake
 
Old 10-12-2006, 06:09 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you wish to see the exsiting display you would, as above not use vncserver, but the x11-xorg vnc modules. there is also a program called x11vnc which can also export the currently runnign X session by vnc in solution to changing the x server configuration.
 
Old 10-12-2006, 06:09 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
fyi http://www.realvnc.com/products/free/4.1/x0.html
 
Old 10-12-2006, 07:36 AM   #6
dreamtheater
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
When I start x11vnc and then enter
Quote:
vncviewer :0
I get infinetly cascaded Windows opened, showing my desktop.
 
Old 10-12-2006, 07:46 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right... and what would you expect? it's naturally going to do that isn't it? you need to view it from a remote machine...
 
Old 10-12-2006, 10:16 AM   #8
dreamtheater
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
OK, but I still have that one problem: I need some way to render that remote GUI of that program on my PC.

Has anyone got an idea what could be the cause of the vncserver on my local PC closing the connection to the vncviewer on my local PC?

Maybe it's some permissions problem? Any hints how I could cleanly set up vncserver/viewer for an ordinary user to use?
 
Old 10-13-2006, 08:58 AM   #9
dreamtheater
Member
 
Registered: Feb 2004
Posts: 44

Original Poster
Rep: Reputation: 15
OK, I don't know if that was what helped but I added to /etc/hosts.allow

Quote:
ALL : 129.27.168.5 : ALLOW
and after some trying around it suddenly worked with
Quote:
vncserver

vncviewer myhostname:1
 
Old 10-13-2006, 09:52 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well yes that's exactly what the documentation will tell you to do, but that wasn't what you were sayign you wanted...
 
  


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
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 PM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
running graphical program on remote machine abd_bela Debian 1 03-17-2005 07:07 AM
executing programs?!? cmargiol Linux - General 8 10-29-2003 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:41 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