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

#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

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

#21 Post by Dougal »

I've fixed that problem -- had forgotten to change some variable name in the SATA/USB section.
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_1

#22 Post by vovchik »

Dear Dougal and Barry,

It works like a charm now on my system (version 3.1). Thanks to both of you for this excellent utility. One perhaps trivial question, though: why use yaf-script now when that same function was accomplished by gtkmessage in previous versions? yaf-script is uglier than gtxmessage (which can display antialiased fonts whereas yaf dislplays ugly X fonts) but it does have a nice clock function if you are waiting for some other process to finish. Just wondering...

With kind regards,
vovchik

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

Re: pmount3_1

#23 Post by Dougal »

vovchik wrote:One perhaps trivial question, though: why use yaf-script now when that same function was accomplished by gtkmessage in previous versions?
That is a matter for philosophical debate... I find yaf-splash pretty ugly, but apparently Barry prefers it.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

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

#24 Post by John Doe »

Great work!! :D

All it needed was this one line in probepart at line 63:

Code: Select all

  [ "$FSTYPE" = "unknown" ] && if [ "`disktype /dev/$DEVICE | grep 'HFS Plus'`" = "HFS Plus file system" ];then
   FSTYPE="hfsplus"
   fi
just before this comment:
#for compatibility with old probepart from antonio gallo...
Attachments
pmount-hfsplus-small.png
pmount mounting hfsplus filesystem for the first time!
(24.28 KiB) Downloaded 838 times

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

#25 Post by BarryK »

Note, the probepart-bk4 posted earlier by me is way out of date. The latest probepart and probedisk are in 2.17alpha. Okay, attached here too:
Attachments
put-into-sbin-dir.tar.gz
(2.86 KiB) Downloaded 445 times

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

#26 Post by John Doe »

thanks Barry. you saved me a couple reboots. my wireless doesn't work (same as kirk's wife's laptop) and i have to keep reboot 2.17 anytime i want to test and then booting back into 2.16 to post, anyway...

same results. just throw that code in (it's about line 65). I'll attach it.

btw, mut sees it when mounted.
Attachments
mut-hfsplus-small.png
(19.95 KiB) Downloaded 863 times
probepart.gz
(1.38 KiB) Downloaded 464 times

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

#27 Post by John Doe »

Barry, any thoughts on making puppy support hfsplus at boot up and shutdown?

that would really help puppy "Rule the Day"!

intel mac users would dig it also.

the module is pretty small for initrd, ~80k I think from memory.

probepart is used at shutdown to find the parts isn't it?

i can't remember a thing about how the boot up script finds them.

User avatar
tahaselim
Posts: 48
Joined: Fri 29 Jun 2007, 08:29
Location: Ankara, Turkey

Pmount3

#28 Post by tahaselim »

Dougal, I installed pmount3.

whenever I want to mount CD driver, I have to change the tab from hda to cdroms then click on the CD icon. That's okay. But as you know pmount refreshes once you mount something and this time it again opens up in hda tab. If I want to (and I usually do) view the contents of the cdrom I have to change the tab once again. and then click on the Rox button.

can we change this? If I mount cdrom it open in the cdrom tab once it refreshes?

Taha Selim

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

#29 Post by BarryK »

John Doe wrote:Barry, any thoughts on making puppy support hfsplus at boot up and shutdown?

that would really help puppy "Rule the Day"!

intel mac users would dig it also.

the module is pretty small for initrd, ~80k I think from memory.

probepart is used at shutdown to find the parts isn't it?

i can't remember a thing about how the boot up script finds them.
Ideally, Jesses /usr/lib/mut/bin/guess_fstype should be extended to recognise hfsplus filesystems.
One problem with your modification to probepart is that 'disktype' will run everytime, for all partitions that are 'unknown' -- there could be a few of these. disktype is a bit slow.
What about 'fdisk -l'? -- does it identify a hfsplus f.s.?
-- the problem is, fdisk identifies the partition type, but that doesn't mean the partition has the correct f.s. in it.

The initial ramdisk has its own slightly modified version of probepart, called probepart_init. See /initrd/sbin.

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

Re: Pmount3

#30 Post by Dougal »

tahaselim wrote:pmount refreshes once you mount something and this time it again opens up in hda tab. If I want to (and I usually do) view the contents of the cdrom I have to change the tab once again. and then click on the Rox button.
Yes, I thought of that when I first implemented the tabs.
I don't know of a way to have a certain tab selected when you start, so I can't change that.
As for the Rox button, Pmount used to not have that, instead opening Rox automatically when the partition was mounted. This seems to have changed at some stage...
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
tahaselim
Posts: 48
Joined: Fri 29 Jun 2007, 08:29
Location: Ankara, Turkey

#31 Post by tahaselim »

Having a rox button to view the files is a good idea,
but the tabs are what I have problems with.

there Must be a way of defining a default tab, recording the tab number as the default while mounting a partition would solve the issue.

But that's easier said than done :wink:

Taha Selim

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

#32 Post by Dougal »

tahaselim wrote:there Must be a way of defining a default tab, recording the tab number as the default while mounting a partition would solve the issue.
I'll have another look at the gtkdialog examples, but as far as I know there's no option of a default tab.
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
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Pmount3

#33 Post by WhoDo »

Dougal wrote:As for the Rox button, Pmount used to not have that, instead opening Rox automatically when the partition was mounted. This seems to have changed at some stage...
Yep. I requested that change way back, so that you didn't have to umount/mount to get a Rox window open in the event you closed it while the partition was still mounted. This was considered a usability feature for Window$ refugees who had enough trouble understanding the whole mount/umount process, much less finding the mounted partition contents in Rox.
[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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: Pmount3

#34 Post by Dougal »

WhoDo wrote:I requested that change way back, so that you didn't have to umount/mount to get a Rox window open in the event you closed it while the partition was still mounted. This was considered a usability feature for Window$ refugees who had enough trouble understanding the whole mount/umount process, much less finding the mounted partition contents in Rox.
But that was one stage back, when there was a Rob button and the window opened automatically, wasn't it?

The problem now is that rox only opens from that button.

I looked again and there doesn't seem to be a way of selecting a tab in gtkdialog.
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
tahaselim
Posts: 48
Joined: Fri 29 Jun 2007, 08:29
Location: Ankara, Turkey

Re: Pmount3

#35 Post by tahaselim »

Dougal wrote: But that was one stage back, when there was a Rob button and the window opened automatically, wasn't it?

The problem now is that rox only opens from that button.

I looked again and there doesn't seem to be a way of selecting a tab in gtkdialog.
Dougal what do you think if we gather every secondary storage device in the first tab and show HD's in the second or third tab.

First tab will include : Cdrom-Dvd, and USB (maybe Floppy, I doubt if somebody still uses one)

Second Tab : HDD drives

etc.

I know this time mounting HDD's will be a problem but its more likely that a user would like to mount a CD or a flash disk and view the contents than mounting HDD every now and then.

Taha Selim

Post Reply