LinuxQuestions.org
Review your favorite Linux distribution.
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 09-18-2006, 04:12 PM   #1
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Rep: Reputation: 15
"Graphical Terminal-Session" from Windows to Linux


I want to connect from a Windows PC to my linux machine getting a new graphical session - so use the Linux like a Windows Terminal Server.

What possibilities do I have? - I tried Cygwin X-Term but did not work (or I understand its purpose wrong)

I tried with putty (there is an option for that) which also I did not get to work.

Any hints?
 
Old 09-18-2006, 04:27 PM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Umm not sure what you're trying to achieve?

1) if you want a text console session through a graphical app that has menus (i.e. not just plain "MS DOS"), PuTTY or SSH Secure Shell is your choice. Just sounds like this is not what you want.

2) If you want the Linux desktop (or some graphical applications from it) "come to you", i.e. you want to run a calculator from the Linux machine so it's visible on your Windows screen, you need a special "X layer" on top of your Windows -- there are some, but all of them that I know, are non-free so you'll have to pay for them. Windows can't handle X11 forwarding itself, so..google. If X11 forwarding is what you want, you can't solve it out just by downloading a fancy PuTTY.
 
Old 09-18-2006, 04:53 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
you also may want to seperately explore XDMCP and FreeNX
 
Old 09-18-2006, 05:14 PM   #4
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Perhaps vnc is what you want. You install a vnc server on the linux machine - the package is called vncserver in all distros that I've seen it. Then you install a vnc viewer on the windows machine - I use TightVNC and it works fine.

You ssh into your linux machine with PuTTY, with a tunnel on port 5901 (that's the default, you can change it, but it's tunnelled, so no need), then start up vncserver. Then fire up the vnc viewer on the windows box, and direct it to localhost:5901.

And you have your linux desktop on your windows machine, it can even be fullscreen.
is that what you wanted?
 
Old 09-18-2006, 05:19 PM   #5
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
I use vnc, and also use XDMCP through cygwin, for a remote desktop from a headless machine. XDMCP is a little better in responsiveness, but was a nightmare to set up, and I can't help you with that because I've not looked at it since I made it work, and that was a long ime ago. By comparison vnc is fairly straightforward to get going. It may just work with all the defaults. Of course, if all else fails, read the man pages.
 
Old 09-18-2006, 05:34 PM   #6
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by b0uncer
2) If you want the Linux desktop (or some graphical applications from it) "come to you", i.e. you want to run a calculator from the Linux machine so it's visible on your Windows screen.
That is exactly what I want and I want it as a new session while another person is working on his own there on the same machine.

Quote:
Originally Posted by acid_kewpie
you also may want to seperately explore XDMCP and FreeNX
This would be ok, if the workstation from which I want to connect to the linux host would also be Linux - but is Windows in my case. I want to get a graphical linux session displayed on a Windows system.

Quote:
Originally Posted by bernied
Perhaps vnc is what you want.
The VNC I got already to work and works fine. - But gets the current desktop. Is good for remote help for the user but bad if I want to work independently in a second session.

Quote:
Originally Posted by bernied
also use XDMCP through cygwin
This sounds interesting (I have the Cygwin installed) if I get a second session then because the Linux host is in use by another user.

Quote:
Originally Posted by bernied
XDMCP is a little better in responsiveness, but was a nightmare to set up, and I can't help you with that because I've not looked at it since I made it work, and that was a long ime ago.
 
Old 09-18-2006, 05:43 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
FreeNX has windows clients too. it is essentially a heavily padded out version of VNC with a very intersting (to me at least) authentication mechanism and such like.
 
Old 09-18-2006, 05:43 PM   #8
kuitang
Member
 
Registered: Sep 2005
Distribution: Slackware, Ubuntu, OS X
Posts: 58

Rep: Reputation: 15
Use X on Cygwin. What I do is use xhost on the X server (the Windows computer in this instance). Then I ssh over to the remote machine and set DISPLAY=x.x.x.x:0.0 and then I run sh .xinitrc to load the desktop. Works fine for me. Of course, you probably want to write a script that does all this automatically.
 
Old 09-18-2006, 05:56 PM   #9
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie
FreeNX has windows clients too.
I will have a look on it - thanks.

Quote:
Originally Posted by kuitang
Use X on Cygwin. What I do is use xhost on the X server (the Windows computer in this instance).
Oh, the Windows is the X-Server? I always thought it is the other way round and the Windows is the Client here. This changes things - I will try and think of this new aspect - thanks.
 
Old 09-18-2006, 06:29 PM   #10
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Quote:
The VNC I got already to work and works fine. - But gets the current desktop. Is good for remote help for the user but bad if I want to work independently in a second session.
Simply start up another vncserver and you will have a new session. The second session will be on port 5902, or you can specify the port. I think there is facility for user-specific passwords, but don't know how secure this is, which is why I always tunnel through ssh.

And you can leave the session running and pick it up later - like a graphical 'screen'.
Hmmm, sounds like someone's paying me for this - will stop there.
 
Old 09-18-2006, 09:05 PM   #11
kuitang
Member
 
Registered: Sep 2005
Distribution: Slackware, Ubuntu, OS X
Posts: 58

Rep: Reputation: 15
No, I believe you have mistakened. X-Server means the computer displaying the screen. This is because the X-Server "serves" keyboard and mouse input to "clients," which are the individual programs. In each case, the X-Server is actually the client (the Windows computer) in your case.

Though you certainly can use VNC, I greatly recommend using X with a foreign DISPLAY. You don't have to go through the headache of XDMCP this way either. This is because when you use X, the host computer (the Linux one, the one running the programs) suffers no performance penalty except for bandwith utilization. Instead of drawing to your screen, your programs draw over the network. When you use VNC, it works a lot like MS-RPC: VNC captures your screen and sends it to the client. This method is much slower the X and unnecessary.
 
Old 09-19-2006, 02:30 AM   #12
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kuitang
X-Server means the computer displaying the screen.
Aha.

Quote:
Originally Posted by kuitang
Use X on Cygwin. What I do is use xhost on the X server (the Windows computer in this instance). Then I ssh over to the remote machine and set DISPLAY=x.x.x.x:0.0 and then I run sh .xinitrc to load the desktop.
I tried this (to another Linux host in the office) now and there I get "sh: .xinitrc: No such file or directory" after command "sh .xinitrc" (being root).

Quote:
Originally Posted by bernied
Simply start up another vncserver and you will have a new session. The second session will be on port 5902, or you can specify the port.
I think I don't understand well - Do I get a new login when I connect to port 5902 again to the machine?

Last edited by mwildam; 09-19-2006 at 02:32 AM.
 
Old 09-19-2006, 03:15 AM   #13
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
You can also try XManager software to connect to linux machine from windows, it can connect to linux machine with ssh & give you a terminal, on terminal when you type nautilus, or whatever file browser is there you will get file browser & desktop. Else you can type the application name to get it started with gui eg kwrite etc.
Edit: And you can run multiple instances of "xstart" to start multiple sessions with same machine

Last edited by sn68; 09-19-2006 at 03:17 AM.
 
Old 09-19-2006, 02:27 PM   #14
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Back to the vnc thing.
Quote:
Originally Posted by mwildam
I think I don't understand well - Do I get a new login when I connect to port 5902 again to the machine?
No. You 'log in' via ssh. Then you start vncserver - Xvnc is the application that is started by the vncserver command. Xvnc creates a virtual X environment, then executes whatever it is told inside that environment, generally startx, so this will start you default desktop environment. So it is executed as the user who logged into ssh and ran the vncserver command.

This virtual X environment is then available to anyone who uses a vnc viewer, pointed at port 5902, and who has the correct password. If you tunnel through ssh then this port need only be open to local users (ie on the machine that you are serving vnc from).
 
Old 09-19-2006, 06:23 PM   #15
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
OK, I finally got it to work - the following was needed:

xinetd had to be installed
vnc-ltsp-config.noarch had to be installed (=Xvnc)

Then in /etc/gdm/custom.conf set
Code:
[xdmcp]
Enable=yes
then create the file /etc/xinetd.d/xvnc with the following content (the port 5950 is a sample):
Code:
service xvnc
{
        type            = UNLISTED
        socket_type     = stream
        protocol        = tcp
        user            = nobody
        wait            = no
        disable         = no
        port            = 5950
        server          = /usr/bin/Xvnc
        server_args     = -inetd -query localhost -once securitytypes=none
}
(Re)start the xinetd service with: xinetd restart

On the firewall open the port 5950 (or the one you used respectively).

From the Windows open VNC to <linuxhost>:50

Unfortunately I cannot log in as root - it tells me "The system administrator is not...
" (error message not displayed until the end).

I also tried with CygWin but there I get only an empty x-window after ssh (with X11 forwarding) and then executing
run XWin -query <ip> -clipboard
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"mythtv-setup" giving "Session management error: Authentication Rejected" Mitchua Ubuntu 0 10-09-2005 05:32 PM
KDE "Logout" and "Lock Session" menu restoration powah Linux - Software 3 03-29-2005 09:02 PM
KDE "Lock Session" and "Logout" menu restoration tcma Linux - Software 0 01-29-2005 12:12 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-22-2003 12:47 AM


All times are GMT -5. The time now is 01:39 PM.

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