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

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#21 Post by BarryK »

Puppy-1 didn't have a problem closing ROX, but ROX in Puppy-2 has changed.
Puppy-2 has no problem either. Pmount uses 'rox -D <path>', no problem.

It's working nicely for me. Grab the 2.17alpha mid-week and test it.

Yes, the initrd.gz, I wasn't sure about that one. It's something only developers would want to open.

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

#22 Post by Béèm »

I have downloaded and installed this filemnt.gz now.
I don't see how it interacts with ROX, so I copied the filemnt bin on the desktop and dropped a sfs on it. (blabla.sfs)

I then look in /mnt and find indeed a new directory of which the contents is indeed the one od blabla.sfs, but I find the name of the directory odd with all the + signs in there. What is the signification?
Attachments
filemnt-mnt.png
(82.02 KiB) Downloaded 800 times
filemnt-blabla.png
(25.68 KiB) Downloaded 803 times
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]

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

#23 Post by sunburnt »

Beem; Linux doesn't allow "/" in file or dir. names, so to make unique dirs.
to use as mount points for the image files, I convert the paths "/" to "+".
I chose the "+" character instead of "-" & "_" because they're commonly
used to name dirs. & files, so the names unique & can be reconverted back.

So to look at the /mnt dir. you see: +Path+ImageFile as the mount dir.

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

#24 Post by willhunt »

just a thought but if you changed line 11 from

Code: Select all

MntPt='/mnt/'`echo "$imgFile" |sed "s#^\.##g" |sed "s#/#+#g"`
to

Code: Select all

MntPt=/mnt/${imgFile##/*/}
then would it make the mount point /mnt/NameOfFile ?
[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
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#25 Post by Béèm »

sunburnt, I understand now the reason why you did as you do.
I was gonna make a suggestion, but willhunt did beat me by 20 minutes with the extra advantage he proposed a code. :)
I wouldn't know how to suggest it with a code. :?

But I still have the idea to do the mount in a more intuitive way by going to the file in ROX and doing a right click select mount as action.
And the action would probably be your filemnt program.
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]

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

#26 Post by sunburnt »

Beem; See my post in the Suggestions forum about ROX.

willhunt; Using just the file name wouldn't allow mounting 2 pup_save.2fs files.
Say you wanted to copy files from one Save or work image file to another.
Using the path with the file name assures that there's no dup. mount points.
If the new mount point is the same as the old one, then the new file will be
mounted over the top of the older one & the old one can't be accessed.
This is an interesting result of mounting files over files, quite useful at times
as it causes the mounted image files to act like a stack... Last on, first off.

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

#27 Post by Béèm »

willhunt wrote:just a thought but if you changed line 11 from

Code: Select all

MntPt='/mnt/'`echo "$imgFile" |sed "s#^\.##g" |sed "s#/#+#g"`
to

Code: Select all

MntPt=/mnt/${imgFile##/*/}
then would it make the mount point /mnt/NameOfFile ?
Yes indeed.
I changed that code and now I have /mnt/NameOfFile
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]

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

#28 Post by sunburnt »

It'll be fine until you have 2 image files with the same name...

I'm not sure just what the problem is with: /mnt/+Path+FileName
And I'm not sure why /mnt/FileName is an improvement, because it's not.

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

#29 Post by willhunt »

sunburnt I understand why you did it that way I did not mean to suggest it was better just different :(
if you addthison line 68

Code: Select all

if [ -f $MntPt ] ;then gxmessage "That mount point exisits please rename one of your files" ;exit 3 ;fi[code]
it should solve any problem that might arise
right?
[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.

#30 Post by sunburnt »

Yes, my suggestion was going to be to check for a preexisting mount point.
However, mount points are dirs. & not files ( if [ -d $MntPt ];then ).
This just stops duplicate image files from being mounted, not the best arrangement.

I'm just puzzled as to why you want to change code that does a better job.
My code will mount any number of image files, anywhere, with no conflicts.
I don't understand exactly what it is that your attempting to accomplish.

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

#31 Post by willhunt »

learn

Give a man a fish he eats a meal teach a man to fish he eats a lifetime and maybe he teachs someone else :D
[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.

#32 Post by sunburnt »

Aaaahhhhhhhhh; That's always a very rewarding effort, worthy of assistance.

If you want you could use the original method I used before going to the /mnt/+Path+File method.
That is adding a number to the file's mount point dirs. to make them unique.
If you want, I'll post code to do this, but you should be able to handle it no prob.
Rather than an arbitrary number, use the number of the next loop device.
So the mount point would be: FileName_LoopNumber ..... (pup_save.2fs_4).
To set the loop device that's to be used for mounting, use "losetup".

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

#33 Post by Béèm »

In ROX and right-click on a sfs, 2fs or 3fs and by editing Menu to load filemnt, filemt is in the menu now and any such file can be mounted by right click.
Nice.
The unmount should still be done manually however.
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

#34 Post by GuestToo »

Rather than an arbitrary number, use the number of the next loop device
or you could use the pid of the current process ... $$

or you could use uuidgen to generate an alphanumeric string that is almost guaranteed to be unique

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

#35 Post by willhunt »

thanks for the tips sunburnt and GuestToo I got how sunburnt did
his but once you use the pid uuidgen how do you glean the
new name?
[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]

Post Reply