Where do I edit for a program to start automatically?SOLVED
Where do I edit for a program to start automatically?SOLVED
Hello Everyone,
I would like to have a program to open right after welcome screen to closed?
Do I edit countrywizarrd or xinitrc?
Any help here would be great thanks
I would like to have a program to open right after welcome screen to closed?
Do I edit countrywizarrd or xinitrc?
Any help here would be great thanks
Last edited by oldyeller on Sun 01 Sep 2013, 07:54, edited 1 time in total.
Hi oldyeller !
Probably look into /usr/sbin/delayedrun, which triggers the files in /root/Startup .
That file I think should trigger all the wizards , quicksetup and whatever they are named .
Probably pemasu and micko are the only ones that know the current firstboot structure
At least (and look for)
if [ "$PUPMODE" = 5 ] ; then
test (lines)
is needed I think for your codeblock .
Probably look into /usr/sbin/delayedrun, which triggers the files in /root/Startup .
That file I think should trigger all the wizards , quicksetup and whatever they are named .
Probably pemasu and micko are the only ones that know the current firstboot structure
At least (and look for)
if [ "$PUPMODE" = 5 ] ; then
test (lines)
is needed I think for your codeblock .
Karl Godt wrote:Hi oldyeller !
Probably look into /usr/sbin/delayedrun, which triggers the files in /root/Startup .
That file I think should trigger all the wizards , quicksetup and whatever they are named .
Probably pemasu and micko are the only ones that know the current firstboot structure
At least (and look for)
if [ "$PUPMODE" = 5 ] ; then
test (lines)
is needed I think for your codeblock .
Thanks I will look at that too.
Cheers
Check if welcome1stboot is a script - if it is you should just edit that.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
It's not, it's a compiled bacon app.disciple wrote:Check if welcome1stboot is a script - if it is you should just edit that.
+1 for Karl's suggestion.
Puppy Linux Blog - contact me for access
I have looked at what Karl said about the delayedrun. just not sure on how to do it. I might have to put a script in /root/Startup that will start after welcome1stboot is closed.01micko wrote:It's not, it's a compiled bacon app.disciple wrote:Check if welcome1stboot is a script - if it is you should just edit that.
+1 for Karl's suggestion.
Again not sure on how one would code to check when welcome1stboot is closed. I did try this. but to no avail I'm sure that it is not right.
Code: Select all
if [ welcome1stboot = killall ] then
exec welcome "!@"
fi
I'll leave this for others to answer. In Fatdog64 it is definitely /root/Startup, but not sure on other puppies.oldyeller wrote:I have looked at what Karl said about the delayedrun. just not sure on how to do it. I might have to put a script in /root/Startup that will start after welcome1stboot is closed.
Again not sure on how one would code to check when welcome1stboot is closed. I did try this. but to no avail I'm sure that it is not right.
Code: Select all
# the next line will wait until welcome1stboot is gone
while pidof welcome1stboot > /dev/null; do sleep 1; done
# welcome1stboot is gone, now do whatever you want to do.
do-whatever-you-want-to-do
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
oldyeller,
Another approach would be to put welcome1stboot into a "wrapper" script like this -
rename /usr/sbin/welcome1stboot /usr/sbin/welcome1stboot-bin
Make script called /usr/sbin/welcome1stboot -
When welcome1stboot is called, the above script will run and when the dialog is closed "your script here" will run.
Cheers,
s
Another approach would be to put welcome1stboot into a "wrapper" script like this -
rename /usr/sbin/welcome1stboot /usr/sbin/welcome1stboot-bin
Make script called /usr/sbin/welcome1stboot -
Code: Select all
#!/bin/sh
/usr/sbin/welcome1stboot-bin
#your script here
exit
Cheers,
s
Hi.
You can put a script for that in /root/Startup.
Since the welcome1stboot is a compiled binary you can check if it is still running by 'pidof'
I'm currently running Firefox, so pidof firefox gives me 32146 as the process ID
I'm not running aqualung, so pidof aqualung give me nothing, which means, an empty string --> "" <-- returns.
You could use a loop to sleep 1 second after checking for pidof welcome1stboot is NOT "" and executing the functions of your script after pidof welcome1stboot is "".
This should help.
You can put a script for that in /root/Startup.
Since the welcome1stboot is a compiled binary you can check if it is still running by 'pidof'
I'm currently running Firefox, so pidof firefox gives me 32146 as the process ID
I'm not running aqualung, so pidof aqualung give me nothing, which means, an empty string --> "" <-- returns.
You could use a loop to sleep 1 second after checking for pidof welcome1stboot is NOT "" and executing the functions of your script after pidof welcome1stboot is "".
Code: Select all
BNameOfProg="welcome1stboot"
DontRun="true"
while [ "$DontRun" = "true" ];
do
if [ "`pidof "'$BNameOfProg'"`" != "" ]; then
echo "'$BNameOfProg' is still running"
sleep 1
else
echo "'$BNameOfProg' has been exited"
DontRun="false"
fi
done
Your script functions here
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
For something so simple it worked just fine.seaside wrote:oldyeller,
Another approach would be to put welcome1stboot into a "wrapper" script like this -
rename /usr/sbin/welcome1stboot /usr/sbin/welcome1stboot-bin
Make script called /usr/sbin/welcome1stboot -When welcome1stboot is called, the above script will run and when the dialog is closed "your script here" will run.Code: Select all
#!/bin/sh /usr/sbin/welcome1stboot-bin #your script here exit
Cheers,
s
I did however do some testing before I saw this post. I edited the delayedrun by replacing the welcome1stboot with my own and that worked as well.
Hi RSH,
I did try your as well, but it would start my script even after restarting x-server which is something I don't want to happen. Maybe it is the code
This could be the problem.
I did try your as well, but it would start my script even after restarting x-server which is something I don't want to happen. Maybe it is the code
Code: Select all
#!/bin/sh
BNameOfProg="welcome1stboot"
DontRun="true"
while [ "$DontRun" = "true" ];
do
if [ "`pidof "'$BNameOfProg'"`" != "" ]; then
echo "'$BNameOfProg' is still running"
sleep 1
else
echo "'$BNameOfProg' has been exited"
DontRun="false"
fi
done
/usr/sbin/welcome
exit
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
FYI, Puppy does this in a non-standard way and not in accordance with:
http://standards.freedesktop.org/autost ... atest.html
Since puppy is single user (root), these should all be in:
/etc/xdg/autostart/
and for a multiuser system they should be in:
$HOME/.config/autostart/
For better portability in future Pups I would recommend using these (maybe submit a woof patch to Barry) and making $HOME/Startup a symlink to $HOME/.config/autostart.
http://standards.freedesktop.org/autost ... atest.html
Since puppy is single user (root), these should all be in:
/etc/xdg/autostart/
and for a multiuser system they should be in:
$HOME/.config/autostart/
For better portability in future Pups I would recommend using these (maybe submit a woof patch to Barry) and making $HOME/Startup a symlink to $HOME/.config/autostart.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].