SFStray

Miscellaneous tools
Message
Author
seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

Re: my sfsexe version

#16 Post by seaside »

maxerro wrote:OK, I'm gonna list several options and program responses, because if I put it on paper maybe I'll find out that it makes no sense...
This would be my theoretical "sfsexe" program:

Code: Select all

#sfsexe
sfsexe v0.0 NOT loaded
Usage: sfsexe [OPTIONS] [DIR] [SFS]

Options:
  -a, --add=DIR          Add a new directory to the list of available SFSs
  -r, --remove=DIR     Remove directory from the list of available SFSs
  -l, --load=SFS          Load a specified SFS 
  -u, --unload=SFS      Unload a specified SFS
  -w, --window            Opens a loading/unloading dialog window
  -m, --menu-refresh   This is self-explanatory
  -e, --execute=FILE   Executes a specified .desktop file from the SFS, or if started without parameters - checks if there's only one .desktop file in the SFS and executes it
maxerro,

Thanks for that further explanation. I think you're looking for a kind of SFS file manager. Most of these functions can be handled by rox or other filemangers.

For examples;

Add or remove files or directories. (rox)
Mount an SFS (rox left-click)
List of sfs files in a directory (SFS-exec-dir)
Unmount an SFS (rox left-click)
Union and execute an SFS (SFS-Exec on rox-right-click)
ununion (SFS-exec-unloader).

This idea is interesting....
"Executes a specified .desktop file from the SFS, or if started without parameters - checks if there's only one .desktop file in the SFS and executes it"

My view of SFS files is that they contain only one large program that you'd prefer not to install. Perhaps an SFS file composed of several programs might be useful with some sort of interface to select one. Let me think about that.

Cheers,
s
(Good ideas can also be placed on electronic forum paper :) )

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

#17 Post by seaside »

nooby wrote:
My workaround do work with imported icons from internet for 4 of the 5 progs. I placed them here

/usr/share/pixmaps/
nooby,

Glad you got it working and yes SFStray tries to find the icon in the SFS file, but doesn't always have success due to either a missing icon or an unusual location. So sometimes you'll need to find an icon yourself, modify the tray config file (as you did) and then copy the file to /usr/share/pixmaps so that JWM can find the icon.

You mentioned that 4 out of the 5 programs were missing icons and you had to get them from the internet - was that because the icons were not in the SFS files?

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#18 Post by nooby »

I did not know or knew enough how to find them. I will edit my description above.

Opera had them here
/opt/opera/share/icons/hicolor/48x48/apps/opera-browser.png

But that is gone when you reboot so I took that one and moved it to
/usr/share/pixmaps/opera-browser.png

so now it looks like icon="/usr/share/pixmaps/opera-browser.png">
in the code. The icons may be there in all of them and me was not aware of how to find them. Still are not. :) Linux to me is like a very difficult CrossWord, one guess and guess and only hit the right solution after years of frustration.
I use Google Search on Puppy Forum
not an ideal solution though

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

#19 Post by seaside »

nooby,

I took a look at the opera sfs file and found it had 6 icon choices in 6 different directories.

This confused SFStray and when that happens she gives up.

The code could be modified to take the first found icon like this - around line 54 of SFStray change the following:

Code: Select all

 
PROGICON=`find /mnt/"$P"/ -iname $PROGICON`
to this line

Code: Select all

 
PROGICON=`find /mnt/"$P"/ -iname $PROGICON -print -quit`
Let me know if that improves it for other sfs files as well.

(Of course, you may not like the icon size it finds and end up editing the config tray file anyway :)

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#20 Post by nooby »

Thanks the most needed improvement maybe would be to figure out what one are supposed to tell it so it does not find all the lupu525.sfs and wary511.sfs and puppy-431.sfs and many many others and the most confusing thing was to see just dev_save and mnt and nothing else in the left field.

Not a single sfs file anyware.

One need to be rather savvy to figure out what to change after seeing that text for to to get it to work.

I spent hours on it and have no idea how I finally got progress and finally a kind of low level success to have a working system.

Not your fault it does work on your set up but totally failed on mine.

But I love that you tried though.
I use Google Search on Puppy Forum
not an ideal solution though

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

#21 Post by seaside »

nooby,

I've changed SFStray so that if no directory is specified on the command line, it defaults to look only in the /root and /mnt directories. This should cut out all those extra entries .

Sorry you had those difficulties and thanks for giving me good feedback.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#22 Post by nooby »

Thanks I could test that one on some other puppy than the one it is already installed on now and which I use daily for everything. Don't want to risk messing up that one.

But would be cool if many test the set up. it sure looks nice having such a "Dock" like thing popping up and one can click on the icons and get instant load and then unload when one shut it down. So handy
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#23 Post by nooby »

seaside wrote:nooby,

I've changed SFStray so that if no directory is specified on the command line, it defaults to look only in the /root and /mnt directories. This should cut out all those extra entries .

Sorry you had those difficulties and thanks for giving me good feedback.

Regards,
s
I test this one now in Midnightsun puppy I get back within a 30 minutes maybe
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

SFStray

#24 Post by L18L »

seaside wrote:nooby,

I've changed SFStray so that if no directory is specified on the command line, it defaults to look only in the /root and /mnt directories. This should cut out all those extra entries .

Sorry you had those difficulties and thanks for giving me good feedback.

Regards,
s
I am in fresh lupu525 now.
/mnt/home is link to /initrd/mnt/dev_save

HTH
Attachments
SFStray_lupu525.png
(16.97 KiB) Downloaded 1029 times

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#25 Post by nooby »

Sorry long delay. It failed to find a single sfs file. So like L18L also indicate here above my post something fails. Apart from it works good.

I asked pemasu about Midnight Sun Puppy and he told me it is very close to Lupu525 and it did not show any result.

I copied from the one I had in Snow puppy 5 so I have workings ones now but the program itself did not any SFS.

Maybe one should have the unloader too just in case. Sometimes the program fail to unload.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
maxerro
Posts: 53
Joined: Sun 10 Oct 2010, 16:11

extra protection?

#26 Post by maxerro »

Seaside, somewhere in the depths of your code...

Code: Select all

while read P; do

SFSFILE=`grep "$P" /tmp/proglist`
mkdir /mnt/"$P"
mount -t squashfs "$SFSFILE" /mnt/"$P" -o loop 
...
umount /mnt/"$P"
rm -r /mnt/"$P"

done < $HOME/.SFStray/sfstray_list
I think I can reconstruct a total WIPEOUT scenario with this code, but I need to find my dusty AMD for this test...

The rm line needs so much more protection.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#27 Post by nooby »

What does that part do then?

umount /mnt/"$P"
rm -r /mnt/"$P"
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
maxerro
Posts: 53
Joined: Sun 10 Oct 2010, 16:11

#28 Post by maxerro »

Here's one wipeout version:

Code: Select all

add() {
	echo -e "$APP" >> $HOME/.SFStray/sfstray_list
}
When you hit the Add button while nothing is selected (or there are no SFS files in the required dir) it creates a non-empty "empty" sfstray_list, and when you hit Apply it sends all writable mounted media down the toilet.

@nooby: Stop experimenting until a few code lines are changed.
@seaside: Unmount everything except some unneeded partition(s) if you try the above.

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

your sfs dirloader 4 not working in 5 series ?

#29 Post by nancy reagan »

Hi seaside,

I liked your sfs dir loader in 4 series a lot

http://www.murga-linux.com/puppy/viewtopic.php?t=44601



Could you tell me how to get it to work in 5 series ?

Thanks in advance.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#30 Post by nooby »

While we wait for seaside to find this thread. :)

I use it on Snow puppy 5 which is Lupu13 sort of.
It all dependends on how one use it. It has some clitches that one can learn to live with. Not fool proof. Safest is to go through the Menu and not do right click which sometimes shuts down the xorg.

I 've also tested his SFStray not as easy to set up. So try SFS dir first

I use it on Frugal install on NTFS.
I use Google Search on Puppy Forum
not an ideal solution though

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

sfs dirloader works in lupu as well

#31 Post by nancy reagan »

Sorry but sfs dirloader seems to work in 5 series as well

http://www.murga-linux.com/puppy/viewtopic.php?t=44601

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

#32 Post by seaside »

maxerro wrote:Here's one wipeout version:

Code: Select all

add() {
	echo -e "$APP" >> $HOME/.SFStray/sfstray_list
}
When you hit the Add button while nothing is selected (or there are no SFS files in the required dir) it creates a non-empty "empty" sfstray_list, and when you hit Apply it sends all writable mounted media down the toilet.
maxerro.

Thank you for pointing out that scenario. I've added the following code with an exit to ensure that doesn't happen.

Code: Select all

 umount /mnt/"$P"
 STATUS=$?
 [ $STATUS -ne 0 ] &&  yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "FAILURE! $P could not unmount - Perhaps files are still in use or no directory was specified" && exit
A new pet is attached to the first post.

Thanks again for catching that possibility.

Regards,
s

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

#33 Post by seaside »

nooby wrote: Safest is to go through the Menu and not do right click which sometimes shuts down the xorg.
Hi nooby,

I've tried using SFS-exec on Pup525 lately and so far have not experienced any xorg failure. Is there a particular set of conditions for this happening?

Regards,
s

Post Reply