How to install a Pet file from the command line?
How to install a Pet file from the command line?
Is there a command line statement that will install a pet file without being in X?
maybe this?
http://www.murga-linux.com/puppy/viewtopic.php?p=333801
this may be useful, too
http://www.murga-linux.com/puppy/viewtopic.php?t=39109
Aitch
http://www.murga-linux.com/puppy/viewtopic.php?p=333801
this may be useful, too
http://www.murga-linux.com/puppy/viewtopic.php?t=39109
Aitch
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
or something like this should work most of the time
wget -c http://URL/package.pet
pet2tgz package.pet
tar -xf package.tar.gz /
/.pinstall.sh
rm /.pinstall.sh
wget -c http://URL/package.pet
pet2tgz package.pet
tar -xf package.tar.gz /
/.pinstall.sh
rm /.pinstall.sh
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].
petget at command line noX
You should try "petget +<package name>" to install
"petget -<package name>" to uninstall
Just to clarify:
when installing, use an absolute path.
eg: #petget +/root/downloads/firefox-3.0.pet
when uninstalling, don't specify name with suffix, only package name.
eg: #petget -firefox-3.0
"petget -<package name>" to uninstall
Just to clarify:
when installing, use an absolute path.
eg: #petget +/root/downloads/firefox-3.0.pet
when uninstalling, don't specify name with suffix, only package name.
eg: #petget -firefox-3.0
I resume this topic to know if there are some updates...
I want to make a little script that will install a bunch of pets so I can avoid the hassle of doing it one by one every time I need to make a new savefile...
Of course there must be no confirmation dialogs etc... error handling is welcome but I'd use it only with already well tested pets.
Of course I want to be able to uninstall every single pet installed with this script via classic Package manager.
Any tip?
I want to make a little script that will install a bunch of pets so I can avoid the hassle of doing it one by one every time I need to make a new savefile...
Of course there must be no confirmation dialogs etc... error handling is welcome but I'd use it only with already well tested pets.
Of course I want to be able to uninstall every single pet installed with this script via classic Package manager.
Any tip?
-
- Posts: 35
- Joined: Thu 23 Dec 2010, 00:58
- Location: Gurabo, Puerto Rico
- Contact:
Copy and Paste This Save as "petall" (PET Install)
To Do Multiple I Would Suggest Making a Folder where all the pets are (of the program/lib you want are the only ones in the folder)
in the terminal
cd /dir/to/pet/files/folder
pet2tgz ./*
tar -xf ./*
Now you should have all the packages in separated folders, now just copy and paste all of the contents into another new folder (SAME DIRECTORY)
example
dir1/
bin/
app
usr/
lib/
lib.so
pet.specs
move each FOLDER (Not The Files, it'll take you longer obviously)(Forget About the pet.specs)
into one New Folder and now just close the folder
it should look like this
dir1/
<EMPTY>
pet.specs
dir2/
bin/
app
app2
usr/
lib/
lib.so
lib2.so
and in the terminal
dir2pet <FOLDER_NAME_WHERE_ALL_THE_FILES_ARE>
#^^ __Not The bin folder, the main folder (example dir would be dir2)
in the GUI window you'll just select stuff, put the package ID and Author,
The Section (if a Library, chose BuildBlock)
the rest is self done so click ok
and now
petget <THE_FINAL_DOTPET_IS_NAMED_JUST_LIKE_THE_FOLDER>
Or Just Click the pet file and install
lol I think I wrote something noob friendly xD lol No Offense
I'm Currently Doing Something Like That[/code]
For WITHOUT X just use the terminal Command above (Green Text)
And It should work still :3
Code: Select all
#!/bin/sh
if [ $1 = "" ]; then
echo "Usage :: petall /dir/to/pet/file "\("Don't Put The .pet at the end"\)""
exit 0
fi
if [ -f "$1" ]; then
pet2tgz "$1".pet
tar -xf "$1".tar.gz
cd "$1"
if [ -f ./pinstall.sh ]; then
./pinistall.sh
exit 0
fi
if [ -f ./.pinstall.sh ]; then
./.pinstall.sh
exit 0
fi
rm -rf ./pet.specs
mv -rf ./* /
echo "Done"
exit 0
fi
in the terminal
cd /dir/to/pet/files/folder
pet2tgz ./*
tar -xf ./*
Now you should have all the packages in separated folders, now just copy and paste all of the contents into another new folder (SAME DIRECTORY)
example
dir1/
bin/
app
usr/
lib/
lib.so
pet.specs
move each FOLDER (Not The Files, it'll take you longer obviously)(Forget About the pet.specs)
into one New Folder and now just close the folder
it should look like this
dir1/
<EMPTY>
pet.specs
dir2/
bin/
app
app2
usr/
lib/
lib.so
lib2.so
and in the terminal
dir2pet <FOLDER_NAME_WHERE_ALL_THE_FILES_ARE>
#^^ __Not The bin folder, the main folder (example dir would be dir2)
in the GUI window you'll just select stuff, put the package ID and Author,
The Section (if a Library, chose BuildBlock)
the rest is self done so click ok
and now
petget <THE_FINAL_DOTPET_IS_NAMED_JUST_LIKE_THE_FOLDER>
Or Just Click the pet file and install
lol I think I wrote something noob friendly xD lol No Offense
I'm Currently Doing Something Like That[/code]
For WITHOUT X just use the terminal Command above (Green Text)
And It should work still :3
Thanks Lord_Solrac2 but your procedure would take me more than the time to install all pets just clicking on them nor I will be then able to uninstall a single package.
What I was looking for, and probably the hard part is to get rid of dialogs, a CLI tool that should work like this (suppose tool is named petjet, I omit versions in pet names):
or even
and will install them one-by-one in a bunch with no more user intervention (given I already tested all pets in a precedent installation and I'm sure they work).
One-by-one part is mandatory sinc I want to be free to, say, later disinstall skype only and replace it with a newer version.
It's not easy, I know, but a kind of Ubuntu apt-get with limited features on install and remove and a force option to assume I always agree to the default option:
- install? => Y
- remove? => Y
- deps missing, install anyway? => Y
- rm -r / ? => N
What I was looking for, and probably the hard part is to get rid of dialogs, a CLI tool that should work like this (suppose tool is named petjet, I omit versions in pet names):
Code: Select all
petjet gimp.pet deadbeef.pet numlockx.pet shell-fm.pet trayfm.pet tinygmc.pet skype.pet ...
Code: Select all
petjet defaults/*.pet
One-by-one part is mandatory sinc I want to be free to, say, later disinstall skype only and replace it with a newer version.
It's not easy, I know, but a kind of Ubuntu apt-get with limited features on install and remove and a force option to assume I always agree to the default option:
- install? => Y
- remove? => Y
- deps missing, install anyway? => Y
- rm -r / ? => N
Re: petget at command line noX
I will have to try this... Never found petget to work for me before, unless I am running an X desktop... I want a true CLI version... So I'll try this again!upnorth wrote:You should try "petget +<package name>" to install
"petget -<package name>" to uninstall
Just to clarify:
when installing, use an absolute path.
eg: #petget +/root/downloads/firefox-3.0.pet
when uninstalling, don't specify name with suffix, only package name.
eg: #petget -firefox-3.0
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
these commands not working?
Hi,
I just installed fatdog64 and have a few pets and sfs files [like libreoffice, compiz, thunderbird etc].
how to install (or add) them?
the commands onthis page [petget + ....] seem to be not working.
Thanks in advance for clarification and assistance
I just installed fatdog64 and have a few pets and sfs files [like libreoffice, compiz, thunderbird etc].
how to install (or add) them?
the commands onthis page [petget + ....] seem to be not working.
Thanks in advance for clarification and assistance
It's rt-clk, install. FD700 has slapt-get for a shell installer.
Unless you know what you're doing, stick to pkgs compiled for your build.
Unless you know what you're doing, stick to pkgs compiled for your build.
Code: Select all
slapt-get --list | less
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
fd-64 is small for now, needs to grow
thanks for the inputs. will wait until this puppy grows to its name
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: these commands not working?
Right click on desktop, choose "Help" and read the line in red might help.mekalu2k4 wrote:Hi,
I just installed fatdog64 and have a few pets and sfs files [like libreoffice, compiz, thunderbird etc].
how to install (or add) them?
the commands onthis page [petget + ....] seem to be not working.
Thanks in advance for clarification and assistance
Fatdog is not Puppy.
Fatdog has some threads of its own.
I could be using this wrong but I don't see how this installs the actual directories included with the .pet - i can see how it runs the pinstall.sh and then removes the pinstall.sh, but I just end up with the expanded directories sitting in /root and not installed.technosaurus wrote:or something like this should work most of the time
wget -c http://URL/package.pet
pet2tgz package.pet
tar -xf package.tar.gz /
/.pinstall.sh
rm /.pinstall.sh
Instead of using the download method i am trying to access pets i have already stored in /opt/b3user. Here is my script (including various explanatory notes i made to myself) if anyone is able to see what I am doing wrong:
Code: Select all
#!/bin/bash
#Based on technosaurus method to cli install a pet
#http://www.murga-linux.com/puppy/viewtopic.php?p=396930#396930
#(I plan to use this to expand /opt/pets by action of /root/Startup script)
#Next version I should probably copy the pet as some generic name before installing it so it doesn't disappear.
pet2tgz /opt/b3user/FoxitPDF_b3gg-0.1.pet
#next line didnt work so i had to remove the / off the end - then it opened into root
#tar -xf /opt/b3user/FoxitPDF_b3gg-0.1.tar.gz /
tar -xf /opt/b3user/FoxitPDF_b3gg-0.1.tar.gz
#Next line doesnt work as it doesnt reference the folder in /root
#/.pinstall.sh
/root/FoxitPDF_b3gg-0.1/.pinstall.sh
#again - next line does not reference location of expanded pet and also calls it dotpinstall.sh
#rm /.pinstall.sh
rm /root/FoxitPDF_b3gg-0.1/pinstall.sh
rm /root/FoxitPDF_b3gg-0.1/pet.specs
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
@greengeek
technosaurus responded to the OP's request "install a pet file without being in X". Is that really what you are after?
Besides: What technosaurus describes looks like a brute-force way to expand a pet package into the filesystem. This is not what I would call "installation". You wouldn't be able to uninstall (at least not easily). The way described by upnorth, using petget, should work.
technosaurus responded to the OP's request "install a pet file without being in X". Is that really what you are after?
Besides: What technosaurus describes looks like a brute-force way to expand a pet package into the filesystem. This is not what I would call "installation". You wouldn't be able to uninstall (at least not easily). The way described by upnorth, using petget, should work.
Thanks, I will give that a try.Probably needs a 'cd' into the expanded directory.
I am wanting to install certain pets during the boot process - my plan was to use a script in /root/Startup. (My reasoning is that I could add compatible pets into my Puppy derivative as a 'payload' as they take up less room in pet form than they do as installed software). I guess X is in fact running at the stage of processing /root/Startup scripts, so in that sense yes i am probably in the wrong thread - although if the pet installation can occur prior to X starting that would be a potential solution too.MochiMoppel wrote:technosaurus responded to the OP's request "install a pet file without being in X". Is that really what you are after?
Thanks. Just gave that a try and there are two problems. Firstly if i do that I get a dialog box asking me if i want to install the pet (which makes it a manual process rather than automatic and unseen by the user) and secondly, even if i then accept the dialog and let it continue to install the pet I see the following messages:The way described by upnorth, using petget, should work.
- Attachments
-
- petget_error.jpg
- (79.19 KiB) Downloaded 848 times
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Firstly: I doubt that what technosaurus described works "most of the time". May depend on the tar version and on the way the pet file was created. And pinstall.sh normally is not a hidden file. This should work better:
Peeling off all these pesky confirmation and warning dialogs for a true command line operation is a lot of work. From my own experience: Very interesting and rewarding, because you can get exactly what you need, but it's not much fun.
You don't really need to run pet2tgz. Gzip will - in its own words - "ignore the garbage" , i.e. the trailing md5 string attached to each pet file. In some cases, when you don't care about littered pet.specs files and you don't need to uninstall, this crude method may work for you, but generally I don't recommend it.tar --strip-components=2 -xf /path/to/package.pet -C /
/pinstall.sh
rm /pinstall.sh
OK, so you want the same as neurino: A hasslefree and silent installation of pets. Happens to be the same I was proposing here, but judging from the odd reactions I received this is not what many users want and some users even oppose. Just look at this thread: It's more than 4 years since neurino asked for it. Nothing happended.greengeek wrote:I am wanting to install certain pets during the boot process - my plan was to use a script in /root/Startup.
Peeling off all these pesky confirmation and warning dialogs for a true command line operation is a lot of work. From my own experience: Very interesting and rewarding, because you can get exactly what you need, but it's not much fun.
What i see is a -syntactically incorrect - attempt to uninstall.even if i then accept the dialog and let it continue to install the pet I see the following messages:
Oh yes. No wonder I have so much trouble getting things done - can't read properly.MochiMoppel wrote:What i see is a -syntactically incorrect - attempt to uninstall.
Hmmm, that surprises me. I would have thought such an idea would be welcomed - especially as carrying a pet as a payload seems to consume less storage space than having it expanded into the filesystem already.
Please excuse my ignorance - do you mean that tar and gzip are the same thing?This should work better:You don't really need to run pet2tgz. Gzip will - in its own words - "ignore the garbage" , i.e. the trailing md5 string attached to each pet file. In some cases, when you don't care about littered pet.specs files and you don't need to uninstall, this crude method may work for you, but generally I don't recommend it.Code: Select all
tar --strip-components=2 -xf /path/to/package.pet -C / /pinstall.sh rm /pinstall.sh
I would really like an automatic method (not involving manual input) but I don't really mind verbosity - especially if it occurs while the system is booting then disappears. Not so keen if the messages have to be acknowledged manually.Peeling off all these pesky confirmation and warning dialogs for a true command line operation is a lot of work. From my own experience: Very interesting and rewarding, because you can get exactly what you need, but it's not much fun.
Thanks for the help - this gives me some options to try.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
You are not alone. The world is full of surprisesgreengeek wrote:Hmmm, that surprises me. I would have thought such an idea would be welcomed
No, they are not. Tar internally first uses gzip to decompress the files, then copies the decompressed files to the destination folder(s).Please excuse my ignorance - do you mean that tar and gzip are the same thing?
That's the whole idea of a quiet command line script.Not so keen if the messages have to be acknowledged manually
BTW. Fiddled a bit more: This should also work. Looks a bit cleaner and removes pet.specs and any puninstall.sh
Code: Select all
cd /
tar --strip-components=2 -xf /path/to/package.pet
/pinstall.sh
rm pinstall.sh puninstall.sh pet.specs
4MLinux does a similar thing - apart from busybox and some core libs, all other packages are unpacked during boot-up. They are simple *tar.gz's, so 'tar -xf package.tar.gz -C /' works well.
Actually, they do it like this:
Everything is packed into the initrd to start with.
'Cloned' it once using Puppy libs and binaries tarred and gzipped into custom packages (lumped all the bits needed for wifi together, and also for Opera). All the X stuff was courtesy of goingnuts' (and others) static builds. A bit crude, but it worked. Too lazy to do it again.
Actually, they do it like this:
Code: Select all
echo "The item NEW ADDONS is being processed..."
mkdir /var/4MLinux 2>/dev/null
ADDON_LIST=$(ls /etc/init.d/addon_*.tar.gz 2>/dev/null)
for i in $ADDON_LIST; do
echo "->Installing $i"
tar -xz -f $i -C /
mv $i /var/4MLinux
done
mv /etc/init.d/core /var/4MLinux 2>/dev/null
'Cloned' it once using Puppy libs and binaries tarred and gzipped into custom packages (lumped all the bits needed for wifi together, and also for Opera). All the X stuff was courtesy of goingnuts' (and others) static builds. A bit crude, but it worked. Too lazy to do it again.