Run script after boot
Run script after boot
Hi my name is Claudio;
i have to run this script during startup:
#!/bin/sh
x0vncserver --PassordFile==/home/guest/.vnc/passwd
this script start a vnc server to the machine, i execute chmod a+x and if i execute manualy work but if i try to put in autostart for example using rc.local or porteus settings center don't work at all:(
any suggest ?
thaks a lot for your help!
i have to run this script during startup:
#!/bin/sh
x0vncserver --PassordFile==/home/guest/.vnc/passwd
this script start a vnc server to the machine, i execute chmod a+x and if i execute manualy work but if i try to put in autostart for example using rc.local or porteus settings center don't work at all:(
any suggest ?
thaks a lot for your help!
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Run script after boot
call this script with 'guiexec=' cheatcode and all should be good.
Please add [Solved] to your thread title if the solution was found.
Re: Run script after boot
Thanks for your replay today i'll try and i'll post my report
Re: Run script after boot
I think there is something i don't understand...
now i edit rc.local like this :
guiexec=/home/guest/Desktop/Script.sh ( this is the path of my script).
i have not change my script, is the same of the first post whith permission chmod a+x. I try to reboot the sistem but nothing happens.
i olso try whith Porteus Settings Center -> boot options -> startup script i wrote this comand :
#!/bin/sh
guiexec=Xvncserver ..PasswordFile=/home/guest/.vnc/passwd
reboot the sistem and olso in this case nothing happens
Where am i wrong ?
thanks for all
now i edit rc.local like this :
guiexec=/home/guest/Desktop/Script.sh ( this is the path of my script).
i have not change my script, is the same of the first post whith permission chmod a+x. I try to reboot the sistem but nothing happens.
i olso try whith Porteus Settings Center -> boot options -> startup script i wrote this comand :
#!/bin/sh
guiexec=Xvncserver ..PasswordFile=/home/guest/.vnc/passwd
reboot the sistem and olso in this case nothing happens
Where am i wrong ?
thanks for all
Re: Run script after boot
guiexec=my_script
guiexec=firefox;pidgin
... Execute specified command(s) in runlevel 4, when the graphical
interface is loaded; unlike 'cliexec' this cheatcode can be
used to start graphical applications.
Use semicolons (;) as command separators with no spaces.
... If you need to use spaces in the command line, replace them
with '~'.
Example: 'guiexec=firefox~kernel.org' will open the firefox
browser on the 'kernel.org' website.
hi this can explain better fanthom suggestion you have to put this in the boot line i think..
guiexec=firefox;pidgin
... Execute specified command(s) in runlevel 4, when the graphical
interface is loaded; unlike 'cliexec' this cheatcode can be
used to start graphical applications.
Use semicolons (;) as command separators with no spaces.
... If you need to use spaces in the command line, replace them
with '~'.
Example: 'guiexec=firefox~kernel.org' will open the firefox
browser on the 'kernel.org' website.
hi this can explain better fanthom suggestion you have to put this in the boot line i think..
Re: Run script after boot
Thanks beny for your replay;
So now i write in porteus setting center this : guiexec=lxterminal~x0vncserver~--PasswordFile=/home/.vnc/passwd and nothing happens.
i olso try to write this in porteus setting center : guiexec=firefox~google.com and nothing happens too
there is something wrong again?
So now i write in porteus setting center this : guiexec=lxterminal~x0vncserver~--PasswordFile=/home/.vnc/passwd and nothing happens.
i olso try to write this in porteus setting center : guiexec=firefox~google.com and nothing happens too
there is something wrong again?
Re: Run script after boot
hi claudio,
LABEL gui
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus guiexec=firefox;pidgin
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
you have to adds the line that interest you in the append line as above, i have tried and work, with thunar as root you have to enter in boot directory open the porteus.cfg and add your line, save the file and reboot ,can be another way? i don't know if this is possible via porteus setting centre
have you tried the startup script into the porteus setting centre?
LABEL gui
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus guiexec=firefox;pidgin
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
you have to adds the line that interest you in the append line as above, i have tried and work, with thunar as root you have to enter in boot directory open the porteus.cfg and add your line, save the file and reboot ,can be another way? i don't know if this is possible via porteus setting centre
have you tried the startup script into the porteus setting centre?
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Run script after boot
The above file can be found at: /mnt/sdxY/boot/syslinux/porteus.cfg where sdxY is the partition of your Porteus install.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Run script after boot
once again:
create a script -> call it from guiexec
sample: guiexec=my_script.sh
no need for this:
create a script -> call it from guiexec
sample: guiexec=my_script.sh
no need for this:
Code: Select all
guiexec=lxterminal~x0vncserver~--PasswordFile=/home/.vnc/passwd
Please add [Solved] to your thread title if the solution was found.
Re: Run script after boot
Ty to all for the reply ;
so i try to do as beny suggest i find the file and i edit it with leafpad in super user terminal so :
LABEL gui
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus guiexec=firefox <---------------------- !!!!
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
Reboot the sistem and nothing happens firefox will not start, i don't try with my script because i thing if firefox will not start there are some problems.
I have a question for fanthom :
you say me that i have to create a script and call it from guiexec i m not a linux user and i don't know very well linux ambient so can you explain me better what you mean ?
i create my script you can see it in my firs post so now i have to call it from giuexec ... ok where ? how ? can you do an example ?
i try to call with guiexec in rc.local in this mode; editi rc.local with super user terminal and add this line "guiexec=lxterminal~x0vncserver~--PasswordFile=/home/.vnc/passwd "
for me this scritp open lxterminal and call the comand x0vncserver .... ...
Just another thing that i don't say first i use porteus installed on pc not in fresh mode i use the official guide here "Installing Porteus to a USB Flash Drive (from Linux)" http://www.porteus.org/tutorials/37-ins ... #USB-linux
thanks again for you support without you i'm totally lost !!
so i try to do as beny suggest i find the file and i edit it with leafpad in super user terminal so :
LABEL gui
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus guiexec=firefox <---------------------- !!!!
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
Reboot the sistem and nothing happens firefox will not start, i don't try with my script because i thing if firefox will not start there are some problems.
I have a question for fanthom :
you say me that i have to create a script and call it from guiexec i m not a linux user and i don't know very well linux ambient so can you explain me better what you mean ?
i create my script you can see it in my firs post so now i have to call it from giuexec ... ok where ? how ? can you do an example ?
i try to call with guiexec in rc.local in this mode; editi rc.local with super user terminal and add this line "guiexec=lxterminal~x0vncserver~--PasswordFile=/home/.vnc/passwd "
for me this scritp open lxterminal and call the comand x0vncserver .... ...
Just another thing that i don't say first i use porteus installed on pc not in fresh mode i use the official guide here "Installing Porteus to a USB Flash Drive (from Linux)" http://www.porteus.org/tutorials/37-ins ... #USB-linux
thanks again for you support without you i'm totally lost !!
Re: Run script after boot
hi claudio what desktop you use for,make the script executable and put in usr/bin or etc/rc.d and use the guiexec with the path of your script do a try please
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Run script after boot
'guiexec=firefox' works perfectly here.
your changes must break something... - try in 'always fresh' mode.
your changes must break something... - try in 'always fresh' mode.
Please add [Solved] to your thread title if the solution was found.
Re: Run script after boot
Today i reinstall porteus follow the official guide again for work in a clean ambient.
i do as beny suggest so i create my script (call Script.sh) make it executable and put it in usr/bin and in /mnt/sdxY/boot/syslinux/porteus.cfg i write this:
*
*
APPEND initrd=initrd.xz changes=/porteus guiexec=/urs/bin/Script.sh
*
*
The script still does not start yet !
i don't try in always fresh mode because i don't need it work in this mode i have to work in not always fresh mode for a better management and future support.
So my script if lunched by me after boot work perfectly, open a terminal and start vncserver as listener, but I can not start it automatically.
i do as beny suggest so i create my script (call Script.sh) make it executable and put it in usr/bin and in /mnt/sdxY/boot/syslinux/porteus.cfg i write this:
*
*
APPEND initrd=initrd.xz changes=/porteus guiexec=/urs/bin/Script.sh
*
*
The script still does not start yet !
i don't try in always fresh mode because i don't need it work in this mode i have to work in not always fresh mode for a better management and future support.
So my script if lunched by me after boot work perfectly, open a terminal and start vncserver as listener, but I can not start it automatically.
Re: Run script after boot
hi claudio do a try rename your script with a rc.your script and also type start and put in in etc/rc.d folder not inside rc local
rc.script.sh start do a try if start automatically, btw you have to change your pat in guiexec
rc.script.sh start do a try if start automatically, btw you have to change your pat in guiexec
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Run script after boot
Make sure the script is executable: chmod +x /usr/bin/Script.sh
guiexec=/urs/bin/Script.sh <--- make sure urs is really usr in porteus.cfg.
guiexec= works fine here too, so if you are not prepared to try in fresh mode we can't help further. Something in changes is affecting it and we can't tell what it is.
guiexec=/urs/bin/Script.sh <--- make sure urs is really usr in porteus.cfg.
guiexec= works fine here too, so if you are not prepared to try in fresh mode we can't help further. Something in changes is affecting it and we can't tell what it is.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.