Can't access Unbuntu rig running xVNC.

Soldato
Joined
4 Jan 2004
Posts
20,802
Location
¯\_(ツ)_/¯
Ok, I'm access this machine fine, but then my rebooter crashes so I have to reboot it.

Now when I try to connect it tries, I type the password, but then the connection just dies.

Does anyone know how I can reboot this machine without having to drive 10 miles and reboot it physically? :(
 
Were you connected to it when the router died?

Maybe the VNC Server still thinks you are connected, and so it not allowing any more clients to connect? (Have seen this before, just a thought).

If this is the case, maybe worth waiting a while and trying again (and hope it realises and times out)

If you have SSH enabled like billytheimpaler says (and have the ssh port (Usually 22) forwarded through your router that would be perfect)
EDIT: Just seen your reply above, scrap this idea then ;)

Are there any other machines on that remote network you can VNC into? as then you maybe able to do some RPC to issue a reboot.

//TrX

EDIT: another thought, I very much doubt it.. but do you have web facing router admin access enabled. As rebooting the remote router would cause the network link to the machine to bounce and reset any open TCP connections that maybe confusing the VNC server.
 
Last edited:
Just tried again, it now works....

The connection was active when the router crashed, so I guess the Linux box thought the old connection was connected for a while...

Happens sometimes, glad it sorted itself out :)
I think one of the Xvnc server options allows you to specify 'allow multiple simultaneous clients' which would avoid this delay in future if it happens again.

//TrX
 
^ Sounds like a plan... :D

Should be more fun than trying to work out how to access Windows shared folders thru samba shares thru terminal... :(
That's actually pretty easy. First you make sure that you've got the necessary tools
sudo apt-get install smbfs smbclient

Then you make a directory in which you can mount it
sudo mkdir /media/sambaaaaaaaaaaaaaa

Lastly you mount it
sudo mount -t cifs //hostess/sharenameesses /media/sambaaaaaaaaaaaaaa -o iocharset=utf8,file_mode=0777,dir_mode=0777
 
Happens sometimes, glad it sorted itself out :)
I think one of the Xvnc server options allows you to specify 'allow multiple simultaneous clients' which would avoid this delay in future if it happens again.

//TrX

The best option as mentioned here would be to configure one of two things. Either configure your VNC Sessions to be shared, which would allow multiple VNC Viewers (providing they have the right credentials) to connect and share the connection. Or you can configure all new connections to replace currently connected users.

If you are the only user connecting to this box, the latter option would be best; This would basically kick off any current user when you connect.

Orrrr you could configure SSH on your box, so you can just kill the current session manually / start a new vncserver.

So many options ;)
 
That's actually pretty easy. First you make sure that you've got the necessary tools
sudo apt-get install smbfs smbclient

Then you make a directory in which you can mount it
sudo mkdir /media/sambaaaaaaaaaaaaaa

Lastly you mount it
sudo mount -t cifs //hostess/sharenameesses /media/sambaaaaaaaaaaaaaa -o iocharset=utf8,file_mode=0777,dir_mode=0777
Thanks, I got that to work in the end... Now to script it. :)
Orrrr you could configure SSH on your box, so you can just kill the current session manually / start a new vncserver.

So many options ;)
I may look into using SSH. It would have the added benefit of extra security also. :)
 
I may look into using SSH. It would have the added benefit of extra security also. :)

Yup, and with SSH you have the ability to open any port you need into your lan whenever you need with ssh tunneling... so useful!

ssh -L5900:127.0.0.1:5900 [email protected]
(Putty client for windows can also do it under 'SSH Tunneling' menu)

Opening that SSH tunnel and then pointing your VNC client to 'localhost' so that it redirects down the tunnel would connect you to the VNC server through your ssh session.

useful stuff, and so widely unknown.
//TrX
 
Why script it? It's only the one line that has to be passed after the tools are installed and the mount directory is made.

If you want it to be automatic add it to your fstab. It'd then mount at boot or every time you run
sudo mount -a
Actually that would probably be a better idea... I'm just making a script to back up a few files over the network but actually leaving the Samba share mounted should be easier and faster... I was originally planning to mount then unmount the share everytime the script is run.
Yup, and with SSH you have the ability to open any port you need into your lan whenever you need with ssh tunneling... so useful!

ssh -L5900:127.0.0.1:5900 [email protected]
(Putty client for windows can also do it under 'SSH Tunneling' menu)

Opening that SSH tunnel and then pointing your VNC client to 'localhost' so that it redirects down the tunnel would connect you to the VNC server through your ssh session.

useful stuff, and so widely unknown.
//TrX
That doesn't sound too difficult. I'm using a different port to 5900, say I'm using 4444 (for example), would this work? I'm connecting from a Windows XP client (tightvnc)...

In putty:
ssh -L4444:127.0.0.1:4444 123.123.123.123

Then in tight VNC I access it with this:
localhost::4444

Now I'm guessing I need to enable some sort of SSH service on the Unbuntu rig, I won't be able to access it physically until next week, so I'll have a go at setting it up then. :) Hopefully you'll be unsuspended by then also... ;) :p
 
Back
Top Bottom