So - I'm assuming that you have VNC up and running, working if you start it manually after each boot. If not, take a look here.
Create startup file
The first thing you need to do is create the file that will actually start VNC on startup. I'm doing this via Putty (instructions here), but you can just as easily use Terminal directly from the Pi.
Type the following:
sudo nano /etc/init.d/tightvncserver
NOTE: nano is a lightweight editor - the command above will create a new file called tightvncserver in the /etc/init.d directory and open it for editing, presenting the following screen (note the [ New File ] entry at the bottom, indicating a new file):
Once you have the file open, paste in the following:
# First configure the user you want to run this under - this will generally be pi, unless you've created your own users
export USER='pi'
eval cd ~$USER
# Check the state of the command - this'll either be start or stop
case "$1" in
start)
# if it's start, then start vncserver using the details below
su $USER -c '/usr/bin/vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565'
echo "Starting vncserver for $USER "
;;
stop)
# if it's stop, then just kill the process
pkill Xtightvnc
echo "vncserver stopped"
;;
*)
echo "Usage: /etc/init.d/vncserver {start|stop}"
exit 1
;;
esac
exit 0
# thanks - check out http://myraspberrypiexperience.blogspot.co.uk for more info!
NOTE: In the file I've specified my own resolution with the text -geometry 1280x800 - you can leave this out of you want
This will be what your screen now looks like.
To exit, press Ctrl+X. You'll be prompted to save - just type Y:
You'll be prompted to confirm the filename - just press Enter:
Once that's done make sure the file has the right propertied by typing the following:
sudo chmod 755 /etc/init.d/tightvncserver
NOTE: Important to do this step every time you modify this file. I redid these steps to create the tutorial, skipped this step and couldn't VNC in on the reboot!
Add File to startup sequence
And now just add your file to the list of startup actions by typing the following:
sudo update-rc.d tightvncserver defaults
And that should be it! Just restart, and you should be able to VNC straight in!
I need help. My server did not start after a reboot, no matter what script i use. I´m using Raspbian “wheezy” from 2012-08-16. I did all the steps described above. I am wondering about your note to the chmod, but i did it. Can you help me?
ReplyDeleteHi Bernhard - I'm not too sure I'm afraid. The first time I tried, it also didn't work, but after I ran the chmod step it worked. I deleted the file, re-traced my steps a 2nd time and it worked that time too.
DeleteBest advice? Scrap everything and try it again from scratch, re-run through the steps & instructions :) So often I kick myself when it works the 2nd time.
Something else I tried when troubleshooting my initial issue was to connect via Putty and run the file you created manually - that'll identify if it's an issue with the file or configuring it in the start-up process.
Hope this helps!
Agen Bola Thank's for your comment..
DeleteIn the tightvncserver file you use different names when starting and killing the process, why is that?
ReplyDeleteIf I understand it correctly, Xtightvnc in the pkill command is the name or the process that is actually running, whereas the application itself is called vncserver. I haven't confirmed this yet, but if you get vnc up and running and then look at your processes you should see one running called Xtightvnc.
ReplyDeleteMy own fault totally but any way you can *prevent* vnc from loading after doing this?
ReplyDeleteI'm pretty new with Linux and currently cant figure out how to get onto my desktop now!!
Probably something really obvious but Id appreciate a pointer.
I haven't tried to use this myself, but after a quick google it looks like you'll just need to do the following:
Delete1) Delete the script file you created
2) Remove the script from the startup process
As mentioned, I haven't tested this myself, but I think the commands would be as follows:
1) sudo delete /etc/init.d/tightvncserver
2) sudo update-rc.d tightvncserver remove
I hope it works!
hi tass,
Deletei think you made a small mistake in the commands, delete should be rm (stands for remove), no shame on you becous i had to look it up ;) just letting every1 know.
Harrie
Thanks for the head-up Harrie!
DeleteGood day to all
ReplyDeleteI follow with interest and passion raspberry on the blog, I tried to start the tightvncserver to boot, that does not work, the error 'this (update-rc.d: using dependency based boot sequencing
insserv: warning: script 'tightvncserver' missing LSB tags and overrides
).
There will be 'a solution to the problem?
thanks
Stefano
Hi Stefano. I haven't actually hit that problem on my Pi, although I've tried to replicate this same process on my Ubuntu machine and got pretty much the same issue. Not too sure where it comes from. I see someone has posted an alternative below that might help. What he's done there is to put the actual command line straight into the rc file, rather than using the method above which places a shortcut of sorts into the rc file. This direct approach might get better results?
DeleteYou can actually have this start at a boot-up by editing your /etc/rc.local file and inserting the following before the exit 0 line.
ReplyDeletesu -c "tightvncserver :1 -geometry 1280x1024 -depth 24" user
Geometry you can change to your screen resolution and user would your username that you use to login. I have seen vncserver be used instead of tightvncserver but couldn't get that to work on my system.
Thanks for the suggestion - hope this more direct approach helps Stefano out!
DeleteI was also getting "Missing LSB tags and overrides."
ReplyDeleteAdding the following to the start of the file seemed to take care of it:
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts VNC
# Description:
### END INIT INFO
No warnings, and I was able to VNC in without a problem.
Yes, that is perfect!
DeleteThanks! R
DeleteHi,
ReplyDeleteIt seems that tightvnc server stops responding after a day or so. I have it running on my pi which is always on. Any ideas why this happens and what a possible resolution is?
Thanks
Sorry samad64, I haven't had this problem as I don't tend to leave my Pi on long enough, and if I do it's to use Raspbmc. I'll try get one of my other boards up and running soon to see if I experience the same issue. What distro and you running?
Deleteim using raspbian wheezey from 10/28/12
ReplyDeletethanks for looking into it
Right - I've re-imaged, am up and running - let's see how it goes. I've got a few more questions:
Delete- how are you starting VNC - automatically or manually?
- if manually, what command are you using?
- if automatically are you using the initial command I posted, or have you tried the 'Unknown' comment above?
I'm using your automatic method. Have not tried unknown's comment above.
DeleteI've got a workaround for now, a cron job set to execute every 24 hours to kill the server and restart it... but its not very ideal
When I am unable to connect, it simply says the password is incorrect - though a restart of vnc will let me in with the same password
OK, thanks. Odd that it's giving you a password error. I've started with the other approach first (su -c "tightvncserver :1 -geometry 1280x1024 -depth 24" user). The poster suggested tighvncserver rather than vncserver as he had issues with vncserver - might be related. I'll keep it running over the next few days and keep connecting in and let you know how it goes.
DeleteHi samad64. So I've run this for the past few days, intermittently connecting, without any issue. There are a couple of things different that I can think of - it might be worth trying them one by one:
Delete- I'm using the latest Wheezy release (2012-12-16). You might not have to create a new blank image - simply running sudo apt-get update
- I've running tightvncserver now rather than vncserver like my post outlines.
I don't think it's hardware related due to the 'password' error, so I would hope of those 2 sort it out. Let us know how it goes.
Adding:
ReplyDeletesu -c "tightvncserver :1 -geometry 1280x1024 -depth 24" user
to the /etc/rc.local file, did solve the missing LSB tags and overrides error.
Thanks for the excellent guide!
You can actually have this start at a boot-up by editing your /etc/rc.local file and inserting the following before the exit 0 line.
ReplyDeletesu -c "tightvncserver :1 -geometry 1280x1024 -depth 24" user
Regard's,
Ben Linus,
Go here for more info
Unfortunately my pi didn't start the vnc server after the reboot. What is the problem. This is a virgin pi, I have been using it since 2 hours. :)
ReplyDeletehello all,
ReplyDeleteIf you have problems with starting vnc on boot you can have a look on this website:
http://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/running-vncserver-at-startup
For me it worked out this way :D
Good luck!
Tnx! It solved... :)
Deletefirst i want to say that i am glad to help you with my google skills :P
DeleteThis method is also more useful in another way, becous it will only start the vnc server when startx (desktop) get launched so it will not try to start it up on boot and fail (if you are not starting startx automatically) and then you still need to start it manually..
gr. Harrie
hi ,
ReplyDeletei have a problem when running vnc server, like this :
Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the vncserver script.
Couldn't start Xtightvnc process.
help me please
Every tutorial I have used to get tightvncserver to start at boot renders my pi useless. After doing this one I am stuck in a login boot - A box asking me for my username pi, and my password raspberry with a choice of default login. Password works but then just comes back up again.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteRaspberry Pi... Teach your kids about computing! I was a unix admin long ago (now a windows admin). Linux has had 20+ years to evolve and we're still dealing with this obtuse command-line crap. What a joke!
ReplyDeleteGreat post!
ReplyDeleteI also have a Pi blog: http://raspberrynewbie.wordpress.com/
Now that you have the ability to VNC into your Pi, you will likely never want to hook it up to a monitor, mouse and keyboard again.
ReplyDeleteThanks you !
ReplyDeleteRekomendsi Situs Bandar atau Judi Online Terbaik di Indonesia :
ReplyDeletePoker Online Terpercaya
Domino Online Terpercaya
Poker Online Indonesia
Agen Bola Online
Agen Casino Online
woww artikel yg sangat sangat bagus sekali..
ReplyDeleteAgen Bola Terpercaya
Hi, I've been looking through the web to find a solution to my vnc or x problem. I can successfully connect to my pi via vnc however all I get is grey desktop and x mouse pointer. Any ideas why? Cheers, George
ReplyDeletethnks for article.
ReplyDeleteAgen Bola Terpercaya
Agen Judi Bola
Agen Judi Online
Nice blog we recommend outr raspberry pi blog
ReplyDeleteraspberry pi 2 india
raspberry pi india
i was using headless setup using ethernet, but suddenly it has stopped working due to ethernet port, . is there any way to setup headless via VNC directly without display ?
ReplyDeletei was using headless setup using ethernet, but suddenly it has stopped working due to ethernet port, . is there any way to setup headless via VNC directly without display ?
ReplyDeleteThis appendix will focus upon some of the indications that would warrant your business in getting an Office space For rent in karkardooma, Delhi
ReplyDeleteCommercial Space for rent in Kaushambi
Office space for rent in laxmi nagar
Office space For rent in karkardooma
Office space for rent in Preet Vihar
Office space For rent in kaushambi
Commercial Real estate website Delhi /NCR - Think4buysale.in
If you are looking for space in East Delhi , just logon www.think4buysale.in and make it perfect deal for yourself as www.think4buysale.in is the best destination to find property deals in patparganj industrial area with real pics of premises and will complete solution to your requirements.Just logon to think4buysale.in or call on +919958023001 and let the experts do the best for you.
ReplyDeleteOffice space for rent in patparganj Industrial area
Office space for rent in karkardooma
Commercial Office space for rent in laxmi nagar
Office space for rent in Preet vihar
Bridal Mehndi Artist in Delhi
https://www.completegate.com/2016080659/blog/raspberry-pi-the-ultimate-convenience Do read and share your views ....
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteOh VNC sounds good. Well detailed
ReplyDeleteoffice space for rent in chennai
This is really an informative blog for an ECE student like me this blog is worth to read and know many things about Raspberry pie.
ReplyDeletecoworking space in Hyderabad
Office Space in HyderabadOffice space for rent in Bangalore
Coworking space in Bangalore
Thanks for sharing .If you're planning to start a business in Chennai and looking for professional Business Center In Chennai can help you find a strategic business office address. They offers a wide range of serviced offices, office suites and tailormade office packages including business set-up services.
ReplyDeleteFully Furnished Office Space For Rent In Chennai
Co-Working Space In Chennai
Best Co-Working Space In Chennai
Private Office Space In Chennai
Office Space In Chennai
Shared Office Space For Rent In Chennai
Business Center In Chennai
Halo,I'm Helena Julio from Ecuador,I want to talk good about Le_Meridian Funding Investors on this topic.Le_Meridian Funding Investors gives me financial support when all bank in my city turned down my request to grant me a loan of 500,000.00 USD, I tried all i could to get a loan from my banks here in Ecuador but they all turned me down because my credit was low but with god grace I came to know about Le_Meridian so I decided to give a try to apply for the loan. with God willing they grant me loan of 500,000.00 USD the loan request that my banks here in Ecuador has turned me down for, it was really awesome doing business with them and my business is going well now. Here is Le_Meridian Funding Investment Email/WhatsApp Contact if you wish to apply loan from them.Email:lfdsloans@lemeridianfds.com / lfdsloans@outlook.com WhatsApp Contact:+1-989-394-3740.
ReplyDeleteCoworking is an American business model where individuals/organizations work independently under one roof yet share many office facilities and value-added services amongst each other. iSprout is now a leading coworking space in Hyderabad. We have a similar set-up in Vijayawada and Chennai with the vision to become a Pan-India brand. The concept of coworking spaces that started in the USA in 2005 is now a global phenomenon.
ReplyDeleteNext from Kia is the KIA SONET, comes with wild design, fantastic build quality, thundering speed & what not! Kia sonet features are truly incredible. Know Kia Sonet on road Price in Hyderabad CarKia 36 @ Jubliee Hills.
ReplyDeleteGlad I have found this nice article.
ReplyDeleteBest Coworking Space in Bangalore
Best Coworking Space in Pune
Best Coworking Space in Hyderabad
Coworking Gurgaon
Best Coworking Space in Delhi
That's a great article indeed, you can also check
ReplyDeleteCoworking spaces Hyderabad
Coworking space Mumbai
Coworking space Gurgaon
Coworking space Pune
Thanks for such an amazing article.
ReplyDeleteBest Coworking Space in Mumbai
Thanks for sharing good information about Start VNC automatically. It was extremely helpful. Coworking Office Space in Noida
ReplyDeleteThanks for sharing good information about Start VNC automatically. It is extremely helpful. Coworking Office in Noida
ReplyDeleteLoved the detailed article. If you are looking for coworking spaces then check out :
ReplyDeleteCoworking Office Space in Hyderabad
Coworking Office Space in Indore
Coworking Office Space in Noida
Coworking Office Space in New Delhi
Thank you so much for this nice and detailed article.
ReplyDeleteoffice space for rent in Hyderabad
coworking space in Hyderabad
office space for rent in Bangalore
coworking space in Bangalore
This comment has been removed by the author.
ReplyDeleteCoworking space in Gurgaon
ReplyDeleteThank you for sharing. I am so very inspired by your story. I have a mountain of student loans and other consumer debt that is screaming at me and that I need to pay off. After making a mess of my finances, I woke up and wanted to be home with my children. I’ve been home for 4 years, but have to get from under this mountain. Your post was filled with great information. It’s a lot to digest, but will definitely save this to reference over and over as I move forward.
ReplyDeleteHarold Burton
"I needed to take a minute to thank you. Your guide convinced me to go ahead and finally start my own blog. I wanted it to look professional from day 1 and I must say that it has been a great hit ever since I launched. Your guide has helped me incredibly much, and I am so grateful you put it together for people like me. Keep up the awesome work. Thanks again and greetings from Germany.Joseph Donahue
ReplyDeleteHi
ReplyDeleteit is a good article blog. thanks for sharing information.
coworking space in banglore
Conference hall booking banglore
Very useful & enlightening post! Thank you very much for sharing. You can check-Spiritual Maturity: 7 Steps to Be More Spiritually Mature
ReplyDeleteGreat Share!
ReplyDeleteFirst off, congratulations on this post. If You are searching for latest government jobs in India. Other department for state and central government job. This bucket list for you to know the right jobs detail.
This is really awesome but that's what you always crank out my friend. Reading your story got my face leaking and my heart singing. Find qualification based government job and vacancies with employment news at: vacancysquare.com
All the best, I’m excited to watch your journey! Keep it works and share your amazing thoughts.
Great share and thanks again for the mention here,
Thanks and Regards!
Vacancysquare
Thats a very long and informative post. You where on point from the onslaught, choosing domain names, niche etc to readership and improving your blog. useful content from any upcoming blogger.
ReplyDeleteKelly Hubbard
Nice Info!
ReplyDeleteConstruction Company in Gurgaon Haryana
Office Space in Gurgaon
Commercial Property Investment in Gurgaon
IT Office Space In Gurgaon
Thank you for sharing this blog.
ReplyDeleteFor Hybrid Workplace:Coworking space in Bangalore
Having a office can boost your productivity because it gives you the positive environment to work and of course when you sit on a chair with a proper working mindset then it feels even more product and excellent to work, well for all those who are looking for the Our Office you can visit here to check out the best available options for you.
ReplyDeleteSmm panel
ReplyDeletesmm panel
Https://isilanlariblog.com/
instagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
pendik bosch klima servisi
ReplyDeletebeykoz samsung klima servisi
üsküdar samsung klima servisi
pendik toshiba klima servisi
çekmeköy beko klima servisi
ataşehir beko klima servisi
maltepe daikin klima servisi
kadıköy daikin klima servisi
ümraniye beko klima servisi
Very Nice and Knowledgeable content. Will create a lot among the people. In case you are looking for Best Co Working Space in Noida sector 63 with all basic amenities, visit us.
ReplyDeleteExperience the perfect blend of work and community in Bangalore's top Coworking Spaces. Discover flexible membership options and a range of amenities tailored to your needs.
ReplyDeleteDiscover the ideal fusion of community and work in top office space in Gurgaon. Find membership packages that are flexible and a variety of perks that are suited to your needs.
ReplyDeleteI found this tutorial incredibly helpful for setting up VNC to start automatically on my Raspberry Pi. The step-by-step instructions made the process easy to follow, and I appreciate the detailed explanations. Kudos to Penguin Tutor for providing the solution!
ReplyDeleteIf you're looking for more Raspberry Pi tips and tricks, make sure to check out noshtek.com as well. They have a wealth of valuable information for Raspberry Pi enthusiasts. Thanks again for sharing this useful guide!
I've been looking for this Article for months!
ReplyDeleteThank you for this Insights Author.
virtual office spaces
co working spaces
co working spaces near me
co space working
coworking