How to automount and easily acccess USB Flash Drives/Sticks in KDE? - KDE

This is a discussion on How to automount and easily acccess USB Flash Drives/Sticks in KDE? - KDE ; Hello. Is there a way to have KDE v3.3.2 automatically mount USB Flash drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)? I have to do it as root (su) and in command prompt with mount -t vfat /dev/sda1 /mnt/ ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: How to automount and easily acccess USB Flash Drives/Sticks in KDE?

  1. How to automount and easily acccess USB Flash Drives/Sticks in KDE?

    Hello.

    Is there a way to have KDE v3.3.2 automatically mount USB Flash
    drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)? I have to do it
    as root (su) and in command prompt with mount -t vfat /dev/sda1
    /mnt/. I was hoping KDE would be like Windows and MacOS X in
    automatically mounting and ready to read and write files.

    Also, how do I make the USB Flash drives/sticks writeable without being
    root? I cannot seem to set this. And does unmounting /mnt/
    from command line (doing it via KDE won't work due to limited access --
    not root) take a long time to complete? It seems to take a minute for my
    system.

    I am using Debian r3.1 (Kernel v2.6.10-K7) with all latest updates (I
    hope) from apt-get commands.

    I am still new to Linux world. Thank you in advance.
    --
    "The men of experiment are like the ant; they only collect and use. But the bee...gathers its materials from the flowers of the garden and of the field, but transforms and digests it by a power of its own." --Leonardo da Vinci
    /\___/\
    / /\ /\ \ Ant @ The Ant Farm: http://antfarm.ma.cx
    | |o o| | Ant's Quality Foraged Links: http://aqfl.net
    \ _ / Please remove ANT if replying by e-mail.
    ( )

  2. Re: How to automount and easily acccess USB Flash Drives/Sticks in KDE?

    ANTant@zimage.com wrote:

    > Hello.
    >
    > Is there a way to have KDE v3.3.2 automatically mount USB Flash
    > drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)? I have to do it
    > as root (su) and in command prompt with mount -t vfat /dev/sda1
    > /mnt/. I was hoping KDE would be like Windows and MacOS X in
    > automatically mounting and ready to read and write files.
    >
    > Also, how do I make the USB Flash drives/sticks writeable without being
    > root? I cannot seem to set this. And does unmounting /mnt/
    > from command line (doing it via KDE won't work due to limited access --
    > not root) take a long time to complete? It seems to take a minute for my
    > system.
    >
    > I am using Debian r3.1 (Kernel v2.6.10-K7) with all latest updates (I
    > hope) from apt-get commands.
    >
    > I am still new to Linux world. Thank you in advance.


    I've never done this before with a usb device, but look at the man page for
    mount...

    Normally, only the superuser can mount file systems.
    However, when /etc/fstab contains the user option on a line,
    then anybody can mount the corresponding system.

    Thus, given a line
    /dev/cdrom /cd iso9660 ro,user,noauto,unhide
    any user can mount the iso9660 file system found on his
    CDROM using the command
    mount /dev/cdrom
    or
    mount /cd
    For more details, see fstab(5). Only the user that
    mounted a filesystem can unmount it again. If any user
    should be able to unmount, then use users instead of user
    in the fstab line. The owner option is similar to the
    user option, with the restriction that the user must be
    the owner of the special file. This may be useful e.g. for
    /dev/fd if a login script makes the console user owner of
    this device.
    - - - - -



  3. Re: How to automount and easily acccess USB Flash Drives/Sticks in KDE?

    In comp.windows.x.kde ANTant@zimage.com wrote:
    > Is there a way to have KDE v3.3.2 automatically mount USB Flash
    > drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)?


    I don't see this as a function of the window manager (GUI), but more
    as a function of the OS itself. I'm running debian sarge and a Lexar
    "JumpDrive" flash stick. I don't know how much of what you need has been
    backported to woody (r3.1), so you'll just have to try it and see.

    Put this line in /etc/auto.misc (you need the automounter package,
    "autofs"). Change /dev/sda1 to your flash disk's device name:

    usbflash -fstype=vfat,uid=3,gid=3,umask=0,sync,noatime :/dev/sda1

    and this line in /etc/auto.master:

    /var/autofs/misc /etc/auto.misc --timeout=60

    Then symlink /var/autofs/misc/usbflash to /usbflash:

    cd / && ln -s var/autofs/misc/usbflash .

    The directory for the flash device is then "/usbflash" and it will mount
    and unmount automatically. (Actually, the unmount happens 60 seconds
    after your last access; I've found this sufficient for my needs.)

    Chris

  4. Re: How to automount and easily acccess USB Flash Drives/Sticks in KDE?

    I was asking almost the same question a few days ago with respect to
    Fedora Core 3.

    A simple answer I got is that you make an entry in /etc/fstab something
    like

    /dev/sda1 /mnt/flash vfat noauto,users,umask=000 0 0

    That should allow the ordinary user to mount and umount the device.

    (This was from Dances With Crows) someone else mentioned a web site
    http://www.ibiblio.org/pub/Linux/doc...s/html_single/
    Flash-Memory-HOWTO.html which I haven't looked at yet.

    Different distributions seem to have different philosophies on this
    stuff. There is the hotplug subsystem which is involved in recognizing
    devices that are plugged in and doing things about them. In Fedora Core
    3 it seems they automatically edit the /etc/fstab to put in a line like
    the above and leave it to the user to give a mount command. In Mandrake
    10.1 they seem to want to automatically mount the device for you.
    --

    jhhaynes at earthlink dot net


  5. Re: How to automount and easily acccess USB Flash Drives/Sticks in KDE?

    Jim Haynes wrote:
    > I was asking almost the same question a few days ago with respect to
    > Fedora Core 3.


    > A simple answer I got is that you make an entry in /etc/fstab something
    > like


    > /dev/sda1 /mnt/flash vfat noauto,users,umask=000 0 0


    > That should allow the ordinary user to mount and umount the device.


    > (This was from Dances With Crows) someone else mentioned a web site
    > http://www.ibiblio.org/pub/Linux/doc...s/html_single/
    > Flash-Memory-HOWTO.html which I haven't looked at yet.


    Awesome, worked perfectly! Even KDE desktop detected it and showed me
    an icon for it.
    --
    "The men of experiment are like the ant; they only collect and use. But the bee...gathers its materials from the flowers of the garden and of the field, but transforms and digests it by a power of its own." --Leonardo da Vinci
    /\___/\
    / /\ /\ \ Ant @ The Ant Farm: http://antfarm.ma.cx
    | |o o| | Ant's Quality Foraged Links: http://aqfl.net
    \ _ / Please remove ANT if replying by e-mail.
    ( )

  6. Re: How to automount and easily acccess USB Flash Drives/Sticks inKDE?

    ANTant@zimage.com wrote:
    > Hello.
    >
    > Is there a way to have KDE v3.3.2 automatically mount USB Flash
    > drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)? I have to do it
    > as root (su) and in command prompt with mount -t vfat /dev/sda1
    > /mnt/. I was hoping KDE would be like Windows and MacOS X in
    > automatically mounting and ready to read and write files.


    try adding this to /etc/fstab:
    /dev/sda1 /mnt/ vfat noauto,user 0 0

    Look at man fstab for more information on this. Then you can just right
    click on desktop, new, device, ...
    This will allow you to mount/unmount device as user without having to type.


    >
    > Also, how do I make the USB Flash drives/sticks writeable without being
    > root? I cannot seem to set this. And does unmounting /mnt/
    > from command line (doing it via KDE won't work due to limited access --
    > not root) take a long time to complete? It seems to take a minute for my
    > system.
    >


    I think the ,user part from above does this.

    > I am using Debian r3.1 (Kernel v2.6.10-K7) with all latest updates (I
    > hope) from apt-get commands.
    >
    > I am still new to Linux world. Thank you in advance.


    I believe it takes a long time b/c delays writing until later. This
    makes the disk seem faster. You can probably do a sync to have it do the
    writes sooner. Windows also does this, that's why it gives you warning
    about unsafe ejection.

    I'm by no means an expert, so you may want to look at the man pages
    before trying stuff. The fstab line is pretty much what I have on my
    computer, so I'm pretty sure it will work.

  7. Re: How to automount and easily acccess USB Flash Drives/Sticks inKDE?

    ANTant@zimage.com wrote:
    > Hello.
    >


    Hai!

    > Is there a way to have KDE v3.3.2 automatically mount USB Flash
    > drives/sticks (SanDisk Cruzer 256 MB, PNY 512 MB, etc.)? I have to do it
    > as root (su) and in command prompt with mount -t vfat /dev/sda1
    > /mnt/. I was hoping KDE would be like Windows and MacOS X in
    > automatically mounting and ready to read and write files.
    >


    I might be wrong, but I think the automount is primarily for
    automounting existing partitions during boot - if you have several
    harddrives in the system, these will automount based on the options used
    in fstab. If no automount option is given, they won't mount at boot.
    The automount option isn't used for the purpose of automounting
    insertable media.

    > Also, how do I make the USB Flash drives/sticks writeable without being
    > root? I cannot seem to set this. And does unmounting /mnt/
    > from command line (doing it via KDE won't work due to limited access --
    > not root) take a long time to complete? It seems to take a minute for my
    > system.
    >


    This will involve modifying your fstab in /etc.

    Follow this link and it should help you in understanding mounting
    partitions in Linux:
    http://www.tuxfiles.org/linuxhelp/fstab.html

    > I am still new to Linux world. Thank you in advance.


    We were all new once... =

+ Reply to Thread