Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VNC 1

Status
Not open for further replies.
May 15, 2000
245
US
This is going to sound a little rediculous, considering how easy it is to set up VNC server in Linux, but I can get it to run. I started it, it asked for a password, I verified, then it gives as error "socket failed, invalid argument". I'm not a coder, but I understand a little by reading it. I can't seem to figure out what it's stopping on. Please advise.
Thanks,
Domenick

Domenick Pellegrini
dpellegrini@yahoo.com

 
Sounds like a permissions problem. When you can start a server process that binds a socket or any i/o channel
you have the correct permissions. When you cannot connect to this i/o channel remotely, (as most of us know) you
have a firewall or acl(xinetd restriction, tcpd) problem.
When the service reports a "socket error" you either have
misconfigured the install or you do not have the correct
permissions.

By the way-if you are not dealing with m$ hosts why not
just run a distributed X environment?
 
It's a file server for a Windows and Netware network. As far as permissions go, I'm logged in as root, is it possible that root is currupted and cannot do this task? If I telnet to the host using my user id I get a permission denied. The server is not accessing or being accessed through a firewall, so that's not relavent. But tell me more about this acl(xinetd restriction) problem. It's a newly installed server, not custom installation was done, just click and install. I'm a linux newbie, so I'm a little behind the learning curve on this one.
Thanks

Domenick Pellegrini
dpellegrini@yahoo.com

 
If you are running xinetd it is entirely possible that some services running from xinetd are locked or disabled.
This should not apply to vnc of course. The telnet problem sounds like a xinetd/acl problem.
By default on most distros xinetd disables many services.
You have to edit /etc/xinetd.conf and enable those services. man xinetd.conf for options in the config.
some versions of vnc may not be compatible. I used to run it but felt that it was too large a security hole.
it has a java client that listens on a high port that you
can connect to with a web browser: run nmap against the
host and see what listening ports you pick up.
Also lsof | grep : or lsof -i are big helps if you don't
want to scan your own hosts for some reason.
You are installing some dangerous stuff for a linux newbie.
be aware of this;-)
 
Thanks for the info. I'll have a look at the xinetd.conf file and see what happens. As far as security, It's in a secure environment. It's on a novell network (ipx) and I'm only running IP on the Linux box. So I'm not too concerned about anyone getting on the production network. It's more or less a test server for me to learn Linux and maybe later I'll make it available as a file server or network monitorin tool. But thanks for the advise.


Domenick Pellegrini
dpellegrini@yahoo.com

 
Hi,



The VNC problem is a bit odd. From what I can see it only binds to non-privileged ports, i.e. those > 1024. I can quite happily run the server element on linux as a regular user. The ports in use appear to be 5801, 5901, & 6001. The ports vary dependent on if you invoke as 'vncserver' or 'vncserver :2' , etc. The latter gives 5902 & 6002 for example. It all looks a bit like X11 really.



I could only guess that you had something already using the target ports or had a dodgy version of vnc. If you didn't get yours direct maybe try downloading via -->


On the telnet query, there are a couple of things. Firstly many xinetd services packaged by redhat have 'disable=yes' in their config file so you have to actively turn it on. Apart from editing the file, the easiest way in redhat is just to do '/sbin/chkconfig telnet on'. The other possible problem is that PAM security prevents root logging in on except on ttys shown in /etc/securetty. The control file is /etc/pam.d/login which would have 'auth required' for the pam_securetty.so module. Apart from using ssh, a simple solution (which actually defeats the whole purpose of the security in the first place) is to telent as an ordinary user then 'su' to root.



Regards
 
I downloaded the VNC product from the link you posted. I origionally got it there but it's still giving me a problem I'm not going to worry about it too much at this point. I can still telnet and use webmin to do most everything I need. The GNOME from a remote node would have been nice, but it's not absolutely necessary.
Thanks

Domenick Pellegrini
dpellegrini@yahoo.com

 
The errors I'm getting are:
No such file or directory/usr/bin/perl (I checked it's there)
: command not founderver (repeated many times)
/usr/local/bin/vncserver: =: command not found (repeated manytimes)

: No such file or directoryrdb $HOME/.Xresources\n.
: command not founderver: xsetroot -solid grey\n.
/usr/local/bin/vncserver: xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP De
: command not found

/usr/local/bin/vncserver : line 47: syntax error near unexpected token ';'
/usr/local/bin/vncserver: line 47: "twm &\n");

This was a vanilla install of both redhat and vnc. If anyone has any ideas please let me know.
Thanks,
Domenick



Domenick Pellegrini
dpellegrini@yahoo.com

 
Here's how I install VNC on RedHat 7.1, it works every time without fail. No exceptions.

1. Get the tarball and extract it into a directory (any directory).
2. Copy all of it into /usr/bin
3. Run vncserver (as root) from a command shell.
4. Supply and confirm the password.
5. Go to /root/.vnc/ and open xstartup using vi or whatever editor you prefer. Make it look just like this:

#!/bin/sh

gnome-session &

That's it, nothing else. Trust me.

6. Run vncserver again, this will start session 2 using the new parameters. You should hear the hard drive on the linux box chugging a bit as it loads Gnome.

7. Go to a client and open servername:2 (or serverIP:2 if you don't have DNS or WINS on the network).

If this doesn't work, you have something else WAY broken. I have done this dozens of times without fail. For additional troubleshooting help, see the .log file in the /root/.vnc directory (there is one from each running session).

One common problem is not having the server hostname setup properly. Make sure you have an entry for it in hosts.conf.

By the way, use webmin. It is really sweet, it makes all of this very easy.

If Telnet isn't running, you probably didn't install it (i.e. you specified "Workstation" in the setup), or you just need to tell it to start. Webmin makes this easy in servers/extended internet services, Change it to "service enabled" YES, save it, and apply the settings at the bottom of the page. It should work now.

Make sure the hostname is OK. Everything is difficult if it isn't.

Cheers,

Steve, former Linux newbie.
 
Make sure there is a Xserver installed.
rpm -qa|grep X should return about 4 or more
XFree86- Tony ... aka chgwhat

When in doubt,,, Power out...
 
Well still no luck. Tried all your tips.
thx

Domenick Pellegrini
dpellegrini@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top