Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 15 Aug 2018, 18:10
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Which of the shell script runs last on startup?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
WIckedWitch

Joined: 29 Mar 2018
Posts: 198
Location: West Wales bandit country

PostPosted: Sat 12 May 2018, 15:42    Post subject:  Which of the shell script runs last on startup?
Subject description: Sorry - I never remember configuration stuff
 

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?

_________________
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 Confused
Back to top
View user's profile Send private message 
OscarTalks


Joined: 05 Feb 2012
Posts: 1792
Location: London, England

PostPosted: Sat 12 May 2018, 16:24    Post subject:  

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.

_________________
Oscar in England

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5121
Location: Republic of Novo Zelande

PostPosted: Sat 12 May 2018, 16:35    Post subject:  

Make your script and place it in /root/Startup.

Call it "zzzpmccputemp". Pretty sure scripts run in alphabetical order. Thats how i do it anyway.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12556
Location: Gatineau (Qc), Canada

PostPosted: Sat 12 May 2018, 20:54    Post subject:  

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:
Code:
#... (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)

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.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
WIckedWitch

Joined: 29 Mar 2018
Posts: 198
Location: West Wales bandit country

PostPosted: Sun 13 May 2018, 14:27    Post subject:  

OscarTalks 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.


Yep - putting a script in /root/Startup worked. Thanks to all for replies Smile

Mods pls feel free to move this thread elsewhere if I've not started it in the appropriate place.

_________________
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 Confused

Last edited by WIckedWitch on Sun 13 May 2018, 15:03; edited 3 times in total
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 897

PostPosted: Sun 13 May 2018, 14:40    Post subject:  

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)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12556
Location: Gatineau (Qc), Canada

PostPosted: Sun 13 May 2018, 15:41    Post subject:  

Hi gang.

Tangent, but off-topic*, provided with the hope of thoroughly
confusing your neurones Twisted Evil , 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
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 727
Location: Connecticut, United States

PostPosted: Thu 17 May 2018, 19:58    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0404s ][ Queries: 14 (0.0037s) ][ GZIP on ]