LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-25-2007, 02:52 PM   #1
WRXSTi
Member
 
Registered: Oct 2003
Location: NH
Distribution: SUSE
Posts: 32

Rep: Reputation: 15
VNC console access.


From my windows xp machine I want to vnc to my Linux console... I'm using display 1 but it doesn't seem to work.

vnc to linux box
open console su root
export DISPLAY=localhost:1
xhost +

Does someone know the correct procedure for this as I cant seem get access.
tightvnc
SUSE 10.2

TIA
 
Old 03-25-2007, 02:57 PM   #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
what are you actually trying to do here?? open a console? well you already have by the sound of it, what else do you expect to happen?
 
Old 03-25-2007, 03:08 PM   #3
WRXSTi
Member
 
Registered: Oct 2003
Location: NH
Distribution: SUSE
Posts: 32

Original Poster
Rep: Reputation: 15
I want access the PC console like PC Anywhere.. not just a separate display session.
 
Old 03-25-2007, 03:09 PM   #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
well that's what vnc does... which you're apparently already using successfully...
 
Old 03-25-2007, 03:18 PM   #5
WRXSTi
Member
 
Registered: Oct 2003
Location: NH
Distribution: SUSE
Posts: 32

Original Poster
Rep: Reputation: 15
I'm trying to do this under SUSE.

http://www.linuxquestions.org/questi...d.php?t=110684
 
Old 03-25-2007, 03:34 PM   #6
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
i really don't think you are... that seems to be about very badly writtne X apps which don't connect to current x servers correctly...

how abuot a stab in the dark... if you simply wish to view the :0 display under vnc then try the x11vnc program or the builtin vnc module in more recent versions of xorg.x11 a standard vnc server is not designed to show you existing screens.
 
Old 03-25-2007, 04:44 PM   #7
WRXSTi
Member
 
Registered: Oct 2003
Location: NH
Distribution: SUSE
Posts: 32

Original Poster
Rep: Reputation: 15
x11vnc rocks... thx !
 
Old 03-26-2007, 05:02 PM   #8
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
Let's clear up all the options for you

This post should give you enough info to set up basic remote access for the most typical of machine combinations.

I'll cover Windows-Linux, Windows-Windows, Linux-Windows and Linux-Linux options.

The instructions here are the same whether you are running on VM'S, Real Machines or a mixture of both VM's and Real machines.

Start by testing on a Local LAN first and disable firewalls. Makes testing easier and especially if you have large screens sending 1600 X 1280 or more.

Ensure you also enable Ports 22, 5200 (and in some cases 5900) I'm not sure about that one but the client program you use should explain what you ports you need to enable in its documentation.

If you are on a slow internet connection you won't be happy waiting ages for the screen to appear on your remote workstation which is why I recommend testing this stuff on a Local LAN first.


Before ANY testing ensure that you can access other machines on your network. A simple PING or use the Linux Network Browser / Windows My Network places stuff in Windows Explorer. If you aren't sharing files (SAMBA/Simple File Sharing) then ensure at least your network computers are reachable (Ping is great here).

An easy way of Linux Network File browsing (if you are sharing files with Windows) - especially in KDE -- is just to type remote:/ in a browser, then click the SMB shares folder that appears.

Once this is in order you can start testing.

Windows to Linux.

I'm running a Windows XP Pro Guest on a SUSE SLED 10 Host. I want to connect to a Remote Linux desktop and use the GUI (KDE).

For a decent FREE version of SSH for Windows this works
fine. You don't need all the extra functions of the commercial versions.

http://www.ssh.com/support/downloads...ommercial.html

You can use Putty as well -- this will tunnel if you need it. Download it anywhere --Google will help you out here.

1) Windows ===> SSH to the linux machine. You need to enter the IP address of the Linux machine you want to SSH / login to. On a local (home) network it will probably be something like 192.168.X.X.

If you use the SSH client I recommended (URL previously given in this post above) then just press enter and you'll get prompted by a little screen which requests the Host name , User Name, Port (default 22), and profile (which you can ignore). Enter the IP address in the Host name, and your user ID. Don't login as Root if you want to use your normal user stuff on the remote machine.

2) Login (from the windows screen SSH gives you) and start the VNCSERVER. Usually included with most distros. Login as a USER not Root. Note the number of the display started.

For example
--------------console display---------------
Last login: Sat Mar 24 14:39:25 2007
Have a lot of fun...
blackdog:~ # vncserver

You will require a password to access your desktops.

Password:
Warning: password truncated to the length of 8.
Verify:
Would you like to enter a view-only password (y/n)? n

New 'X' desktop is blackdog:1

Creating default startup script /home/jim/.vnc/xstartup
Starting applications specified in /home/jim/.vnc/xstartup
Log file is /home/jim/.vnc/blackdog:1.log

----------------end of console display-------------------

Note here the display number is 1.

3) On the windows machine start the vncviewer client. You can get clients for FREE from the web. When you insert the IP address of your remote machine also add :52xx after the IP adress. Port is 5200 but the XX is the number of the display the VNCserver commnd returned. In my case it was 1 so the vncviewer ip address will be like this.

192.168.2.3:5201

You'll get prompted for a password and then you are in.

You'll see a bare screen

DO NOT START THE X-SERVER. If you are running KDE type startkde on the console and then everything will be fine.

I don't know about GNOME but I'm sure there's an equivalent start command.

If you try start the X-Server you'll eventually get an error message saying X-Server already started).

Here's a screen shot of what mine looks like.

http://www.1kyle.com/sled10.jpg

If you use tightvnc / ultravnc you might need 01/02 etc instead of 5201, 5202 etc for the port addresses . The documentation should be clear. Also test on a LAN. After it all works you can fiddle around with DNS resolve etc so you don't have to remember IP addresses - especially if your Internet Provider gives you dynamic IP addresses.

When you are finshed Kill the vncserver display with the command vncserver -kill :X where X is the display number you started.

Other Combinations.

Windows to Windows

Simple --just use RDP.

If you are using XP HOME download from MS site. It's included as standard in XP PRO.

Ensure you've enabled the remote machine to accept incoming connections -- control panel ===> system ===>remote.

Also user must have an account on the remote macine. Obvious but often forgotten. Windows XP SP2 will also expect thie user account to be password protected.

As before test with all firewalls off. It saves a LOT of agro when messing about with this stuff.
Haven't a clue about VISTA however. I don't intend to use this for a while - but that's another story for a later time.

Note unless you are using SERVER 2003 Windows without fiddling a bit only allows 1 user so when you RDP a remote Windows session you (or any other user) will be logged off the remote session. You can hack windows XP / Windows 2000 to give 4 users but that level of expertise is beyond me I'm afraid. I have actually seen it done however.

Here's a screen shot of Windows VM on SLED 10 connecting to a Remote Windows VM XP PRO

Note the message that the existing user will get logged off (Windows UGH UGH UGH).

http://www.1kyle.com/rdp1.jpg

Linux to Windows

Use Krdc (included with most Linux Distributions as part of KDE).

As before on the Remote Windows system ensure you've enabled the remote machine to accept incoming connections -- control panel ===> system ===>remote.

Linux to Linux

Ensure on the target Linux system You have started the vncserver if you want to use a GUI such as kde on the remote Linux system. SSH into it from your Local Linux box and start vncserver. Then as for Linux to Windows. Use Krdc.

You start Krdc via the SYSTEM===>Remote access===>Remote desktop

Chose VNC or RDP depending on the target system and whether you are running a vncserver on it. For Windows select the RDP option.

(rdp:/xxx.yyy.zzz.aaa) IP address of your Windows system

For Linux choose the VNC option.

(vnc:/xxx.yyy.zzz.aaa:n) IP address of your Linux system.
The n is the number of the display your vncserver started on the remote Linux system.

Once you see the X-server screen just type startkde.

Don't attempt to type start X or you'll just get an error saying X-Server already started or othe "spurious errors". If you use Gnome then use whatever command that starts Gnome. I never use it so don't know.

When you've finished type vncserver -kill :n where n is the display number the vncserver started with.

Access from outside a Router (via the Internet).

See section on Tunnelling -- later in this post.

Once you've got this stuff all working you can access it from anywhere even from outside your router.

A bit more complicated but ensure all the ports mentioned above are allowed to be opened by your router.

You also need to know the IP address the internet sees you as (get that from your router). If you have a dynamic IP address then use something like ZONEEDIT to set up a DNS. This will allow you to enter a Host name rather than an IP address.


Once you've got it working on a Local LAN / Home network you have actually done 99% of the work.


Tunnelling

Tunnelling is fairly straight forward. This allows you to get to your OWN Network from the public internet and then access all your own machines on your private LAN with their "Internal" addressess such as 192.2.XXX.XXX

1) Ensure that you are connected to the "Public" internet.

2) Start your VNC server on your remote system say with display 10

vncserver :10.

(You'll probly have to SSH to it with its extenal Internet address).

3) now on your LOCAL PC ( i.e the one you are using on the Internet) type in on the console screen you received when you logged on to your remote computer via the windows ssh program the built in Linux SSH command shown below.

ssh -X -L 5910:localhost:5910 jim@XXX.YYY.ZZZ.AAA where the numbers after the @ make up the IP address of your remote system as seen by the Internet.

Don't forget to specify localhost - that's what allows you to use your Internal network from outside the router. You need to specify the 5910 number twice as shown.

replace jim with your user id.


once you've logged on now type

vncviewer :10

You'll get prompted for a password and then you'll see the blank X server screen.

type startkde to get your KDE GUI on to your "Internet" connected remote PC.


You should be on your local (remote !!) system and can access all the computers on that network as 192.168.2.XXX or however you set it up.

Now you are on the HOME side of the router and you can repeat the process to connect to another network using YOUR FIRST NETWORK's security etc.

All from a Hotel Room or wherever.

However if Port 22 is closed (SSH) you *might* have problems getting to your first network but usually SSH is generally left open as people need to often login from all over the place.



If you use Putty (Windows) it's even easier as there is a tunnel config in the setup.

You need your router to allow ports 5900, 22, and the other one's such as 5800, 80 and whatever else you use depending on apps and services on your "Remote" or Virtual Network.

Once you've connected to one Network you should be able to repeat the process (from the First network) to connect to the second.

I don'thave enough machines to try this out completely but in theory so long as you can get to Network A you should be able to tunnel from Network A again to Network B.

Things like ZONEEDIT can help you if you have dynamic IP addresses supplied by your HOME Internet provider.

If you've got a recognizeable domain and use ZONEEDIT (or equivalent) you never need to know the actual IP address of your network outside the router. Typing in xxxx@dogsbody.eu or whatever (depending on your domain registration) will resolve all the IP addresses.

Hope this helps and should cover most cases of remote access.



Cheers

-K

Last edited by 1kyle; 03-26-2007 at 06:10 PM.
 
Old 03-26-2007, 08:54 PM   #9
WRXSTi
Member
 
Registered: Oct 2003
Location: NH
Distribution: SUSE
Posts: 32

Original Poster
Rep: Reputation: 15
Kyle... this is a really great write up !

The information here is excellent... and definitely helpful for me and others to come.

I'll be trying your suggestions and decide which works bests for my needs.

ty !
 
Old 03-27-2007, 01:45 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 it's not *his* write up is it..? http://www.vmware.com/community/thre...07131&tstart=0
 
Old 03-27-2007, 03:16 AM   #11
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
Actually that VMwrite up is MY post (My 2nd name is jim so that post was mine --jimbo45 on the VMWARE site).

I couldn't create a user ID with my first name kyle as it had already been taken).

As you can see the images posted (also on the vmware site) are from my web server (1kyle.com).

I've modified it slightly from the vmware post.

So that Post is MINE --however that's not the point --hopefully this post helps you get this stuff working.

Cheers

-K
 
Old 03-27-2007, 03:29 AM   #12
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
heh, tail firmly between legs!
 
Old 03-27-2007, 05:44 AM   #13
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
Hi there

No probs.

If people find that post helpful perhaps I can modify it a bit and we can turn it into a HOWTO.

I often post on the vmware site as I'm quite a large user of VM's.

Cheers

-K
 
Old 03-27-2007, 06:00 AM   #14
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 yeah, useful stuff i'm sure. i end up over there two, got a stack of esx machines here now, and i'm left to wrestle with the networking on them. yuch. why can no windows admin i've ever met grasp the concept of a vlan?
 
Old 03-28-2007, 02:43 AM   #15
1kyle
Member
 
Registered: Feb 2004
Location: 'Ol Blighty
Distribution: SLED 10, SUSE 10.3
Posts: 722

Rep: Reputation: 32
Hi Acid-k

slighty OT but -

ever tried to explain the concept of "Tunnelling" to a Windows administrator.

Also apart from Windows server NT / 2000 / 2003 then they usually can't seem to grasp the fact that several users can be logged on to a machine at the same time. ("You can't do that --you need a " sprecial Server"). Once you start getting in the realms of Virtual networks etc then "all bets are off".

I only use Windows now when I need Photoshop (still for me the Nr 1 Imaging app),complicated EXCEL macros (Open office is 99% OK but not just quite there yet to replace "power User" excel type stuff) and I have to logon to a corporate SAP system which needs a Windows GUI to access it. I use a Windows VM for this stuff.

In general most Linux distros let you do what you need to get your machines working the way you want.

Windows (apart from installing software) makes any task seem hideously complicated even if you can actually achieve the result you want anyway.

As a side issue have a look at this article where Microsoft can't even provide security for their OWN products. If you are unfortunate enough to have to use OUTLOOK on VISTA have a read of this.


http://www.bbc.co.uk/blogs/thereport...tes_again.html


Have Fun

Cheers

-K
 
  


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
Can't run root access via VNC stefaandk Linux - General 1 08-25-2006 09:22 AM
vnc or remote access question coal-fire-ice Solaris / OpenSolaris 13 08-13-2005 01:06 PM
Whoppix remote console with VNC juanb Linux - General 0 07-15-2005 09:28 AM
only root users can access vnc server dlm4444 Linux - Newbie 1 05-01-2004 02:47 PM
Some windows redirected to console (not in VNC) jswilson Red Hat 6 10-31-2003 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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