ROX 1 click file mounter, types: .2fs, .3fs, .iso, .sfs.

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

ROX 1 click file mounter, types: .2fs, .3fs, .iso, .sfs.

#1 Post by sunburnt »

willhunt is working on something like this.

Click the file to mount it, & click it again to unmount it.

The package has MIME files for the file types: .2fs, .3fs, .iso, .sfs.
ROX Filer pops up the mounted file, an Info popup notifies of unmount.

Extract the file: FileMnt.tar.gz in "/", or copy it's files to the correct dirs.
I couldn't get Tar to make the archive file's paths to start with "/".

There's no GUI, the app. just works in ROX by clicking on "image files".

##### New version... I fixed the MIME files. (sorry) #####
Attachments
FileMnt.tar.gz
Extract the file: FileMnt.tar.gz in "/", or copy it's files to the correct dirs.
(1.27 KiB) Downloaded 889 times
Last edited by sunburnt on Mon 18 Jun 2007, 04:11, edited 4 times in total.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#2 Post by GuestToo »

I couldn't get Tar to make the archive file's paths start with "/".
i think it will work with the -P option, when both tar'ring and untar'ring (i usually do that in my dotpup packages to unzip the files to the correct locations)

tar --help

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#3 Post by sunburnt »

Thanks GuestToo, I checked help when it wouldn't do it, but I missed that.
Sadly it still won't work, maybe it's for FileNames, not dirs. as help says.

Did: "tar -Pcf FileMnt.tar *", "tar -cfP FileMnt.tar *", "tar -cP FileMnt.tar *", etc.
It never put the leading "/" on the "root" dir., or it failed with errors.

I used Puppy-1, so maybe an older Tar but help listed -P, I'll try Puppy216.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#4 Post by John Doe »

sunburnt, do like this:

cd /
mkdir /yourapp-1.0.0
mkdir /yourapp-1.0.0/usr
mkdir /yourapp-1.0.0/root

(must be root0 for pup 1.x)

add you stuff, then

tar -zcf yourapp-1.0.0.tar.gz yourappp-1.0.0

now you have an alien package

in pup2 you can do:

tgz2pet yourapp-1.0.0.tar.gz

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Thanks John Doe; I'll try it out...

NOTE: I tried putting the apps. main dir. in "/" & then did:
tar -zcf FileMnt.tar.gz filemnt
It put the main dir. on the file paths & it still didn't put the "/" at the path start.
It just removed the / when I did: tar -zcf FileMnt.tar.gz /filemnt
And using the P argument caused it to make a P file (weard).

I'm hoping this'll be included in Puppy218 & up, so an installer won't matter.
New Puppies keep coming so fast that utility development is a little scary.
You never know just what will be included in the not so near future.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#6 Post by sunburnt »

New version above, I fixed the MIME files... Sorry.

Can someone verify if it's working for them?
I'm still having troubles with it, & I need to know if it's just me.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#7 Post by muggins »

sunburnt,

i just dloaded it & extracted to / ,( with pup2.16 booted of cdrom), but it's doing nothing if i click on .2fs, sfs or .iso files. do i need to reboot?

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#8 Post by sunburnt »

You shouldn't have to, I can't get it to work unless the image file's
permissions are not set to EXE, $ the "Run Action" is set for the file.
I don't know how to set the run action for all 4 file types in code.

Green file name text in ROX is EXE type file, black text is non EXE type.

I'm puzzled by this, but I don't understand all about MIME.
Sad because it works great in Puppy-1 without all the fuss.

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

rox?

#9 Post by willhunt »

Maybe it's got to do with the version of rox
you are using? it is not working on my 215
erzat 216 either or my plain jane 216 I have
not tried it on my type2 109ce install yet
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#10 Post by sunburnt »

willhunt; I'm guessing that it'll work with any 1.xx & any 2.xx won't work.
Does your file mounter app. run with clicking a file in ROX? If so... Does it work?

I'm at an impass as I haven't a clue of what to do... Suggestions anyone?

This worked before as GuestToo said, & now to have the option denied is scary.
Kinda like having no control over all of ROX Filer's right click menu items.
Same as the file browsers I've tested... No way to modify the right click menus.
These MIME & menu problems puzzle me, it's odd to be cut off from the critical.
But the WinBlows right click menu was a pain in the arse to try to modify also.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#11 Post by HairyWill »

Sunburnt
Its not quite one-click but how about doing it as a drag and drop so you don't have to worry about mime types and rox actions.

One click opens drop area
drag image onto drop area
I'm not sure if you can get the drop area to react to the drop or if you need to push a button to activate

Its not one click but it does avoid having to find the file in a file chooser which is what I see as the major usability hurdle.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

HairyWill; I just tried dragging "filemnt" to the desktop for a drop icon.
First I dragged pup_save.2fs to the desktop icon & it mounted it.
Then I dragged pup_save.2fs onto it again & it was unmounted.

I figured this would work...
But you still have to find the image file in ROX Filer no matter how you do it.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#13 Post by Béèm »

A bit scary.
I dropped a sfs file on the desktop icon for filemnt, but I find I have a kinda merging result.
Dangerous?

Code: Select all

sh-3.00# mount
/dev/root on /initrd type ext2 (rw)
/dev/hda2 on /initrd/mnt/dev_save type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
/dev/loop1 on /initrd/pup_rw type ext2 (rw,noatime)
/dev/loop3 on /initrd/pup_ro3 type squashfs (ro,noatime)
unionfs on / type unionfs (rw,dirs=/initrd/pup_rw=rw:/initrd/pup_ro2=ro:/initrd/pup_ro3=ro,debug=4294967295,delete=whiteout)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
none on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/loop2 on /mnt/+root+dev_save+sfs_blabla.sfs type squashfs (ro)
sh-3.00# 
I agree with sunburnt Rox should still be used.
Why not have the ability to set a run action on this type of files to filemnt is called directly from Rox?
This more intuitive.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#14 Post by GuestToo »

I don't know how to set the run action for all 4 file types in code.
if you mean, how to setup Rox run actions from a script ...

Code: Select all

#!/bin/sh
if ! grep -q 'application/x-cd-image\:\*.2fs' /usr/share/mime/globs ;then
cat >> /usr/share/mime/globs << EOF
application/x-cd-image:*.2fs
application/x-cd-image:*.3fs
application/x-cd-image:*.sfs
EOF
fi

cat > /root/.config/rox.sourceforge.net/MIME-types/application_x-cd-image << EOF
#! /bin/sh
exec isorunaction "$@"
EOF
chmod a+x /root/.config/rox.sourceforge.net/MIME-types/application_x-cd-image
Rox already has a Run Action for .iso files ... this script just adds .2fs, .3fs and .sfs to the same Run Action ... so if you click an iso, a 2fs a 3fs or an sfs, it will run the script /root/.config/rox.sourceforge.net/MIME-types/application_x-cd-image

or you can set it up differently ... you could set up a different file association, for example:

application/x-sfs-file:*.2fs
application/x-sfs-file:*.3fs
application/x-sfs-file:*.sfs

and maybe setup application_x-cd-image to run the application_x-sfs-file ... or it could be a symlink

or you could setup 4 separate associations:

application/x-2fs-file:*.2fs
application/x-3fs-file:*.3fs
application/x-sfs-file:*.sfs

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#15 Post by willhunt »

no mine is not a one click solution but the filechooser method the
gmount and other script seem to be working fine here is the thread
mine is a much more basic than the one you are working on.as to
hairy's problem maybe you could grep all mount pnts for just the
files you intend to handle but it would seem like that would really
slow you down :cry:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#16 Post by BarryK »

Okay, I've modified the new Rox 2.6.1 PET package to recognise these filetypes and launch 'filemnt'.

I also made some small mods to 'filemnt', attached.

Vdisktool is interesting, it does more stuff, like the virtual disk. Definitely room for that in Puppy too. I'll check it out more closely soon.
Attachments
filemnt.gz
(1.15 KiB) Downloaded 496 times

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#17 Post by sunburnt »

Beem; If the sfs file is mounted & unioned for the Puppy that your running,
then there could be some nasty effects, if the sfs was copied to ram no prob.

GuestToo; Thanks, I got your tutorial about the mime files & the changes in
the files & folders from Puppy-1. Just what's needed for utility installs.

willhunt; I need to look at your app. & see what a virtual disk is.
If your app. does the same stuff as filemnt, we should integrate them.

Barry; I'll look at your mods., I'm not at my work PC at the moment.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#18 Post by BarryK »

Oh yeah, when I setup rox pet pkg, I selected mime-type names:

application/x-ext2-image:*.2fs
application/x-ext3-image:*.3fs
application/x-squashfs-image:*.sfs

which seemed consistent (sort of) with the pre-existing 'application/x-cd-image:*.iso)

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#19 Post by sunburnt »

Barry; Looks like you got the code section I jumped over to work, I got tired of
beating my head on the keyboard trying to figure out why it didn't work.
I've used the same code repetedly but for some reason it just wouldn't work.

In the file you provided the initrd.gz code is commented out.
Archive uses the .gz extention, so this is a nonMIME situation with no handler.

Instead of the "already mounted" message, ROX should just popup the path.
I don't think using an already mounted & unioned file should cause a problem.

For no button on the "Unmount" info Xmessage, make the first line this:
Xdialog --title " Notice..." --no-button \

Puppy-1 didn't have a problem closing ROX, but ROX in Puppy-2 has changed.

The pet mime types will probably supersede filemnt in importance & priority.
This may kill using this utility for Puppy, Barry must decide it's fate...

======================================================
I'm not sure what willhunt's virtual drives are, I'm guessing just image files.
A GUI for making image files of types: ext2, ext3, sfs, & iso is another good idea.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#20 Post by Béèm »

sunburnt wrote:Beem; If the sfs file is mounted & unioned for the Puppy that your running,
then there could be some nasty effects, if the sfs was copied to ram no prob.
At first sight, no nasty effects. :D
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

Post Reply