0

My Rpi Model 3B+ is connected through my laptop using VNC instead of HDMI and monitor, unfortunately I ran into some problems,I tried making the Rpi Headless by following this video on YT: https://www.youtube.com/watch?v=DkqzLHopaeE&t=56s but it didnt work. So I went back to my laptop, then when reconnected to VNC it says connection refused from the computer, then found a way around from this error by opening Putty and entering my Rpi's IP Address accessing the command shell of Rpi, then by typing vncserver it will then only allow to have the connection. but there were major problems like: 1) trying to open Raspberry Pi Configuration on the Main Menu is not showing and same goes for other Options. 2) Have to open Putty and enter the IP of my Rpi then login then type vncserver to have it working again and again. unlike before i just straight open it on VNC.

Maybe because i think the commands used in that video ovveruled the RPi? It told me to open the crontab etc. it says all in the video. Im really lost now. I have to use a TV/ Monitor again just to open the Raspberry Pi Configuration.

  • Please clarify what you mean by "make the pi headless". Headless means using the pi without a monitor or key part so accessing the pi via vnc or ssh is headless, which is what you're doing by the sound of it. The youtube video is showing how to have a python script launch on boot. I've not watched the full video but if vnc was starting before it sounds like you've either edited something to disable the automatic start up. I may be wrong but vnc doesn't automatically start by default on a pi (not with raspian anyway), so having to launch it via a terminal is normal. – rohtua Feb 9 at 19:30
  • I made Headless by follwing the steps so i disconnected it from my latop after rebooting it, unfortunately it didnt work, so i want to reset it back so that i can edit again the code, but now im not doing the usual way like before where i just go directly to the VNC, i have to open up first Putty then access my Rpi there then enable the VNC. But When im now on VNC on m laptop, bluetooth doest work and some functions doent seen normal like opening up raspi-config on the start menu. – Stashed Up Feb 15 at 14:42
0

It is unclear exactly what you are asking, HOWEVER

  1. The RealVNC server on the Pi is configured to share the existing desktop - so if you don't have one it will not exist.
  2. If you start VNC by running vncserver it will create a "Virtual Desktop". This is quite usable BUT many of the Foundation utilities write direct to the Video Core, so will not appear on a Virtual Desktop
0

I saw the video i believe you disabled your desktop when you made the raspi-config setting change "Boot to CLI". If you are able to access the Pi from Putty commandline and are successfully able to login, do the following commands:

sudo startx 

(sudo makes any command run as admin/root user) Now you can open VNC client software on your windows or macox or ubuntu computer and connect to the VNC desktop again.

If you want to always have the desktop, make sure you turn-off the "Boot to CLI" and turn it back to "Boot to desktop" this will fix your problem too.

Thank you, Vik

  • 2
    DO NOT use sudo startx a simple startx starts the user desktop. – Milliways Feb 10 at 4:56
  • It needs the "sudo", just startx doesn't work if you have set "Boot to CLI", and then connecting over ssh as a user pi. I have tried this, it needs the "sudo" to run. I can send you a screen shot of error message if you like. – zenofall Feb 11 at 5:38
  • 1
    If "it" doesn't work you are doing something wrong. All my Pi boot to the command line. I only use startx when I want to use the GUI. Running sudo startx is like running your Linux system as root. – Milliways Feb 11 at 7:33
  • I still don't understand why is running a command as root a bad idea, especially if it works and i don't have to deal with system permissions. But thank you for your inputs, i appreciate it. – zenofall Feb 12 at 12:56
  • i tried the sudo startx but an error message appears – Stashed Up Feb 15 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.