SliTaz SliTaz Forum

You are not logged in.

#1 2012-08-09 20:39:16

bekax5
Member
Registered: 2012-08-09
Posts: 5

Autorun

Hello,

I am new to Slitaz, and if possible i would need some help.

I would like to know which file i can edit to add a few commands to autorun after boot is complete.

I need vncserver to start automaticaly after boot (not after login) and also a command to be executed after that vncserver one.

Thanks,

Best regards.

Offline

#2 2012-08-09 22:06:22

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: Autorun

Either edit /etc/init.d/local.sh or use this SliTaz Panel link below:

http://tazpanel:82/index.cgi?file=/etc/init.d/local.sh&action=edit

Offline

#3 2012-08-09 23:33:49

bekax5
Member
Registered: 2012-08-09
Posts: 5

Re: Autorun

Thank you for the answer.

I tried to add the "vncserver :1" to the "local.sh" already but the vnc starts with gray screen.

It looks like something screen related isn't started yet.

I'm going to try that link in a second.

Thanks,

Best regards.

Offline

#4 2012-08-10 00:33:38

bekax5
Member
Registered: 2012-08-09
Posts: 5

Re: Autorun

the links redirects to the same file with a nicer visual tongue

It still happens, i launch the vncserver through the "local.sh" and it starts gray and i can't do anything.

If i start through the console at a later time i can get a right vnc.

Is there any other file i can write boot commands?

Best regards.

Offline

#5 2012-08-10 02:04:27

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: Autorun

Looks like the vncserver needs to be run after login. That leaves a few files that can be used, like Openbox's autostart.sh file (which can be found as Auto started applications under Applications Menu--> Preference or Autostart script under the right click menu--> Openbox). There is also the .profile file under your home directory (hidden by default).

The difference between the two is one is run after Openbox is started and the other is run right after you login before X.org gets started.

Offline

#6 2012-08-10 11:39:12

bekax5
Member
Registered: 2012-08-09
Posts: 5

Re: Autorun

I tried to mess with the .xinitrc and autostart.sh

The thing is, if vncserver runs over openbox-session the autostart.sh opens infinite sessions because each time a vncserver is executed, autostart.sh is also executed

if it's not run over openbox it doesn't run even a single time!

Same thing happens with .xinitrc, i can't get it to run one time!

One thing, should i use "exec vncserver" or only "vncserver" ?

Thanks,

Regards.

Offline

#7 2012-08-10 14:18:11

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: Autorun

You should use exec for the last command in the script. It's one of those weird practices that nobody knows where it comes from anymore.

From my experience with VNC, it doesn't like X to be running on the same screen as itself - with TightVNC anyway. Standard posts also gets hammered, so use a non-standard one. You should also be logged in to use it. Beyond that I know very little about it because I use it with a Debian box.

I would still say .profile is your best bet because it's run before X.org and after login.

Offline

#8 2012-08-10 15:28:15

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Autorun

Try http://cook.slitaz.org/cooker.cgi?pkg=x11vnc :

# tazpkg get-install x11vnc

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]