Multiple Save File Boot Question

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

Multiple Save File Boot Question

#1 Post by DaveS »

One of the most exciting features of Puppy is the ability to have multiple save files, and select the required via the menu that appears on boot up. Effectively allowing the appearance of having multiple computers. However, my question is, 'is it possible to give this menu a timeout?'
In other words, if no selection is made after a short time, it defaults to loading the first save file in the list?
Presumably this would require editing initrd.gz?
Spup Frugal HD and USB
Root forever!

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#2 Post by SFR »

Yeah, it's a matter of initrd.gz/init script.

Find the following line:

Code: Select all

read NUMSAVE
and replace it with:

Code: Select all

read -t5 NUMSAVE; [ ! "$NUMSAVE" ] && NUMSAVE=1
Timeout is 5 sec. Works for me in Slacko-5.5.

Or maybe something more fancy (it's a single line):

Code: Select all

for i in `seq 5 -1 0`; do echo -e "\033[35mThe 1st savefile will be auto loaded in $i seconds." > /dev/console; read -t1 NUMSAVE && break; echo -e '\033[2A' >/dev/console; done; [ ! "$NUMSAVE" ] && NUMSAVE=1
BTW, if you have less than 10 savefiles, you can also add '-n1' parameter to 'read' command:
read -t5 -n1 NUMSAVE (1st example) or read -t1 -n1 NUMSAVE (2nd eg.)
Thanks to it there won't be need to press enter after making a choice.

A note about editing initrd.gz:
In newer Pups it's enough to click initrd.gz in order to extract it and edit, then click again to compress.
In older Pups there may be need to do it manually:
http://www.murga-linux.com/puppy/viewtopic.php?t=53019
http://www.murga-linux.com/puppy/viewto ... 289#309289
And of course making backup before proceeding is recommended.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#3 Post by DaveS »

Thanks. Wow, editing initrd got way easier since the last time I did it. Thanks for the tip!
Spup Frugal HD and USB
Root forever!

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#4 Post by R-S-H »

DaveS wrote:Thanks. Wow, editing initrd got way easier since the last time I did it. Thanks for the tip!
Edit the initrd.gz with right-click-action
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#5 Post by DaveS »

R-S-H wrote:
DaveS wrote:Thanks. Wow, editing initrd got way easier since the last time I did it. Thanks for the tip!
Edit the initrd.gz with right-click-action
Guess I would need to install 'rightclicks' for that? It is not offered as an option in Slacko 5.5 standard.
Works like a charm BTW
Spup Frugal HD and USB
Root forever!

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#6 Post by R-S-H »

Yes, in newer puppies the right-click menu is different.

The right-click symbolic links are going to:

/root/.config/rox.sourceforge.net/OpenWith/.application_x-gzip

and

/root/.config/rox.sourceforge.net/OpenWith/.inode_directory

after installing the .pet.

In newer puppies one has to configure the ROX right-click-menu manually, because the initrd.gz has its own "OpenWith"-directory.

Just copy or move the file from /root/.config/rox.sourceforge.net/OpenWith/.application_x-gzip to the directory that opens up in your puppy when configuring the ROX right-click-menu.

Sorry, I've overseen this...

EDIT:

In my LazY Precise Puppy it is stored in: /root/.config/rox.sourceforge.net/OpenWith/.application_initramfs-gz
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

Post Reply