PDA

View Full Version : VNC - start service at boot - stay on?



sternfan
22nd May 2006, 08:15 PM
Hi all,

This issue is driving me nuts... Background - I have a small school lab with 6 FC5 computers for kids to use. So far it has been a success - they are even making a student newspaper using openoffice.

This lab is in a remote building connected by a WAN link. I need to be able to do updates, software installs etc remotely. I have VNC enabled etc.

The problem - anytime anyone logs off or the PC is rebooted - VNC stops working. It appears that an account has to be logged on and "up" for VNC to see the FC5 boxes... I can ping the FC5 boxes, but cannot VNC to them by hostname or IP.

So - how do I get VNC to run at all times??? So I can reboot, logon and work on these remote PCs???

Any help greatly appreciated,

Rob

jhetrick62
22nd May 2006, 08:30 PM
Sternfan, BTW, I appreciate your handle.

I have seen this problem before on FC4 and could not figure out why it was happening, but, I switched to running vnc over xinetd and that solved the problem. I haven't installed it the other way in a while. I followed Firewing's setup found here:
http://forums.fedoraforum.org/showthread.php?p=448977

I hope this helps. I run it internally without ssh and remotely through ssh when I'm on the road.

Jeff

sternfan
24th May 2006, 11:05 PM
Sorry about the delay on the response - thanks for the help. I should be at the lab this friday and will try your suggestion.

And yes, Stern helps me get through the day...

Rob

backside7
25th May 2006, 02:09 AM
Here's another good link I used in the past.

http://www.raoul.shacknet.nu/2005/11/10/configure-vnc-server-in-fedora/

wdower
25th May 2006, 02:13 AM
I had the same problem. I found the following link to work perfectly in Fedora Core 4 and Core 5.
http://ulyssesonline.com/2006/02/26/vncserver-on-fedora-core-4/

The most important line in this tutorial was:
chkconfig --level 345 vncserver on
Then run:
chkconfig --list vncserver

Follow the link for more specific info.

sternfan
5th June 2006, 07:30 PM
Ok - I tried the tip from jhetrick62, step by step, and it isn't working. I tried it on 6 different FC5 boxes. No firewall is set on these FC5 boxes...

Any idea where I can go from here? Any way to check my current config?

Thanks,
Rob

jhetrick62
5th June 2006, 07:42 PM
Rob,

Did you check your services and insure that xinetd is running and that vncserver is off?
service xinetd status
service vncserver status

Also, when bringing up the GUI for services, in the "on-demand" tab, do you see services for vnc-1024 and vnc-1024x8 in there and enabled?

Jeff


Also, I run firewalls in all three boxes that I use this on. I just opened the ports for the

sternfan
5th June 2006, 07:56 PM
wow you are fast...

I can't check anything now - these FC5 boxes are at a remote site across a WAN link (the whole point of this exercise). But I should be there wednesday or thursday.

Q - why would I want the VNCSERVER service off??? shouldn't it be on? When I did the lab, I followed the instructions exactly, but now that I read this I am just wondering.

Rob

jhetrick62
5th June 2006, 08:12 PM
Rob,

You really aren't running "vncserver" when you do it this way, you are running a a remote "x" session through the xinetd dameon. You still use vncviewer to access it, but you really aren't running the daemon "vncserver".

If you followed the instructions that Firewing posted, the line "chkconfig vncserver off" should have turned it off. As I said, I run this with firewalls and from the viewing standpoint, it looks exactly the same as using vncserver that you are accustomed to, but you should be running this over sshd also.

I log into each box over sshd using "putty" if on a windows system and using ssh statement if on Linux box. I then access the GDM using a vncviewer through the ssh tunnel. This keeps it secure.

Another good thread discussing this method is: http://www.fedoraforum.org/forum/showthread.php?t=1606

Goodluck. I just happened to have Firefox open and I keep a gmail notifier extension and that is where my forum posts come to me at. That's why so quick today.

Jeff

sternfan
8th June 2006, 06:34 PM
At the lab now...
xinetd status = running
vncserver status - Xvnc is stopped

I go into the services gui, on-demand, and the two VNC services are at the bottom and are both running.

FYI - the gui services says that vncserver (Xvnc) is stopped.

What now?

Rob

sternfan
8th June 2006, 06:38 PM
Ok - looks like there is some progress...

I can connect with VNC, but I only get the X mouse cursor... No desktop, no icons - nothing.

Rob

jhetrick62
12th June 2006, 03:11 AM
Sorry, I was out of town for the entire weekend on business. I'm guessing that maybe your video card isn't set up to handle the gdm settings used in the vnc specifics. I could not access the 1024x8 until I set mine.

Post copy of xorg.conf when you have time or just check to see if the resolutions and sizes specified exist in the xorg.conf file.

Jeff

sternfan
15th June 2006, 06:09 PM
Below is the xorg.conf from my fc5 box. I took the liberty of adding the last display settings. Does this look right to get VNC running the way I want?

Thanks,
Rob
# XFree86 4 configuration created by pyxf86config

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, a font server independent of the X server is
# used to render fonts.
FontPath "unix/:7100"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection

Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Dell E772p"
DisplaySize 300 230
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 70.0
VertRefresh 50.0 - 160.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "i810"
VendorName "Videocard vendor"
BoardName "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

sternfan
15th June 2006, 06:46 PM
Update - after putting in the third section:

SubSection "Display"
Viewport 0 0
Depth 8
Modes "1024x768" "800x600" "640x480"

I reboot, test the VNC and still NOTHING. Yes, this is still driving me nuts...

Rob

sternfan
20th June 2006, 06:07 PM
Just wanted to throw out another request for help on this thread, I am working on this lab today and would love to get this resolved.

Any help appreciated!

Rob

jhetrick62
20th June 2006, 07:54 PM
Rob,

How are you testing it? Bringing up vncviewer and typing the ip address?

Jeff

sternfan
20th June 2006, 08:03 PM
I go to another FC5 box, open VNC viewer & type in the IP or hostname - both work in the sense that I can see a connection open. But all I am getting is an "X" that does nothing - no gui, nothing (I can move it with the mouse however).

jhetrick62
20th June 2006, 08:11 PM
Are you getting any error messages in the terminal screen after it fails?

One of my thoughts is to try enabling X with a generic driver such a "vesa" to see if this solves the problem.

Jeff

sternfan
20th June 2006, 08:41 PM
No error messages, nothing but the X. I haven't had any video problems, these are older PCs (HP Vectras - 866mhz) with onboard video - nothing very exciting - so I doubt if this is a driver issue.

And thanks for your help, though I am cosidering just giving up on the whole issue.

Rob

jhetrick62
20th June 2006, 08:56 PM
Sorry to hear that. I think it is a driver issue as you are getting through on the port and attempting to display a screen, but either the X driver won't display it properly or the viewer can't handle it. I'm running it on an older PIII, 500 mhz myself, but the other machines are much newer with newer graphics cards.

Jeff

sternfan
20th June 2006, 09:06 PM
Ok - thanks for the help. Not sure where to go from here. What I find puzzling is that VNC works, if someone is logged onto the FC5 box (kind of defeating part of the use of VNC). I just tested this now on two FC5 boxes, VNC works perfectly. If I loggoff the second/remote PC - VNC no longer works... Very weird.

Just a thought - I wonder if this isn't FC5 related?

Rob

jhetrick62
20th June 2006, 09:08 PM
Do you have to log on with the same user that is currently on the box or can you then log on with any user?

sternfan
20th June 2006, 09:13 PM
Any user - I am in root right now, VNCing into a box with the student account running.

jhetrick62
20th June 2006, 09:17 PM
Okay,

I'm also at one of my boxes. When you open gdmsetup, under remote tab, is the "Style" set to same as local?
Also under Remote tab, "Configure XDMCP" is "honor indirect requests" checked?
Under "User" tab, I assume that "Include all users from /etc/passwd" is checked?

sternfan
21st June 2006, 01:53 PM
Sorry, I had to leave the lab and go elsewhere. I won't be back to it until probably the middle of next week (such is the pain of having a network with remote segments).

Thanks for the help,
Rob

jhetrick62
21st June 2006, 03:29 PM
This seems strange that you can log in as long as someone else is on the box, but at no other time. You may pose this problem directly to FireWing, as he is the author of the HOWTO thread and very knowledgeable. I reffered someone else to this for vnc and he had success within his own network, but now has to enable access through the router for remote so it definitely should work and as I say, I use it myself.

Firewing may have some thoughts that are better than mine.

Goodluck,
Jeff