Jump to content

Recommended Posts

Posted

Failed to get a VNC server working tonight :(

 

Did all the apt getting and sudo ing that an article suggested but one bin/sh script just kept on giving error after error and I've given up for night :(

 

Never mind - try again tomorrow :)

 

Si

Posted

My first post on these fine forums so I hope I have not jumped in and trod on any toes

 

I have in the past had to specify the desktop for the VNC client e.g. :1

 

vncserver should work easily...personally I just use PuTTy to use terminal, depends on what you want to do on the remote machine, we only really have LAMP, web server, left now with Linux

 

Not sure if that will help...

Posted
and that's about it really.

 

We all know that it isn't ....don't we? :lol:

 

Only for testing maybe :)

 

I'm wanting the full autostarting setup :)

Like I say - the geek stuff went fine and then for some very perculiar(but I'm sure will turn out to be very simple) reason, the launching script that I cut and pasted from a web article/blog just kept on giving errors on about 5 lines that required me to basically delete all whitespaces and re-enter them????

 

And then it just gives me a an error at the end???

 

maybe something strange with the editor (is nano not allowed to be used as a bin/sh script editor on a Pi ????)

 

Anyway it was 23:15 and in the words of the famous philosopher, Mr Z, it was time for bed :)

 

Si

Posted (edited)
We all know that it isn't ....don't we? :lol:

 

Only for testing maybe :)

 

I'm wanting the full autostarting setup :)

Like I say - the geek stuff went fine and then for some very perculiar(but I'm sure will turn out to be very simple) reason, the launching script that I cut and pasted from a web article/blog just kept on giving errors on about 5 lines that required me to basically delete all whitespaces and re-enter them????

 

And then it just gives me a an error at the end???

 

maybe something strange with the editor (is nano not allowed to be used as a bin/sh script editor on a Pi ????)

 

Anyway it was 23:15 and in the words of the famous philosopher, Mr Z, it was time for bed :)

 

Si

 

Ah ok, tbh I very rarely use it as I just ssh into the commmand line and very rarely use the GUI, so just start the vnc server when required.

I have had the odd quirk with the raspberry pi and text editors, especially with the boot config.txt, if I'm having problem I use wincsp so I can edit the file in notepad on my Windows machine.

Just remembered, a lot of the file editing problems disappear with the firmware update, make sure you update your firmware - http://www.raspberrypi.org/archives/1195

Edited by teejay
Posted
I use wincsp so I can edit the file in notepad on my Windows machine.

Go wash your mouth out!

We'll have no talk about the dark side in this sanctuary :)

Si

Posted
Go wash your mouth out!

We'll have no talk about the dark side in this sanctuary :)

Si

 

I know, I have a flogger for every time I have to do that :p

Or should that be :whip:

Posted

I am a bit of a Vi/Vim person myself...never get on well with Nano

 

Thanks for the welcome :D

 

Are you able to post the errors and script?

Posted

OK - followed the basic advice and just ran tightvncserver from console and it works :)

 

This is the script thats causing me headaches

#! /bin/sh
# /etc/init.d/tightvncserver
#

# Carry out specific functions when asked to by the system
case "$1" in
 start)
 :censored: su pi -c '/usr/bin/vncserver'
 :censored: echo "Starting VNC server "
 :censored: ;;
 stop)
 :censored: pkill vncserver
 :censored: echo "VNC Server has been stopped (didn't double check though)"
 :censored: ;;
 *)
 :censored: echo "Usage: /etc/init.d/blah {start|stop}"
 :censored: exit 1
 :censored: ;;
esac

exit 0

Posted

!/bin/sh
# /etc/init.d/tightvncserver
#

# Carry out specific functions when asked to by the system
case "$1" in
 start)
 :censored: su pi -c '/usr/bin/vncserver'
 :censored: echo "Starting VNC server "
 :censored: ;;
 stop)
   pkill vncserver
 :censored: echo "VNC Server has been stopped (didn't double check though)"
 :censored: ;;
 *)
   echo "Usage: /etc/init.d/blah {start|stop}"
 :censored: exit 1
 :censored: ;;
esac

exit 0

This is coped from my version of the file from nano

Lets see what IT looks like

Si

Posted

And of course when I use the backspace key in nano to remove all those uncensored (which BTW just appear as spaces!) from the file it all works fine

 

#!/bin/sh
# /etc/init.d/tightvncserver
#

# Carry out specific functions when asked to by the system
case "$1" in
 start)
   su pi -c '/usr/bin/vncserver'
   echo "Starting VNC server "
   ;;
 stop)
   pkill vncserver
   echo "VNC Server has been stopped (didn't double check though)"
   ;;
 *)
   echo "Usage: /etc/init.d/blah {start|stop}"
   exit 1
   ;;
esac

exit 0

I wander what the problem is - is it a Midori browser issue or a nano issue or what???? :confused:

 

Any way - its onwards and upwards now - just need to add in the stuff to get it to autostart and then I can try the Pi our headless :)

 

Si

Posted

I don't adam and eve it - just as I thought i'd got it all running - it stopped connecting (using my 'droid as the vnc client) :(

 

Turns out that the pi after days of happily been given 192.168.1.70 has now been given 192.168.1.81 :(

 

So I'm back here at main PC to hack into the Router and set it up (hopefully) to hand out same IP to the Pi's USB Wi-fi dongle each time!

 

(don't want to set Pi up with static as intend taking it into schools to show off next week :) )

 

Si

Posted

#! /bin/sh
# /etc/init.d/tightvncserver
#

# Carry out specific functions when asked to by the system
case "$1" in
 start)
   su pi -c '/usr/bin/vncserver'
   echo "Starting VNC server "
   ;;
 stop)
   pkill vncserver
   echo "VNC Server has been stopped (didn't double check though)"
   ;;
 *)
   echo "Usage: /etc/init.d/blah {start|stop}"
   exit 1
   ;;
esac

exit 0

This was copied in chrome on my windows machine

[edit] so it looks to be a Linux/Midori/Nano issue[/edit]

Posted

Sorry our net went around 4:00 yesterday so I have only just checked back on the site

 

so do you get an error in /var/log or is the service now starting?

Posted
sudo apt-get install tightvncserver

 

run vncserver and that's about it really.

 

Depends what you want to do with it but Xvnc might be a better bet, seems to be the only VNC version which will use the display :0 ie the display that is coming out of the Pi, rather than another instance of a display.

Basically if you want to remotely control the session on another screen ( connected to the RasPi ) with VNC then most implementations of VNC are not suitable.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...