[HowTo] Install a vnc server on the Raspberry pi

nice!
Well the fps lag is expected…it wont get any better :slight_smile: 23-25 is the most stable setting i’ve used.
I just realized what you meant about the putty thing…Yeah, if you run the server manually that session is occupied. You’ll have to start a new session or use screen to detach/reattach to a session. (How To Use Linux Screen)
What screen does is basically setting something to run in the background with a handle…and you can detach from it and then reattach to it whenever you want.

Now that the server autoloads on boot, you dont have to worry about the cpu usage, because whenever you are not using vnc the server is kinda in an idle state…so it wont eat up your resources.

If you want to monitor your cpu/ram usage, via putty type : sudo apt-get install htop then press Y to install it.
Then type htop on the prompt and you’ll see a table with stats about all the processes running. Press F10 to exit.
If you are using a wifi stick with the pi you can also install wavemon sudo apt-get install wavemon. The same thing, execute it with : wavemon, and F10 to exit…It will give you info about your connection with your router. I use it when i am trying to find the ‘Goldilocks zone’ for better wifi reception. :stuck_out_tongue:

1 Like

Sure, I´ll use it. I was checking for some off-topic posts in this thread about these things. Screen included. Thanks for the reminder.

1 Like

I didn’t do the “Screen resolution / Headless operation” part of the guide of patrikolausson/dispmanx_vnc because I thought that the automode was enouth to me.

However, now I would like to use Config Conditional Filters to setup two different TVs as said in Conditional Filters for Config.txt, and I also think that may have some relationship with the issues I experience sometimes when trying to connect via VNC. Maybe, hdmi_force_hotplug=1 fix that. I think that also may solve a weird splash I see when booting when one of the TVs.

How does modifying the /boot/config.txt affects the OSMC? How is it related to the GUI’s “Config Options”? Is it safe to apply these kind of Conditional Filters with OSMC?

Edit: If the following block is in /boot/config.txt, how the auto fetch of the HDMI will continue working? Will the HDMI keep as the bock says even though connected to TV?

# This enables HDMI resolutions when HDMI is not connected
hdmi_force_hotplug=1

# Group
# 1=CEA, used for connecting to consumer TV sets
# 2=DMT, used for connecting to a computer monitor
hdmi_group=1

# CEA Modes
#  4 =  720p     60Hz
# 19 =  720p     50Hz
# 16 = 1080p     60Hz
# 31 = 1080p     50Hz
# DMT Modes
# 39 = 1360x768    60Hz
# 82 = 1920x1080   60Hz
hdmi_mode=31

[From: GitHub - patrikolausson/dispmanx_vnc: VNC Server for Raspberry PI using dispmanx]

If the tv isnt on and you log in from vnc (after a reboot), then yeah the resolutions would be all messed up.
I use conditional filters as well to have the resolution on the pi on fixed values. I use:

hdmi_force_hotplug=1
hdmi_group=1  
hdmi_drive=2
hdmi_mode=4 
sdtv_mode=2
sdtv_aspect
sdtv_aspect=3

You can see what those values do here: RPiconfig - eLinux.org

This way, even if the TV is off, the resolution on of the pi will be fixed to my preset values

Edit: ps…i just corrupted my sd card…dont edit config.txt while the pi is active
Edit2 : the card is totally destroyed…just ordered a new one…i currently hate my pi :slight_smile:

1 Like

Howdy.
Stuck here:
cp dispmanx_vncserver /usr/bin
answer:
cp: cannot stat 'dispmanx_vncserver': No such file or directory
??

hi

I had this problem too, i think the first post is missing a step.

After

Do following:

sudo wget https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip
unzip master.zip -d /home/osmc/
rm master.zip

Hopefully dispmanx_vncserver should be created in your osmc directory now.

Then try the line you tried and carry on with instructions.

cp dispmanx_vncserver /usr/bin

Hope that helps. Maybe @Sandbird can update first post.

2 Likes

Got it!
Thanks a lot the_bo

done :slight_smile:

Still stuck…

osmc@osmc:~$ cp dispmanx_vncserver /usr/bin
cp: cannot stat ‘dispmanx_vncserver’: No such file or directory

@Sandbird has updated his post,
but…

is this complete? (make)

I guess you first have to go to the directory where you unpack the files to.
cd dispmanx_vncserver

Please test and if it works edit the post of @Sandbird which you can do as it is a wiki

I did this first.
There’s no such file in the master.
dispmanx_vnc-master/

1 Like

Ok, that was the old folder structure. Obviously as you can see it is now dispmanx_vncserver-master

So

  1. cd dispmanx_vncserver-master
  2. make
  3. cp dispmanx_vncserver /usr/bin
1 Like

oops…forgot about the master thingy…I was blindly editing that 1st post. I fixed it as well in the instructions. Thanks!

Work on progress…
But

cp dispmanx_vncserver /usr/bin

has this answer:

cp: cannot create regular file ‘/usr/bin/dispmanx_vncserver’: Permission denied

Despite

osmc@osmc:~/dispmanx_vnc-master$ chmod 755 dispmanx_vncserver

sudo cp dispmanx_vncserver /usr/bin

:sweat:
Shame on me!

Actually shame on me :stuck_out_tongue: 1st posted edited (again) lol.
I use root account, so i keep forgetting about sudo

Et voilà!

It works real fine!

A big thanks to you!:thumbsup:

2 Likes

De rien :slight_smile:

Good got it going sventovit :slight_smile:

Be nice if this was added to app store sometime.

Been stable and uses very few resources. Great job guys :slight_smile: