Ymount 002

Core libraries and systems
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

Ymount 002

#1 Post by Iguleder »

Here's a lighter alternative to Pmount, written with Yad (instead of the slower gtkdialog).

This one is a bit friendlier, it requires the same amount of clicks but lets you choose the partition according to the device it resides on. It also comes with a similar tool for safe removal of removable drives.

It should work on any recent kernel that uses the SCSI subsystem (e.g sda1 instead of hda1).

The only requirements it has are Yad (as mentioned earlier) and guess_fstype, which comes with all puppies these days.

Not heavily tested (especially optical media), but works with my netbook's hard drive and two flash drives :)

Changelog:
002:
- Added Yeject, a tool for ejecting removable drives :)
- Small bug fix
Attachments
ymount-002.pet
(1.97 KiB) Downloaded 1004 times
ymount.png
(69.1 KiB) Downloaded 1015 times
ymount-001.pet
(1.65 KiB) Downloaded 826 times
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

Re: Ymount 002

#2 Post by L18L »

Iguleder wrote:Not heavily tested
Testresult on freshly booted drake0.1 see picture. :(

Have to boot wary now...

Edited: same result in wary512


Edited 2011-09-11
Link to latest version provided always here:
http://www.murga-linux.com/puppy/viewtopic.php?p=557739
Attachments
ymount.png
ymount not showing sda2
(10.92 KiB) Downloaded 1881 times
Last edited by L18L on Sun 11 Sep 2011, 13:20, edited 1 time in total.

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

Re: Ymount 002

#3 Post by L18L »

Hi iguleder,

changing

Code: Select all

partition_size=$(echo "scale=1; `cat /sys/class/block/$partition/size` * 512 / 1000000000" | bc)
in functions
to

Code: Select all

partition_size=$(echo "scale=1; `cat /sys/class/block/$partition/size` * 512 / 1000000" | bc)
will make it visible

Code: Select all

#partition=sda2
# echo "scale=1; `cat /sys/class/block/$partition/size` * 512 / 1000000" | bc
16.4
#

my sda2 has size of 16 M (used as boot partition)
It is needed to be mounted if I want to edit grub/menu.lst :)

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#4 Post by Iguleder »

Thanks for the bug report :)

If I find enough time, I'll rewrite these tools. I want to compile a 64-bit kernel for 5.2.6 and rewrite my kernel build script before I mess with Yad again.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

Ymount 002

#5 Post by L18L »

Iguleder wrote:Thanks for the bug report :)

If I find enough time, I'll rewrite these tools. I want to compile a 64-bit kernel for 5.2.6 and rewrite my kernel build script before I mess with Yad again.
Here is the fix:

/usr/local/ymount/function line 54

Code: Select all

#				echo "$partition_size GB"	
                partition_size=`echo $partition_size | cut -d '.' -f 1`
                if [ $partition_size -gt 1000 ] ; then
                    partition_size=$(echo "scale=1; `echo $partition_size` / 1000" | bc)
				    echo "$partition_size GB"
                else	
				    echo "$partition_size MB"
			        fi
Attachments
ymount.png
sda2 is displaying now
(7.1 KiB) Downloaded 1826 times

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

ymount 002

#6 Post by L18L »

sorry,
/usr/local/ymount/function line 43
has to be changed to

Code: Select all

		partition_size=$(echo "scale=1; `cat /sys/class/block/$partition/size` * 512 / 1000000" | bc)
in order to get M instead of G

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

ymount

#7 Post by L18L »

Hi iguleder,
you wrote:If I find enough time, I'll rewrite these tools. I want to compile a 64-bit kernel for 5.2.6 and rewrite my kernel build script before I mess with Yad again.
No need to mess with yad for you.
yad is fun

Will upload next version soon :)

Edit
Here it is.
Note, in my example rox is empty but clicking the refresh button of rox makes the content display

Edited again
sorry, please change line 89 of /usr/local/ymount/functions from

Code: Select all

	if [ "$(is_mounted $1)" != "true" ]
to

Code: Select all

	if [ "$(is_mounted $1)"  = "-" ]
and then if you mount a mounted partition another rox will be opened. (same behavior as with pmount)

2011-07-08 Attached pet deleted, see next post

Edited 2011-09-11
Link to latest version provided always here:
http://www.murga-linux.com/puppy/viewtopic.php?p=557739
Attachments
ymount-003.png
(19.14 KiB) Downloaded 1788 times
Last edited by L18L on Sun 11 Sep 2011, 13:18, edited 2 times in total.

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

ymount

#8 Post by L18L »

test on drake01 failed: unmount does NOT work
test on lupu525 successful

bugs:
- does not show in menu (any HELP appreciated)
start it from console

Code: Select all

ymount
- closing the application by pressing x does not yet work (I will work on this)

Anyhow here is ymount031.pet
applied the above mentioned fix
added version in title
Attachments
ymount-031.pet
(2.48 KiB) Downloaded 781 times

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

Re: ymount

#9 Post by L18L »

L18L wrote:- closing the application by pressing x does not yet work (I will work on this)
forget this please.

start it from console
ymount sda
or
ymount

improvement in unmounting
no pet (I am yet no petmaker)
changes in attached ymount-032

Edited 2011-09-11
Link to latest version provided always here:
http://www.murga-linux.com/puppy/viewtopic.php?p=557739
Attachments
ymount-032.tar.gz
extract to /
contains just
/bin/ymount and /usr/local/ymount/functions
(2.14 KiB) Downloaded 759 times
ymount-032.png
(11.76 KiB) Downloaded 1754 times
Last edited by L18L on Sun 11 Sep 2011, 13:17, edited 1 time in total.

stu90

#10 Post by stu90 »

Nice work guys :)

I wonder though if it is possible to skip the first device selection gui and just have all available devises / partition in the same window with the mount unmount options ?

cheers.

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

Ymount 002

#11 Post by L18L »

stu90 wrote:Nice work guys :)

I wonder though if it is possible to skip the first device selection gui and just have all available devises / partition in the same window with the mount unmount options ?

cheers.
Something like this :?:

left button "preferences" will control this or default behavior
Attachments
ymount-0.4.png
pet coming soon...
(13.73 KiB) Downloaded 1602 times

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

ymount

#12 Post by L18L »

Here is ymount-0.4.pet

Edited 2011-09-11
Link to latest version provided always here:
http://www.murga-linux.com/puppy/viewtopic.php?p=557739
Attachments
ymount-0.4.pet
yad required
(4.89 KiB) Downloaded 728 times
Last edited by L18L on Sun 11 Sep 2011, 13:16, edited 1 time in total.

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

Re: ymount

#13 Post by sheldonisaac »

L18L wrote:Here is ymount-0.4.pet
Thanks a lot.

May I ask a question?

I downloaded that ymount-0.4.pet to my /mnt/sda5/sources directory, and clicked it in Rox filer. (Oh,this is Puppy Lucid 5.25)

It installed, and said a menu entry was under System
But it wasn't.

I found /bin/ymount, but it didn't run.

So I looked in this Murga forum, and found yad-0.12.4-i486
and downloaded that .pet and installed it.

After that, ymount works from the command line, but there is no menu entry that I could find.

I looked and found /ymount.desktop

Can I somehow have a menu entry, maybe under Filesystem?
Is that possible, or desirable?

Thanks a lot,

Sheldon

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

Re: ymount

#14 Post by L18L »

Hi Sheldon,
thanks for testing
you wrote:Can I somehow have a menu entry, maybe under Filesystem?
Sorry I am not (yet) a good petmaker.

If you install the original pet from Iguleder you will get the manu entry, and then reinstall 0.4.

Or better, maybe the other yad fan (hello stu90) would be so nice and make a correct pet ???

Cheers

PS ymount-0.4 was made in wary511, running now in squeeze

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#15 Post by Iguleder »

I won't be home for a few days, but once I get home I want to take a look at Ymount and get it working well so we can use it for dpup. Could be a very good replacement for Pmount, as you said.

I'll make sure to make a good Puppy-independent PET that can be used on any Puppy.

Cheers :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Menu -- Ymount under Filesystem

#16 Post by mikeslr »

Hi sheldonisaac,

Sorry sheldonisaac I don't have Ymount on this system.
But having run into Menu problems from time to time, perhaps the following might help:

You mentioned that ymount's executable was /bin/ymount. Click that file to be sure it will start ymount. [Typing ymount in a console will start it if it's anywhere on what Puppy recognizes as the executable path]. If not, search for other instances of what may be ymount executable, browse to it/them and test to find which one actually starts the program.
Open ymount.desktop in geany or some other text editor. You'll be interested in three of its arguments.
Make sure "Exec=" points to ymount's real executable (or a symlink to it). Note the absence of spaces after the "="'s.
Make sure "Icon=" points to an icon which actually exists.
Change Categories= from whatever it is now to
Categories=X-FilesystemUtility.

Restart X.

Hope this helps.

mikesLr

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

#17 Post by seaside »

I repackaged the pet.

The "desktop" files were at the top "/" level instead of in /usr/share/applications.

Should be in your menu now.

Cheers,
s
Attachments
ymount-0.4.pet
(4.98 KiB) Downloaded 617 times

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

Re: Menu -- Ymount under Filesystem

#18 Post by sheldonisaac »

(some SNIPping)
mikeslr wrote:Hi sheldonisaac,

Sorry sheldonisaac I don't have Ymount on this system.
But having run into Menu problems from time to time, perhaps the following might help:

Open ymount.desktop in geany or some other text editor. You'll be interested in three of its arguments.
Make sure "Exec=" points to ymount's real executable (or a symlink to it). Note the absence of spaces after the "="'s.
Make sure "Icon=" points to an icon which actually exists.
Change Categories= from whatever it is now to
Categories=X-FilesystemUtility.

Restart X.

Hope this helps.

mikesLr
It did, and thank you very much!!
seaside wrote:I repackaged the pet.

The "desktop" files were at the top "/" level instead of in /usr/share/applications.

Should be in your menu now.

Cheers,
s
Thanks a lot; I will replace the old pet

I appreciate all you folks have done!

Sheldon Isaac

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

Ymount

#19 Post by L18L »

seaside wrote:I repackaged the pet.
Thank you very much :) :)
Please test with CD/DVD (I have got none)
Are there floppy drives anywhere?

Next version will have free space for mounted partitions, here is a preview

sda1: more free then size
size is taken from fdisk
free is taken from df

Code needs some optimazing before posting

Edited 2011-09-11
Link to latest version provided always here:
http://www.murga-linux.com/puppy/viewtopic.php?p=557739
Attachments
ymount-0.5.png
preview
(12.8 KiB) Downloaded 958 times
Last edited by L18L on Sun 11 Sep 2011, 13:15, edited 1 time in total.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#20 Post by 8-bit »

I noticed the ymount-0.5.png image shows free space as a column.
But when I downloaded ymount-0.4.pet that seems to be missing and ymount-0.5.pet seems unavailable.
Is it still in the works?
Or is there a link to be able to get it as I like the option of having free space displayed.

Post Reply