Start x11vnc at boot
Moderators: marcelr, TheHogNL, Toonz
Start x11vnc at boot
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
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
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.
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.

Member of the Toon Software Collective
Re: Start x11vnc at boot
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 ..
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
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 RAMErik007 wrote:So, unless you need that 4000K extra memory ..
member of the Toon Software Collective
Re: Start x11vnc at boot
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.Toonz wrote: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 RAMErik007 wrote:So, unless you need that 4000K extra memory ..
On Toon2 is this not a issue, then we talk about it 512Mb DDR3 @ 800Mhz (and 4Gb eMMC Flash, support up to 8GB)
Member of the Toon Software Collective
Re: Start x11vnc at boot
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
how can we shutdown x11vnc manually?
Rooted Toon 1, Domoticz running on a RPI3b+, RFXCOM XL, RFLINK.
Re: Start x11vnc at boot
First do:PeJeWe wrote:how can we shutdown x11vnc manually?
Code: Select all
ps x
Then look up for VNC, and hes PID, it stands at the beginning.
then run:
Code: Select all
kill -9 PID
Member of the Toon Software Collective
Re: Start x11vnc at boot
i get an errormAiden wrote:First do:PeJeWe wrote:how can we shutdown x11vnc manually?
This will give you a list with all the process al running on Toon.Code: Select all
ps x
Then look up for VNC, and hes PID, it stands at the beginning.
then run:
Code: Select all
kill -9 PID
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
Rooted Toon 1, Domoticz running on a RPI3b+, RFXCOM XL, RFLINK.
Re: Start x11vnc at boot
You did it wrong.
You did: ps - -x
Most be: ps x
You did: ps - -x
Most be: ps x
Member of the Toon Software Collective
Re: Start x11vnc at boot
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:~#
Edit:
I rebooted my toon, now it is offline.
Rooted Toon 1, Domoticz running on a RPI3b+, RFXCOM XL, RFLINK.