Hey Alain, let me try to help/

On 5/30/07, Alain Michaud <[EMAIL PROTECTED]> wrote:
Hi,

 thank you all for the answers. I have many hints now: enough to keep me
busy for many hours:

--- My fstab does not say anything about .../floppy... That does not
seem normal?
It is in fact normal with many modern distro's (I don't know what you
are running), there is no requirement even on older ones, but NOT
having it there would mean there is no way to make the device user
mountable (by default only root could run mount $DEVICE $MOUNTPOINT)

--- My code does not have to be portable, but the users are Microsoft
oriented and I find it very difficult to "sell" my Linux/FPC/Lazarus
code. For me, opening the floppy before I run the application is easy,
but for my users, it seems like an impossible task... Their next step
would be to press the reset button !
I hear you, I often used to face the same issues, on most modern
distros the floppy would open itself when inserted, I'm guessing this
is NOT one of those. Assuming you can mount it with a simple command,
I think the easiest is to just call the command from your app before
running the dialog, another way would be to use the kernel automouter
(there's a howto) which will mount the device whenever the mountpoint
is accessed, and unmount it after X seconds inactivity.

--- One colleague told me about "mtools" utility that will access the
floppy without going through the file system. I do not know if there is
a library or some programing interface?
Mtools does exist, it is specific to dos floppies, it accesses them in
a different way though. It can do things like copy files etc.
Konqueror has a kpart which uses it so either it DOES have an API of
some sort or you can read disks and manage their content pretty
completely with the commandline tools it includes - if you wish to try
this, I would suggest reading up on the mtools howto.

--- Now I year all the laughs because I still use floppy disks:

We still have an old network analyser (model 8510C) from Hewlet Packard:
It is very old (1990), but very expensive to replace. It has a 720 kB
flopy drive built in it. Any upgrade will be difficult because of
compatibilty issue. I already feel very lucky that it will write on DOS
formatted floppys.
That explains it  - no worries.
If you let me know which distro you're using, I could possibly give
more specific advice.

A.J.

Thank you all any way

Alain

On Wed, 2007-05-30 at 08:58 +0200, A.J. Venter wrote:
> As far as I know, the only way is to fire up a tprocess and launch the
> actual mount command.
> Of course if you want your program to be truly portable it should be
> configurable where it opens (many distro's mount removeable stuff
> under /media these days - and many of them  don't use traditional
> mounting anymore [think hal+dbus+solid etc.])
> The norm in fact is to just open the mount point and leave it to the
> user/distro to make sure it's mounted.
>
> I would make these things options in your program "try to mount floppy
> before opening" and "floppy mount point"
>
> A.J.
> PS. You still use floppies ?
>
> On 5/30/07, Alain Michaud <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  this is not really a lazarus/FPC question, but it would help me if
> > anyone would know about this:
> >
> > I set the TOpenDialog.InitialDir property to "/mnt/floppy" but when I
> > execute:
> >
> > MyOpendialog.execute
> >
> > the content is empty of course because it is not mounted!
> >
> > Would anyone know how to mount the floppy from inside the lazarus
> > application?
> >
> >
> > Thank you.
> >
> > Alain
> >
> >
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> >
>
>




--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to