+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
Raspberry Pi, Arduino & Other SBCs Thread, Day 3 with the Pi - Honeymoons over! in Technical; Failed to get a VNC server working tonight Did all the apt getting and sudo ing that an article suggested ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168

    Day 3 with the Pi - Honeymoons over!

    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

  2. #2

    teejay's Avatar
    Join Date
    Apr 2008
    Posts
    3,174
    Thank Post
    284
    Thanked 773 Times in 583 Posts
    Rep Power
    335
    sudo apt-get install tightvncserver

    run vncserver and that's about it really.
    Last edited by teejay; 10th July 2012 at 11:16 AM.

  3. #3

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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. <Server IP>: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...

  4. #4

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    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

  5. #5

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    so I hope I have not jumped in and trod on any toes
    Ouch - get off - that hurt
    Welcome
    Si

  6. #6

    teejay's Avatar
    Join Date
    Apr 2008
    Posts
    3,174
    Thank Post
    284
    Thanked 773 Times in 583 Posts
    Rep Power
    335
    Quote Originally Posted by SimpleSi View Post
    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
    Last edited by teejay; 10th July 2012 at 11:14 AM.

  7. #7

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    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

  8. #8

    teejay's Avatar
    Join Date
    Apr 2008
    Posts
    3,174
    Thank Post
    284
    Thanked 773 Times in 583 Posts
    Rep Power
    335
    Quote Originally Posted by SimpleSi View Post
    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

  9. #9

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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?

  10. #10

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    OK - followed the basic advice and just ran tightvncserver from console and it works

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

  11. #11

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168

    What happened there then!

    I'm using this article
    Raspberry Pi &bull; 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
    Last edited by SimpleSi; 10th July 2012 at 10:55 PM.

  12. #12

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    Code:
    !/bin/sh
    # /etc/init.d/tightvncserver
    #
    
    # Carry out specific functions when asked to by the system
    case "$1" in
      start)
    :censored: :censored: su pi -c '/usr/bin/vncserver'
    :censored: :censored: echo "Starting VNC server "
    :censored: :censored: ;;
      stop)
        pkill vncserver
    :censored: :censored: echo "VNC Server has been stopped (didn't double check though)"
    :censored: :censored: ;;
      *)
        echo "Usage: /etc/init.d/blah {start|stop}"
    :censored: :censored: exit 1
    :censored: :censored: ;;
    esac
    
    exit 0
    This is coped from my version of the file from nano
    Lets see what IT looks like
    Si

  13. #13

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    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

    Code:
    #!/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

  14. #14

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    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

  15. #15

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    Code:
    #! /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]

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. A jouney with the Pi man - Day 2
    By SimpleSi in forum Raspberry Pi, Arduino & Other SBCs
    Replies: 0
    Last Post: 8th July 2012, 08:20 PM
  2. [Video] Fitting with the Gurkha news the other day.
    By mattx in forum Jokes/Interweb Things
    Replies: 0
    Last Post: 27th April 2009, 12:46 PM
  3. Hottest day of the year so I cannot think
    By suesmate in forum Educational Software
    Replies: 10
    Last Post: 19th July 2006, 03:52 PM
  4. Replies: 2
    Last Post: 2nd May 2006, 10:42 AM
  5. The Good Old Days (not the TV show!)
    By ajbritton in forum General Chat
    Replies: 11
    Last Post: 18th January 2006, 11:17 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •