Page 1 of 1

Start x11vnc at boot

Posted: Mon Feb 25, 2019 9:00 pm
by Erik007
Maybe handy for someone else.
I created a rc.local
( rc.local can be used to do some things after boot)
and a startupfile for x11vnc



I wanted x11vnc to start at boot and did the following:

touch rc.local
ln -s /etc/rc.local /etc/rc5.d/S99rc

vi /etc/rc.local
======
#!/bin/sh
set -e
/usr/bin/startx11.sh &

exit 0
======
chmod 755 /etc/rc.local


vi /usr/bin/startx11.sh
======
#!/bin/sh
set PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"

exec 2> /tmp/startx11.log
exec 1>&2

su - root -c "/usr/bin/x11vnc :0 &" &
=======
chmod 755 /usr/bin/startx11.sh

Re: Start x11vnc at boot

Posted: Mon Feb 25, 2019 9:08 pm
by mAiden
Will advise you to use x11vnc only when you need it.
On Toon1, this actually eats processor space, and you just need this space to let Toon run properly, without having to restart itself.
That's my opinion. :)

Re: Start x11vnc at boot

Posted: Tue Feb 26, 2019 11:56 am
by Erik007
Here some data:

5 minuten na startup - met starten x11vnc - tigervnc not connected

Mem: 109748K used, 16448K free, 128K shrd, 0K buff, 38160K cached
CPU: 3.5% usr 5.1% sys 0.0% nic 91.2% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 0.43 0.66 0.32 1/140 1629

5 minuten na startup - met x11vnc - met tigervnc connected

Mem: 113532K used, 12664K free, 128K shrd, 0K buff, 38624K cached
CPU: 7.3% usr 3.1% sys 0.0% nic 89.5% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 1.64 0.81 0.46 1/140 2180

5 minuten na startup - zonder x11vnc te starten

Mem: 105412K used, 20784K free, 120K shrd, 0K buff, 37428K cached
CPU: 4.1% usr 5.1% sys 0.0% nic 90.6% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 0.64 0.57 0.29 1/139 1679

So as you can see;
memory for loading program, about 4000K
with tigervnc connected another 4000K
Processor usage with 0.32; without about 0.29 -- 0.03 not a very big difference
Processor usage with tigervnc, about -- 0.17

So, unless you need that 4000K extra memory ..

Re: Start x11vnc at boot

Posted: Tue Feb 26, 2019 12:14 pm
by Toonz
Erik007 wrote:So, unless you need that 4000K extra memory ..
Especially on a Toon1 with lot of custom apps installed, this could mean the difference between stable operations and spontaneous reboots because of lack of RAM

Re: Start x11vnc at boot

Posted: Tue Feb 26, 2019 1:14 pm
by mAiden
Toonz wrote:
Erik007 wrote:So, unless you need that 4000K extra memory ..
Especially on a Toon1 with lot of custom apps installed, this could mean the difference between stable operations and spontaneous reboots because of lack of RAM
This is what I meant, Toon1 only has 128MB DDR on 133Mhz (and 128MB NAND flash). Especially with many custom apps installed, he really needs this space.
On Toon2 is this not a issue, then we talk about it 512Mb DDR3 @ 800Mhz (and 4Gb eMMC Flash, support up to 8GB)

Re: Start x11vnc at boot

Posted: Mon May 20, 2019 10:39 pm
by NLKris
I've tried this on a Toon 1. My Toon did not start up futher than +/- 15%. Thank god that dropbear is one of the first things to start. After connecting with SSH and deleting the files i've made in the steps on top of this, its back alive.

Re: Start x11vnc at boot

Posted: Tue May 21, 2019 8:36 pm
by PeJeWe
how can we shutdown x11vnc manually?

Re: Start x11vnc at boot

Posted: Tue May 21, 2019 9:40 pm
by mAiden
PeJeWe wrote:how can we shutdown x11vnc manually?
First do:

Code: Select all

ps x
This will give you a list with all the process al running on Toon.
Then look up for VNC, and hes PID, it stands at the beginning.

then run:

Code: Select all

kill -9 PID

Re: Start x11vnc at boot

Posted: Tue May 21, 2019 9:48 pm
by PeJeWe
mAiden wrote:
PeJeWe wrote:how can we shutdown x11vnc manually?
First do:

Code: Select all

ps x
This will give you a list with all the process al running on Toon.
Then look up for VNC, and hes PID, it stands at the beginning.

then run:

Code: Select all

kill -9 PID
i get an error

Code: Select all

eneco-001-289077:~# ps --x
ps: unrecognized option '--x'
BusyBox v1.27.2 (2017-10-03 14:20:01 CEST) multi-call binary.

Usage: ps

Show list of processes

        w       Wide output
        l       Long output
        T       Show threads
i get no list

Re: Start x11vnc at boot

Posted: Tue May 21, 2019 11:14 pm
by mAiden
You did it wrong.

You did: ps - -x

Most be: ps x

Re: Start x11vnc at boot

Posted: Tue May 21, 2019 11:19 pm
by PeJeWe
mAiden wrote:You did it wrong.

You did: ps - -x

Most be: ps x

Code: Select all

eneco-001-289077:~# ps x
ps: invalid option -- 'x'
BusyBox v1.27.2 (2017-10-03 14:20:01 CEST) multi-call binary.

Usage: ps

Show list of processes

        w       Wide output
        l       Long output
        T       Show threads
eneco-001-289077:~# 
Did not work also.

Edit:

I rebooted my toon, now it is offline.