LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-24-2009, 10:47 AM   #1
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Rep: Reputation: 23
TightVNC on Slackware 12.2 ???


Hi Slackers;

I have downloaded and installed TightVNC from slackbuils.
I want to establish graphical desktop connection between two Slackware machines (Slack_1 and Slack_2) attached to the same DSL router.

Slack_1 ----------> Slack_2 (Target Machine)

First I started the "vncserver" and did password settings on Slack_2, then started "vncviewer" on Slack_1 and entered IP Adress of Slack_2 (192.168.2.4) assigned by DSL Router on a dialog box. But I could not establish connection with Slack_2.

Code:
hzyss@slackware:~$ vncviewer
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server
hzyss@slackware:~$
What can cause this problem?
 
Old 01-24-2009, 11:02 AM   #2
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
What about the port settings?
 
Old 01-24-2009, 11:21 AM   #3
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by Ilgar View Post
What about the port settings?
These machines are at home and connected to internet on the same DSL router. I do not know how to configure port settings. I looked for port settings, but I was not able to find. How can I do? Using router graphical interface or another way?
 
Old 01-24-2009, 12:09 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
On Linux, a vncserver can not use the port that X Window already uses. It will open a port one number higher if that is available (and otherwise keeps incrementing until it does find an unused port number).
So, your vncviewer will have to connect to "192.168.2.4:1" in order to find the vncserver.

Eric
 
Old 01-24-2009, 12:36 PM   #5
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
Alien, isn't what you're referring to "screen" or "display" rather than port? Besides, VNC shouldn't open a new display, it should allow the remote control of the existing one. In case of VNC client, the 192.168.2.4:1 means port #1, but of course it's in the reserved range.

Phys, the VNC server on the target machine should be listening a certain port number. You can check the manpages of the server software to see where to configure it. Then you can connect to ipnumberort (e.g. 192.168.2.4:1234).

Last edited by Ilgar; 01-24-2009 at 12:37 PM.
 
Old 01-24-2009, 12:42 PM   #6
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
Ack, you're right Alien, ip:num is also interpreted as ip:display (so obviously :1 is supposed to mean display #1). I've used TightVNC many times before, but always for remote connection to remote Windows hosts. Apparently there are other options when you have a Unix host.
 
Old 01-24-2009, 02:47 PM   #7
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 23
Thank you very much ilgar and Eric. Trying "192.168.2.4:1" and "192.168.2.4:2" worked. Maybe I started "vncserver" two times. Now I can connect to Slack_2.

Tomorrow, I am going to try to connect to Slack_1 from outside of my local home network. Internet provider assigns IP dynamically for my home network. This time what procedure am I going to follow? Is it enough to learn IP of Slack_1 from "http://www.showmyip.com/" and following the same procedure as you mentioned above?
 
Old 01-24-2009, 07:00 PM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
Depends on whether you are port-forwarding the VNC portnumber. If you don't do port-forwarding there is no way you can access that vncserver from the internet.
Also I would strongly advise against trying that, because the VNC protocol is unencrypted and the passwords you type are transmitted in the clear - any one can sniff them out.

Eric
 
Old 01-25-2009, 05:21 AM   #9
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by Alien Bob View Post
Depends on whether you are port-forwarding the VNC portnumber. If you don't do port-forwarding there is no way you can access that vncserver from the internet.
Also I would strongly advise against trying that, because the VNC protocol is unencrypted and the passwords you type are transmitted in the clear - any one can sniff them out.

Eric
Thanks for your advise, Eric. You say that VNC transfers passwords between viewer and server without encryption. That is very insecure. Maybe creating a user account for that purpose and running server on this user provide a little bit security. If someone connects to my computer over the internet solving VNC server password controlling the VNC's insecure password transfer protocol, can he/she obtain the control of outside the user home directory on Slackwae without knowing root password? (Root password is strong enough.)
 
Old 01-25-2009, 05:45 AM   #10
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
He shouldn't be able to do that. Nevertheless, it would probably increase the risk.

Since you're trying to connect to a LAN computer, the speed of connection should be quite high. Do you really need VNC? You may consider ssh with X11 forwarding for example.
 
Old 01-25-2009, 06:37 AM   #11
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 23
Thank you ilgar;
Quote:
Do you really need VNC?
I want to make a graphical desktop connection with another Linux machine. If something does this, no matter what program it is.
Quote:
You may consider ssh with X11 forwarding for example.
I use ssh for connecting an AIX server user account. Is it possible to start user's X session using SSH? I login to server only in a terminal view.
 
Old 01-25-2009, 07:17 AM   #12
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
Do you need the entire desktop environment running? If not, that is, if you only want to be able to run graphical software remotely, SHH + X11 forwarding will do. For remote connections over the internet, speed might be an issue (of course, VNC isn't fast either) but at least with a LAN connection shh + x11 should work with no noticeable lag.

To enable this, on the ssh server side, you should enable X11 forwarding with the line

Code:
X11Forwarding yes
in sshd_config (usually under /etc/shh) -- don't forget to restart the service for the change to take effect.

On the client side, you can use the -X option to request X11 forwarding (i.e. ssh -X user@host). You can make X forwarding request the default by putting the line

Code:
ForwardX11 yes
in ssh_config (not to be confused with sshd_config). Then you don't need to use -X.
 
Old 01-25-2009, 08:08 AM   #13
phys
Member
 
Registered: Jun 2006
Location: Istanbul, Turkey
Distribution: Slackware
Posts: 90

Original Poster
Rep: Reputation: 23
I am going to try "SSH X11 forwarding method" applying your instructions, Ilgar. I understood how I can connect to a server account from my home (ssh -X user@host), but there is still problems in my mind about how I can connect to network at home from outside. What will I type for host domain name of my home network? Does "ssh -X user@IP_Number" work? I do not know how an server OS and ordinary OS differ from each other.
 
Old 01-25-2009, 09:14 AM   #14
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Yes,

Code:
user@ip_address
will work.

You may want to look into one of the dynamic address services, like dyndns.org, no-ip.com, amongst others. These services allow you to run a small client app on your machine which will update your external ip address, and allow you to reach your system with an address like:

Code:
phys.myvnc.com
, and many others.

You may also consider connecting to vnc through an ssh tunnel. Along the lines:

Code:
ssh -L 5900:localhost:5900 user@<your_home_machine>
and then connecting:

Code:
vncviewer localhost:5900
I hope I haven't muddied the waters for you, just providing options.

cheers,
 
Old 01-25-2009, 09:17 AM   #15
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
I don't quite get what the problem is -- you use the user@ip format regardless of whether it's a LAN or internet connection. In your case you have 2 computers on the same LAN.

To have X forwarding, the ssh server (i.e. the one on the target computer) must be configured to allow X11 forwarding. This you do by modifying sshd_config. To see how it works, you may even test it on your computer by connecting to localhost (i.e. ssh user@localhost).
 
  


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
Problems using TightVNC in Slackware crabber338 Slackware 3 11-15-2005 10:18 AM
Slackware with tightVNC Alinuxnoob Slackware 4 09-06-2004 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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