Tabbed Pmount

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Tabbed Pmount

#1 Post by Dougal »

This is pretty much a "proof of concept". I just took the pmount from 2.17-exp1 and squeezed it into tabs, without trying to pretty it up.
I tried to avoid making any other improvements, so any complaints about bad functionality should go to Barry (in my case, the swap partition is declared "unused" -- though it is used -- probably because it's mounted as "/initrd/dev/hda2", rather than "/dev/hda2").

The first version is just everything squeezed into tabs in the original order.
The second version has the tab order reversed (so you start with SATA/USB, then IDE HDs, then swap, cdroms and floppy). Note that the first (left most) tab is the one shown by default.
The third version is like the second, only the cdroms are put into a "cdroms" tab.
Attachments
pmount3.gz
(6.73 KiB) Downloaded 542 times
pmount.gz
(6.3 KiB) Downloaded 515 times
tpmount1.jpg
(21.02 KiB) Downloaded 1267 times
pmount2.gz
(6.34 KiB) Downloaded 518 times
tpmount2.jpg
(19.78 KiB) Downloaded 1253 times
tpmount3.jpg
(18.89 KiB) Downloaded 1267 times
Last edited by Dougal on Tue 10 Jul 2007, 18:55, edited 4 times in total.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

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

#2 Post by BarryK »

Yes, I've done some bugfixing since 2.17exp1.

I'll look at your script and see if I can patch in the fixes.

It looks nice with the tabs!

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#3 Post by cb88 »

I like the third one best. With the cd drives in one tab. Since they don't have partitions. :D

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Pmount bug?

#4 Post by vovchik »

Dear Dougal,

As you can see from the attached, the last hda entry (hda1) has been "merged" with hda10 on my machine. The drive contains three ntfs partitions, two vfats, one reiser and one linux swap. Any ideas why this is so?

Apart from that infelicity, I like the new format, since the old one used to fill up my screen.

With kind regards,
vovchik
Attachments
pmount.png
(89.39 KiB) Downloaded 1217 times

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#5 Post by Dougal »

I've updates the third (which is now at the top).
It had a little bug where it wouldn't work on machines with no cdroms.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: Pmount bug?

#6 Post by Dougal »

vovchik wrote:As you can see from the attached, the last hda entry (hda1) has been "merged" with hda10 on my machine. The drive contains three ntfs partitions, two vfats, one reiser and one linux swap. Any ideas why this is so?
Is it only in my version, or also in Barry's from 2.17-exp1? It's probably the result of running grep on something, without a space/delimiter after what you're searching for.
Example:

Code: Select all

probepart | grep 'hda1' | cut -d'|' -f1
will give two partitions, rather than one (it should be "grep 'hda1|'")
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Haven't tried 2.17 yet

#7 Post by vovchik »

Dear Dougal,

I don't know whether it's also in Barry's version, since I only tried yours today and haven't yet installed 2.17e. I just tried the new pmount3 and it still shows hda10 (vfat) and home (hda1 -ntfs) lumped together as the last entry - as in the image attached above.

With kind regards,
vovchik

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#8 Post by WhoDo »

BarryK wrote:Yes, I've done some bugfixing since 2.17exp1.

I'll look at your script and see if I can patch in the fixes.

It looks nice with the tabs!
Barry, one of the things that MUT does and Pmount doesn't is to show partitions hidden by Grub (Type: Amoeba). As I use multiple versions of Puppy on one drive, I find it useful to be able to mount alternative partitions, even though I have hidden them at boot.

If you are going to be looking at merging in Dougal's excellent update, would it be possible to see if this problem can be solved as well? TIA.

Warren
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

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

#9 Post by HairyWill »

WhoDo wrote:Barry, one of the things that MUT does and Pmount doesn't is to show partitions hidden by Grub (Type: Amoeba).
reported here
http://www.murga-linux.com/puppy/viewto ... 900#115900
Last edited by HairyWill on Sat 07 Jul 2007, 07:04, edited 1 time in total.
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: Haven't tried 2.17 yet

#10 Post by Dougal »

vovchik wrote: I just tried the new pmount3 and it still shows hda10 (vfat) and home (hda1 -ntfs) lumped together as the last entry - as in the image attached above.
I didn't touch that when fixing it, I'm leaving it for Barry to deal with.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

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

#11 Post by BarryK »

Okay, this is the latest pmount, with a fix for the hda1 -- hda10 bug (I think). I haven't had time to apply Dougal's tabbed interface yet.

Note, this pmount is designed to work with the new probepart and probedisk in 2.17exp1, so may not be quite right in earlier puppies.
Attachments
pmount-217exp2.gz
(6.68 KiB) Downloaded 496 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Seems to work

#12 Post by vovchik »

Dear Barry,

As you can see from the screenshot, you found the main bug and fixed it. Thanks. The only minor thing left is that the disk capacity for hda1 (home) is shown as "." and not 41 GB - as it the case. You can understand why I think Dougal's tabbed approach is perfect for my installation. If I were to plug in another USB drive or flash, the listing would go off screen...and it's without scrollbars.

With kind regards,
vovchik
Attachments
pmount1.png
(101.84 KiB) Downloaded 1164 times

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: Seems to work

#13 Post by Dougal »

vovchik wrote:If I were to plug in another USB drive or flash, the listing would go off screen...and it's without scrollbars.
Not to mention if you had a floppy and a second cdrom...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Where is the floppy, by the way?

#14 Post by vovchik »

Thanks Dougal. I do have a floppy - but it's not showing. I didn't notice that until you pointed it out. I do have a DVD RW, and that shows....

With kind regards,
vovchik

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

#15 Post by BarryK »

Floppy drive not showing? ....aaargh! I just fixed it for someone else.

Oh well, can you test, the same as the other person did....

# grep 'fd0' /var/log/messages

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#16 Post by Dougal »

BarryK wrote:Floppy drive not showing? ....aaargh! I just fixed it for someone else.
Oops... the one thing I did change other than adding the tabs is that: I check for /sys/block/fd0...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#17 Post by Dougal »

I've updated "pmount3" in the original post.

Changes:
- fixed all high-partition-number bugs (including the size)
- fixed ordering of partitions inside device frame (was backwards)
- added support for exotic partition types (assuming probepart sees them)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Pmount3 - revised

#18 Post by vovchik »

Dear Dougal,

I get the following error with the revised pmount3:

Code: Select all

./pmount3
Killing old window
./pmount3: line 782: 16229 Terminated              yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "Puppy Drive Mounter

Please wait, probing hardware..."

** ERROR **: gtkdialog: Error in line 21, near token '</notebook>': syntax error

aborting...

root$ [~/my-applications/bin/test/puppy-scripts]->
Any idea why?

With kind regards,
vovchik

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

#19 Post by John Doe »

It's an error in the GTK syntax, which appears to be output to:

/tmp/pmountdlg.txt

mine is this:

Code: Select all

<window title="Pmount Puppy Drive Mounter "icon-name="gtk-harddisk">
<vbox>
 <text use-markup="true">
 <label>"<b>DO NOT REMOVE MOUNTED MEDIA</b>"</label></text>

<notebook labels="sdb|sda|hda|cdroms">
<vbox><frame Drive: Maxtor 6 Y160P0           >  
    <hbox>
     <text><label>"/dev/sdb2
51.1G ext3"</label></text>
     <button>
      <input file>/usr/local/lib/X11/pixmaps/hd24red.xpm</input>
      <action>echo 'EXIT=/dev/sdb2_XXX_RED'</action>
     </button>
    </hbox> </notebook>
 <hbox>
  <button><input file stock="gtk-refresh"></input><label>REFRESH</label>
    <action>echo 'EXIT=REFRESH'</action>
  </button>
  <button><input file stock="gtk-quit"></input><label>QUIT</label></button>
	</hbox>
</vbox>
</window>
I'm reviewing the output from pmount2 and it's a bit different. Something isn't nesting correctly in the loops I think.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#20 Post by Dougal »

Ok, I'll have a look at it, will post a fix later today.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Post Reply