LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   "Graphical Terminal-Session" from Windows to Linux (https://www.linuxquestions.org/questions/linux-desktop-74/graphical-terminal-session-from-windows-to-linux-484734/)

mwildam 09-18-2006 03:12 PM

"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?

b0uncer 09-18-2006 03:27 PM

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.

acid_kewpie 09-18-2006 03:53 PM

you also may want to seperately explore XDMCP and FreeNX

bernied 09-18-2006 04:14 PM

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?

bernied 09-18-2006 04:19 PM

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.

mwildam 09-18-2006 04:34 PM

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.

:cry:

acid_kewpie 09-18-2006 04:43 PM

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.

kuitang 09-18-2006 04:43 PM

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.

mwildam 09-18-2006 04:56 PM

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? :scratch: 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.

bernied 09-18-2006 05:29 PM

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.

kuitang 09-18-2006 08:05 PM

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.

mwildam 09-19-2006 01:30 AM

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?

sn68 09-19-2006 02:15 AM

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

bernied 09-19-2006 01:27 PM

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).

mwildam 09-19-2006 05:23 PM

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


All times are GMT -5. The time now is 03:26 AM.