Just a quickie that someone will probably know off the top of their head;
I want to make the pmcputemp program run and have the temperature visible in the tray when I start up tahrpup-6.0.5. Which of the startup shell scripts do I have to put the command in?
Which of the shell script runs last on startup?
-
- Posts: 276
- Joined: Thu 29 Mar 2018, 22:13
- Location: West Wales bandit country
Which of the shell script runs last on startup?
Sometimes I post mindfully, sometimes not mindfully, and sometimes both mindfully and not mindfully. It all depends on whether and when my mind goes walkies while I'm posting :?
- OscarTalks
- Posts: 2196
- Joined: Mon 06 Feb 2012, 00:58
- Location: London, England
Recommended way is to use a .desktop file in /root/.config/autostart
A script or symlink in /root/Startup will still also work as an alternative, but they are trying to phase that mechanism out apparently.
The mods might move this as it does not really belong in the HOWTO (Solutions) section.
Best to post questions in the Beginners or Users section.
A script or symlink in /root/Startup will still also work as an alternative, but they are trying to phase that mechanism out apparently.
The mods might move this as it does not really belong in the HOWTO (Solutions) section.
Best to post questions in the Beginners or Users section.
Oscar in England
Yep. In /root/Startup is good.
From experience, I can tell you that some window managers or panels
do NOT pick up what's in /root/.config/autostart. E.g. echinus, pekwm,
bmpanel2.
The new jwm tray picks up stuff in /root/.config/autostart.. But be on
the alert, double-check, if you are using any other WM.
I had to write a special script for bmpanel2's tray:
I have to kill netmon_wce, freememapplet_tray, powerapplet_tray,
firewallstatus, retrovol and yad, and restart them to get them to appear
in the bmpanel2 tray.
Greengeek is right, scripts/progs in ~/Startup are run in alphabetical
order.
So the answer to your question is:
the last script to run during startup is the one whose first letter in the
name is closest to "z" in ~/Startup.
IHTH.
From experience, I can tell you that some window managers or panels
do NOT pick up what's in /root/.config/autostart. E.g. echinus, pekwm,
bmpanel2.
The new jwm tray picks up stuff in /root/.config/autostart.. But be on
the alert, double-check, if you are using any other WM.
I had to write a special script for bmpanel2's tray:
Code: Select all
#... (excerpt)
echinus|pekwm|waimea|wmx)if [ "`pgrep bmpanel2`" ];then killall -q bmpanel2
else
for i in netmon_wce freememapplet_tray powerapplet_tray firewallstatus retrovol;do
killall -q $i
done
# kill -s 15 `ps | awk '$4=="yad" && $6 ~ /Boussole/ { print $1}'`
cd /root/.config/autostart # Other WMs do not seem to pick up the autostart list.
ls -1 *.desktop > /tmp/autostart.lst
while read starts;do
Exec="`awk -F"=" '$1 ~ /Exec/ { print $2 }' $starts | awk '{ print $1 }'`"
[ "`pgrep $Exec`" ] || rox $starts
done < /tmp/autostart.lst
sleep 0.4s
#... (excerpt)
firewallstatus, retrovol and yad, and restart them to get them to appear
in the bmpanel2 tray.
Greengeek is right, scripts/progs in ~/Startup are run in alphabetical
order.
So the answer to your question is:
the last script to run during startup is the one whose first letter in the
name is closest to "z" in ~/Startup.
IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
-
- Posts: 276
- Joined: Thu 29 Mar 2018, 22:13
- Location: West Wales bandit country
Yep - putting a script in /root/Startup worked. Thanks to all for repliesOscarTalks wrote:Recommended way is to use a .desktop file in /root/.config/autostart
A script or symlink in /root/Startup will still also work as an alternative, but they are trying to phase that mechanism out apparently.
The mods might move this as it does not really belong in the HOWTO (Solutions) section.
Best to post questions in the Beginners or Users section.
Mods pls feel free to move this thread elsewhere if I've not started it in the appropriate place.
Last edited by WIckedWitch on Sun 13 May 2018, 19:03, edited 3 times in total.
Sometimes I post mindfully, sometimes not mindfully, and sometimes both mindfully and not mindfully. It all depends on whether and when my mind goes walkies while I'm posting :?
In Fatdog placing script in /root/Startup works.
There's no /root/.config/autostart folder though.
I don't know creating one will work.
There are also /etc/xdg/autostart and /etc/xdg/Startup folders which also run scripts/.desktop files on startup. (but this maybe only for fatdog, as these are for multiuser system)
There's no /root/.config/autostart folder though.
I don't know creating one will work.
There are also /etc/xdg/autostart and /etc/xdg/Startup folders which also run scripts/.desktop files on startup. (but this maybe only for fatdog, as these are for multiuser system)
Hi gang.
Tangent, but off-topic*, provided with the hope of thoroughly
confusing your neurones , here are a couple of other places
where you can start scripts from:
/etc/rc.d/rc.local
/etc/init.d
* (It's off topic because scripts placed in /etc/init.d or in the rc.local file
will run in the middle of the startup process, not at the very end. Use
these locations with care, BTW. If you start something too early
in the process, it may not work, or may prevent another script
from running, or cancel it out.)
BFN.
Tangent, but off-topic*, provided with the hope of thoroughly
confusing your neurones , here are a couple of other places
where you can start scripts from:
/etc/rc.d/rc.local
/etc/init.d
* (It's off topic because scripts placed in /etc/init.d or in the rc.local file
will run in the middle of the startup process, not at the very end. Use
these locations with care, BTW. If you start something too early
in the process, it may not work, or may prevent another script
from running, or cancel it out.)
BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
I use both to start during boot apache, mariadb, php 7 zoneminder.
I have to use start scripts in the correct order or for example the starting of zoneminder will fail if the mariadb is not fully started first ... so using
/etc/rc.d/rc.local
/etc/init.d
to spread the start scripts out makes it all work smoothly.
I have to use start scripts in the correct order or for example the starting of zoneminder will fail if the mariadb is not fully started first ... so using
/etc/rc.d/rc.local
/etc/init.d
to spread the start scripts out makes it all work smoothly.