SimpleSi Posted July 9, 2012 Posted July 9, 2012 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
teejay Posted July 10, 2012 Posted July 10, 2012 (edited) sudo apt-get install tightvncserver run vncserver and that's about it really. Edited July 10, 2012 by teejay
rodent43 Posted July 10, 2012 Posted July 10, 2012 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...
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 and that's about it really. We all know that it isn't ....don't we? 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
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 so I hope I have not jumped in and trod on any toes Ouch - get off - that hurt Welcome Si
teejay Posted July 10, 2012 Posted July 10, 2012 (edited) We all know that it isn't ....don't we? 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 July 10, 2012 by teejay
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 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
teejay Posted July 10, 2012 Posted July 10, 2012 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 Or should that be
rodent43 Posted July 10, 2012 Posted July 10, 2012 I am a bit of a Vi/Vim person myself...never get on well with Nano Thanks for the welcome Are you able to post the errors and script?
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 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
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 (edited) What happened there then! I'm using this article Raspberry Pi • View topic - Setup PI to work without monitor (debian image) and the above was copied from there and pasted in WTH is going on???? Si Edited July 10, 2012 by SimpleSi
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 !/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
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 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???? 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
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 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
SimpleSi Posted July 10, 2012 Author Posted July 10, 2012 #! /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]
rodent43 Posted July 11, 2012 Posted July 11, 2012 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?
glensc Posted July 11, 2012 Posted July 11, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now