Start x11vnc at boot

Everything about external control, apps, VNC, etc goes here.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Start x11vnc at boot

Postby Erik007 » Mon Feb 25, 2019 8:00 pm

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
Erik007
Starting Member
Starting Member
 
Posts: 16
Joined: February 2019

Re: Start x11vnc at boot

Postby mAiden » Mon Feb 25, 2019 8:08 pm

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. :)
mAiden
Member
Member
 
Posts: 226
Joined: July 2017

Re: Start x11vnc at boot

Postby Erik007 » Tue Feb 26, 2019 10:56 am

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 ..
Erik007
Starting Member
Starting Member
 
Posts: 16
Joined: February 2019

Re: Start x11vnc at boot

Postby Toonz » Tue Feb 26, 2019 11:14 am

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
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1107
Joined: December 2016

Re: Start x11vnc at boot

Postby mAiden » Tue Feb 26, 2019 12:14 pm

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)
mAiden
Member
Member
 
Posts: 226
Joined: July 2017

Re: Start x11vnc at boot

Postby NLKris » Mon May 20, 2019 9:39 pm

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.
NLKris
Starting Member
Starting Member
 
Posts: 11
Joined: January 2019

Re: Start x11vnc at boot

Postby PeJeWe » Tue May 21, 2019 7:36 pm

how can we shutdown x11vnc manually?
PeJeWe
Starting Member
Starting Member
 
Posts: 21
Joined: April 2019

Re: Start x11vnc at boot

Postby mAiden » Tue May 21, 2019 8:40 pm

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
mAiden
Member
Member
 
Posts: 226
Joined: July 2017

Re: Start x11vnc at boot

Postby PeJeWe » Tue May 21, 2019 8:48 pm

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
PeJeWe
Starting Member
Starting Member
 
Posts: 21
Joined: April 2019

Re: Start x11vnc at boot

Postby mAiden » Tue May 21, 2019 10:14 pm

You did it wrong.

You did: ps - -x

Most be: ps x
mAiden
Member
Member
 
Posts: 226
Joined: July 2017

Re: Start x11vnc at boot

Postby PeJeWe » Tue May 21, 2019 10:19 pm

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.
PeJeWe
Starting Member
Starting Member
 
Posts: 21
Joined: April 2019


Return to Toon external control

Who is online

Users browsing this forum: No registered users and 0 guests