[HowTo] Install a vnc server on the Raspberry pi

Sorry, seriously rusty and slightly hungover but after I enter cd /home/osmc/dispmanx_vnc-master/
sudo chmod +x makeit
./makeit

I get the error message cd /home/osmc/dispmanx_vnc-master/ : No such file or directory.

All and any help would be gratefully received

yeah, the makeit script is looking for /home/osmc/dispmanx_vnc-master/ folder
but you have the vncserver your trying to compile in a different folder.
Either edit the makeit script and change the path to where your vncserver is, or just make the folder requested (/home/osmc/dispmanx_vnc-master/) and move the vncserver in there and try again.

1 Like

Okay, soā€¦

  1. Why would it not be in that folder?

  2. Why when I change directories to home (cd /home) and I try the ā€˜ls -lā€™ command I only get ā€˜osmcā€™ and I can not cd /osmc, that just gets me back to : No such file or directory.

I feel really dumb today. I really need to get back into this!

(Quick edit: Thank you for the speedy response, on a Sunday no less, it is much appreciated.)

Try cd osmc (NO slash)
0r cd /home/osmc (With slash)

The slash causes it to seek directories from the root of the drive, no slash it uses current folder as root

1 Like

Thank you! That got the ball rolling. Once I could list the directories I could see the file hadnā€™t actually unpacked, doh!

So now Iā€™ve got it unpacked, got it up and running and can access the command line from my PC but (thereā€™s always a but!), Iā€™ve got this line of values at the bottom that wonā€™t stop counting up, then resetting

What have I done now?!

hehehe that means the service is running :slight_smile: Thats the vnc serverā€¦it doesnt quit to prompt. You can Ctrl+C to exit it.

Now if you make it run on startup you are all doneā€¦It will automatically run on boot, and wont eat any resources until you join a session with vnc client. After you quit it will go back to ā€˜idleā€™ and wait for the next connection

I was guessing thatā€™s what is was but didnā€™t want to do anything for fear of fouling up itā€™s operation.

As I mentioned, very rusty, just getting back into linux again. Mildly annoyed with myself Iā€™ve let so much slip. I think Iā€™ll change my PC back to linux (or at the very least a duel boot) as practice and repetition are the only ways to learn!

As ever, Iā€™m blown away by the community resources and responses, makes the steep learning curve this dozy old plumber is facing a lot easier to climb.

hehehe although i dont consider myself old (36) imagine doing all that with a dial up modem back in the day. Now with the help of forums/internet i think you can even build a nuclear reactor in your garage :stuck_out_tongue: (http://www.instructables.com/id/Build-A-Fusion-Reactor/) (yes you can btw. ahahaha)

1 Like

LMAO! What a time to be alive!

I can remember the joys of dial up. The first recording studio set up I had was a 1040STe! You used to know the name of every cracker out there for getting software to eh, test, but totally pay for later!

And Iā€™m sorry to say buddy but youā€™re old. Go ask a 20 year old. Donā€™t even ask. Just hang out near a bunch of collage students. The other day my friends niece asked us who The Beastie Boys where :flushed:

2 Likes

Lolā€¦tell her i was at their concert once :stuck_out_tongue:
Well at least soon enough youā€™ll be able to ask your niece how to do linux stuff, or how to plug in your usb implant and start the installation software on the right side of your brain. (hahaha)

1 Like

:smiley: ā€œsudo modprobe evdevā€ worked for me, thanks!

ā€œsudo modprobe evdevā€ should do it, worked for me.

I had to change
ExecStart=/usr/bin/dispmanx_vncserver
to
ExecStart=/usr/bin/dispman_vncserver

But otherwise this seems to be working for me. Thanks!

Well, something doesnā€™t seem to be working right. Kodi is fully booted up and Iā€™m watching a video. Hereā€™s what Iā€™m seeing with VNC:

Hi!

Iā€™m following the tutorial step by step but the only thing I get is what follows

It gets stucks there and seems not to work. Any idea?

Thanks in advance!

hmmm thats weird, it doesnt show anything after ./makeit ā€¦it should compile the server there.
Delete your dispmanx folder there and try this instead : GitHub - patrikolausson/dispmanx_vnc: VNC Server for Raspberry PI using dispmanx

Build with ā€œmakeā€ inside the new folder. You should be seeing the compiler building the app.
If that works, iā€™ll fix the 1st post.

Thank you for your quick reply. Once Iā€™ll have tried Iā€™ll come back.

Iā€™m back.

I follow these steps:

apt-get update

sudo apt-get install build-essential rbp-userland-dev-osmc libvncserver-dev libconfig+Ā±dev

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

./configure ā†’ There is no such fileā€¦
make
make install

And what I get is the following:

What Iā€™m doing wrong?

Thanks once again.

1 Like

There is no make installā€¦ Its just make. In that directory do an ls. You should have a file there called dispmanx_vncserver. Thats the vnc server.
If you type now ./dispmanx_vncserver youā€™ll see it runningā€¦and you can connect from your pc to the pi now. :smile:
But lets make that something that autostarts after reboot. If you executed the script press Ctrl+C to stop the server and do the following:

cp dispmanx_vncserver /usr/bin
chmod +x /usr/bin/dispmanx_vncserver
sudo modprobe evdev
cp dispmanx_vncserver.conf.sample /etc/dispmanx_vncserver.conf
vi /etc/dispmanx_vncserver.conf

Now in this editor youā€™ll see the serversā€™ password and frame rate. If you want a password set it up here. I have my framerates at 23. You can start editing the file by pressing i , once you are doneā€¦press Esc then type :qw to save and exit. If you made a mistake then type :q! to force exit and then try again.
After all that we need to make the server a system service so it loads on boot. Do the following:

vi /etc/systemd/system/dispmanx_vncserver.service

And copy/paste this text there (dont forget to press i first) :

[Unit]
Description=VNC Server
After=network-online.target mediacenter.service
Requires=mediacenter.service

[Service]
Restart=on-failure
RestartSec=30
Nice=15
User=root
Group=root
Type=simple
ExecStartPre=/sbin/modprobe evdev
ExecStart=/usr/bin/dispmanx_vncserver
KillMode=process

[Install]
WantedBy=multi-user.target

Again, save and exit the file. Then do :

systemctl start dispmanx_vncserver.service
systemctl enable dispmanx_vncserver.service
systemctl daemon-reload

Thats itā€¦the vnc server now will autorestart on boot.

Edit: I cant edit my first postā€¦cause the editor wont let me post the thread in the HowTo sectionā€¦can a mod please tell me how to do it ?

2 Likes

It worked like a charm! Thank you very much!

1 Like