Petget-nox?

Requests go here. If you fill a request, give it a new thread in the appropriate category and then link to it in the request thread.
Post Reply
Message
Author
watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

Petget-nox?

#1 Post by watchdog »

I can install deb packages with no X at the prompt having installed rcrsn51's debbi-1.1.pet. I can't install pet packages with no X because petget needs X. I think could be done a script which can install pet packages with no X.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#2 Post by watchdog »

I think it could be enough a pet2deb or tar2deb script and then one can use debbi.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#3 Post by dejan555 »

Code: Select all

if [ ! -f "$1" ];then
echo "File not found."
exit
fi
tar xf "$1"
DIR=$(echo "$1" | sed 's/.pet//')
cd "$DIR"
rm pet.specs
rm pinstall.sh
cp -a * /
cd ..
rm -rf "$DIR"
Very rough draft. Use at your own risk.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#4 Post by watchdog »

Tried to install jwm2-755-w5c.pet in wary 5.3 without X. Something wrong I suppose:

Code: Select all

gzip: stdin: decompression OK, trailing garbage ignored
tar: child returned status 2
tar: Error is not recoverable: exiting now
But it did the job installing jwm V755. It can be an emergency tool. Thanks.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#5 Post by dejan555 »

.pet files are .tar.gz archives with appended md5sum at the end of file, that's why when extracted like this it gives error, but it extracts archive anyway. If that was the only error everything went okay.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#6 Post by greengeek »

dejan555 wrote:

Code: Select all

if [ ! -f "$1" ];then
echo "File not found."
exit
fi
tar xf "$1"
DIR=$(echo "$1" | sed 's/.pet//')
cd "$DIR"
rm pet.specs
rm pinstall.sh
cp -a * /
cd ..
rm -rf "$DIR"
Very rough draft. Use at your own risk.
Hi Dejan, I would like to have a script that I can place in /root/Startup and have it look at a specific directory (/root/Startup/pets2install) and automatically install all pets that it finds in that directory (not worried about uninstalling later as this is for a run-in-ram session and I will just turn off the power).
Do you think your script can be used for that purpose? cheers!

Jasper

#7 Post by Jasper »

Hi greengeek,

MochiMoppel may already have his own magic answer given you have the yen.

My regards

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#8 Post by Keef »

You could start it from /etc/rc.local - if the (petget) script is put in /usr/bin or elsewhere in the PATH, just putting the name of the script in rc.local will launch it. This will run before you hit the desktop, which may be preferable for some pets.
If there is no rc.local, just create it.

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#9 Post by starhawk »

PetGet uses GTKDialog (IIRC) and will not run without X.

I agree that a PetGet-like script (or modification of PetGet for CLI) is sorely needed. I've actually been thinking of trying to tackle it myself, since I should learn bash or at least something other than a particularly tired old version of Microsoft BASIC (ha!).

Haven't been able to get up the motivation to even look at what's involved tho... it's probably going to be a while...

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#10 Post by seaside »

"I would like to have a script that I can place in /root/Startup and have it look at a specific directory (/root/Startup/pets2install) and automatically install all pets that it finds in that directory (not worried about uninstalling later as this is for a run-in-ram session and I will just turn off the power)."

How about this.

Code: Select all

for i in /root/Startup/pets2install/* 
do
tar -z -x --strip=2 --directory=/ -f  "$i"
cd /
[[ -f /pinstall.sh ]] && ./pinstall.sh && rm -f /pinstall.sh 
rm -f /pet.specs 
done
fixmenus
jwm -restart
Cheers,
s

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#11 Post by greengeek »

Thanks seaside, that did the job! The pets installed and the programmes appeared in the menus but for some reason one of the pets (simplescreenrecorder) appeared in the menu with no icon alongside it so maybe I need to adjust the delay before fixmenus. I shall do a bit more testing of this.

Also, I have made a pet based on info in another thread, and it installs the pets in such a way that they also show up in the PPM uninstall menu. It is much slower and needed a couple of user advisory messages added in to let them know it is still doing its thing, but that may suit some users (Although it's not a "no-X" solution it can be run from /root/Startup without manual user interaction). Other thread here

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#12 Post by seaside »

greengeek wrote:Thanks seaside, that did the job! The pets installed and the programmes appeared in the menus but for some reason one of the pets (simplescreenrecorder) appeared in the menu with no icon alongside it so maybe I need to adjust the delay before fixmenus. I shall do a bit more testing of this.
greengeek,

Not likely a timing issue if the name shows up. Probably the desktop icon specification needs a path.

Cheers,
s

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#13 Post by greengeek »

seaside wrote: Probably the desktop icon specification needs a path.
Heres something I really don't understand - if i look at the .desktop file for simplescreenrecorder it says this:

Code: Select all

Icon=simplescreenrecorder
(note that it has no suffix)
I can see the simplescreenrecorder icon in /usr/share/icons/hicolor/48x48/apps as simplescreenrecorder.png so i can't figure out how the desktop file could ever hope to find the icon (given that it doesn't list a suffix). So from my point of view that explains why the nox petloader (for want of a better name) doesn't pick up the icon.

However, if I install the pet using petget I discover that the .desktop icon declaration is magically correct - it says:

Code: Select all

Icon=simplescreenrecorder.png
How is this even possible? I cannot see anything in petget that corrects the desktop file structure - yet somehow it did.

EDIT: - if I update the desktop file in the pet (and include the .png suffix) it does not fix the problem. Installing the pet with the code above still leaves the icon missing (and also creates 3 entries for simplescreenrecorder in the menu, which I did not notice before). However, installing the updated pet by clicking on it does add the icon into the menu (as well as getting rid of the duplicate entries). Still something missing that I don't understand.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#14 Post by seaside »

greengeek,

Probably your pet file was made from a deb file.

Petget calls /usr/local/petget/installpkg.sh.

From there, other checks are made, including checking and correcting the .desktop file to conform to the Puppy menu system.

This would explain your results.

If the pet file was created to Puppy standards, the .desktop file would only have a single menu entry category and the icon spec would be complete.

Cheers,
s

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#15 Post by greengeek »

Thanks seaside, that is valuable information. Looks like I will have to take more care to prepare my pets to be ready for a non-petget based install method.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#16 Post by greengeek »

I just had a look at installpkg.sh and it contains the following comments:

Code: Select all

#information from 'labrador', to expand a .pet directly to '/':
#NAME="a52dec-0.7.4"
#pet2tgz "${NAME}.pet"
#tar -C / --transform 's/^\(\.\/\)\?'"$NAME"'//g' -zxf "${NAME}.tar.gz"

#i found this also works:
#tar -z -x --strip=1 --directory=/ -f bluefish-1.0.7.tar.gz
I might try those methods as other nox options.

EDIT : This seems to work but the pet has to be in /root:

Code: Select all

#!/bin/bash
#information from 'labrador', to expand a .pet directly to '/':
NAME="SimpleScreenRecorder-0.3.3"
pet2tgz "${NAME}.pet"
tar -C / --transform 's/^\(\.\/\)\?'"$NAME"'//g' -zxf "${NAME}.tar.gz"
Same problem with triple menu entry as I haven't tidied up the desktop file yet.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#17 Post by seaside »

greengeek,

If you wished to retain all of petget's validation and control capabilities, you might just comment out the dialog items in petget and just call it petget_NOX. I think it just defaults to install.

Cheers,
s
(Probably would also need a few tweaks as well....)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#18 Post by greengeek »

seaside wrote:If you wished to retain all of petget's validation and control capabilities, you might just comment out the dialog items in petget and just call it petget_NOX. I think it just defaults to install.
Thanks seaside - there is a thread where slavvo and rufwoof and others have taken that approach (calling it petgetquiet) and it seems to work well - it even allows the pets to be listed in the PPM for uninstall (this thread) but it is quite a bit slower than your method (and a similar method I am trialling from MochiMoppel).

Now that I realise how much work petget (and installpkg.sh) do to prepare the pet for installation (and fix incorrect menu specs etc) I think I would like to use both approaches - ie use the slower, more complete "petgetquiet" method for pets that are not perfected for puppy, but also use your quicker method for pets that are already optimised for puppy. Now that I understand more about what is involved in this I will be going back to the collection of pets I have been accumulating for my Slacko derivative and tidying them up so that the nox install method has no trouble getting things installed. I have tidied up my Simplescreenrecorder pet and now need to do the same to my Softmaker Office 2012 pet. (I will probably post my questions about that here as it is giving me some sort of path error and i don't really understand how to set paths in the desktop file)

PS: I might as well link to another similar thread too: here
.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#19 Post by seaside »

greengeek,

I've noticed by your reference to http://www.murga-linux.com/puppy/viewtopic.php?t=52983 that you have seen how awkward it can be to satisfy everything - tradeoffs always come into play.

I've responded with another approach in the above thread.

Cheers,
s

Post Reply