Automatically mount flash drives in AwesomeWM

In Gnome when you put in a flash drive, it automatically mounts it in /media, and it's owned by me - so you can open a file on the flash drive in a file manager, the file isn't read only.  Is there anyway to do this in AwesomeWM?

You could just run thunar as a daemon and use it's volume management system.
pacman -Sy thunar thunar-volman
Start it with:
thunar --daemon
It will automatically mount removable drives.

Similar Messages

  • Run dot_clean automatically on flash drive

    Is there a way to run dot_clean automatically on flash drive, before its ejected? If not before its ejected, when its inserted?
    I have a PC and I dont always remember to run it before transferring between my Mac and PC.

    just reformat the flash drive using disk utility.

  • Mounting flash drives in  solaris failsafe mode

    Hello all,
    Suppose our system has crashed and we cannot login in solaris normal mod. But we need the data.
    I have done the following exercises to take the back up of the file system.
    1:- logged in fail safe mode.
    2:- mounted the file system in to a mount point.
    3:- took the backup of the file system using cpio command as /a/man.back.
    4:- tried this command "mount -F pcfs /dev/c4t0d0p0:1 /a/flash" to mount the flash drive. But it failed.
    How can we mount the flash drive in fail safe mode?
    or, Is there any other way to take the backup of the file system to an external device to restore after re-installing the OS.
    I would greatly appreciate it, if you could help me to rectify this problem.
    Thank You
    Regards,
    Sajan.

    Thanks, macbig...no joy yet, but definitely a helpful link.
    I've confirmed via System Profiler on laptop #3 that my external USB drive is formatted as MS-DOS FAT32, so mount_msdos seems like the right utility to use. (The drive shows up there as /dev/disk1s1.) Meanwhile, "ls /dev/disk*" on the problem machine returns the following:
    /dev/disk0 /dev/disk0s1 /dev/disk0s2 /dev/disk1 /dev/disk1s1 /dev/disk1s2 /dev/disk1s3 /dev/disk2 /dev/disk2s1
    I've created /Volumes/rescue as a mount point and tried most of those devices with "/sbin/mount_msdos [device] /Volumes/rescue", with the following results:
    /dev/disk1:
    mount_msdos: Unsupported sector size (0)
    /dev/disk1s1:
    mount_msdos: Unsupported sector size (1)
    /dev/disk1s2:
    mount_msdos: /dev/disk1s2: Bad file descriptor
    /dev/disk1s3:
    mount_msdos: Unsupported sector size (0)
    /dev/disk2:
    mount_msdos: Unsupported sector size (64543)
    /dev/disk2s1:
    kextload: cannot resolve dependencies for kernel extension /System/Library/Extensions/msdosfs.kext
    error loading extension /System/Library/Extensions/msdosfs.kext
    mount_msdos: msdos filesystem is not available
    Based on this, I'm guessing that disk2s1 is the device I want. Unfortunately, when I try to poke around in /System/Library/Extensions, I'm getting I/O errors...gah. I have a bad feeling about this.

  • Automatically Mount USB Drive on TC

    I have a USB drive attached to my TC and I use it for my itunes library. This works fine but when I use itunes on my macbook pro at home I must manually mount the drive. I would like to have the drive automatically mount whenever I am using my home network.
    Is there any way to do this?

    johnvic, welcome to the discussions!
    Open System Preferences, click on Accounts and then click on the Login Items tab.
    Click the + (plus) button at the bottom of the Login box and navigate to select your Time Capsule disk. Click Add.
    Time Capsule will open automatically the next time you restart your computer.

  • Unable to mount flash drive w/ OS 9.2.2 and Powerbook G3

    I've upgraded my G3 Pismo up to OS 9.2.2. However, the system won't mount a USB flash drive.
    Here's a breakdown of the problem(s):
    1) Insert flash drive, but flash drive won't appear on desktop.
    2) Check System Profiler, and system freezes.
    3) Remove flash drive from USB hub, and system unfreezes. System Profiler now has a listing for "Sandisk Cruzer Mini" in the USB -- even though the flash drive is no longer there.
    4) Check extensions. There is no USB Mass Storage Support extension. Download from Apple site, the USB Mass Storage Support 1.3.5 extension.
    5) Attempt to install this extension. Won't let me do it. Gives the message "This program cannot be run on your computer. See the documentation for details."
    6) Check documentation. I have the requisite system: Powerbook G3 and OS 9.2.2.
    7) Attempt to reinstall OS 9.2.2, as perhaps that might fix the problem.
    8) Cannot re-install OS 9.2.2. Gives the message: "The application program 9.2.2.smi etc. cannot be opened because an error of type -39 occurred."
    9) Clueless at this point.

    Hi, BGBchewy -
    Re the USB Mass Storage Support item, the ReadMe that accompanies it and comprises the info on the download page states -
        "Requirements
        Mass Storage Support 1.3.5 requires Mac OS 8.6. You do not need to install this software if you have installed Mac OS 9."
    Ditto the later version of that software, USB Adapter Card Support 1.4.1.
    This user Tip may provide the assistance you need -
    http://discussions.apple.com/thread.jspa?messageID=607556&
    <hr>
    Re the -39 error and the OS 9.2.2 download update, that error is most commonly caused by Stuffit Expander intruding where it should not. The download is in a .smi (self-mounting image) format, a format generated by Apple's Disk Copy. Stuffit Expander has ShrinkWrap technology built-in, which allows it to mount some kinds of disk images - but not .smi ones. Yet ShrinkWrap tries to - hence the error message.
    The solution - double-click Stuffit Expander, and open its Preferences (under the File menu). Select "Disk Images" from the list on the left, then turn off (uncheck) "Mount Disk Images". Quit Stuffit Expander.

  • [SOLVED] How to automatically mount USB drives with custom mount point

    edit:
    Original title was : 'Unable to mount USB disk via /etc/rc.local', but got changed since the /etc/rc.local problem isn't relevant for me anymore.
    Hello,
    Since I am new to this forum, I'll start off with this :
    Thanks to archlinux, its founder and all its contributors, cause this is the operating system (flavour) that annoys me the least.
    The root problem :
    I want to automount USB storage devices to other places than /media/ and without the need for programs that depend on gnome and the like. As I tried some stuff with hald and such, I didn't really get to a nice and easy to configure solution. Any hints in that direction are always welcome.
    For now, automount of known USB storages devices during boot, will do.
    So the things I tried and didnt work :
    1.
    Provide the disk info to /etc/fstab (via the disks UUID and 'auto' filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : the mount command in rc.local says '... specify filesystem'
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    2.
    Provide the disk info to /etc/fstab (via the disks UUID and the correct filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : pc doesn't get through boot process and gives me the 'ctrl-d to reboot or root passwd for maintenance'
    3.
    Provide no disk info in /etc/fstab
    Add the full mount line to /etc/rc.local (mount -t fs /dev/disks/by-uuid/MyUUID /MyMountpoint )
    Result : don't remember the output of the mount execution, but well, it didn't mount
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    Is there something that isn't loaded at the time of rc.local execution that I need for mounting of USB devices ? Or why else is this failing ?
    Regards,
    BasiK
    Last edited by BasiK (2009-08-28 07:22:50)

    Thanks for the hint hunterthomson, but the pc I will be using it on, is an own-built HTPC/home file server, so there is no way I want to use a graphical file manager to get the usb disks mounted.
    I tried to figure out a little about udev rules, and I got to do what I wanted to do, so thx for pointing me in that direction Mr.Elendig.
    Btw, I am indeed also using auto-sleep/park disks, but this udev way works perfectly.
    I added two rules files to /etc/udev/rules.d/ :
    The first for a known usb disk (with its volume uuid), with a named mountpoint under my media dir /symbiosis/ :
    [basik@plox ~]$ cat /etc/udev/rules.d/80-usb-utopia.rules
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",SYMLINK+="usb-%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",RUN+="/bin/mkdir -p /symbiosis/utopia"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/utopia", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/umount -l /symbiosis/utopia", OPTIONS="last_rule"
    The second for unknown usb disks, to mount under the same dir. This is simply taken from the archwiki http://wiki.archlinux.org/index.php/Ude … .26_Tricks
    Make sure these rules are executed after the ones for specific usb disks.
    [basik@plox ~]$ cat /etc/udev/rules.d/usb-disks.rules
    KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="storage", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /symbiosis/usb%n"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/usb%n", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /symbiosis/usb%n"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /symbiosis/usb%n", OPTIONS="last_rule"
    These may not be the nicest looking udev rules, but it works for what I wanted to do with it.

  • Failure to mount a flash drive after updates?

    Hey everyone,
    I was able to mount flash drives (etc...) for the duration of my install, and sometime in the last week or so I've become unable to do so. Its gotta be because I updated something and I broke it, no idea what or when this happened because I havent tried mounting any media in a while. The flash drive works on other computers and i get this error message from thunar:
    Rejected send message, 1 matched rules; type="method_call", sender=":1.17" (uid=1000 pid=3605 comm="exo-mount) interface="org.freedesktop.Hal.Device.Volume" member="Mount" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=1108 comm="/usr/sbin/hald)).
    Any idea what I could do to fix it?
    Thanks for your time.

    I see from an older post someone had something simular: http://bbs.archlinux.org/viewtopic.php?pid=325121
    Suggestions:
    * Make sure you are in the 'storage' group still.
    * Do the command 'fdisk -l', does the device come up (mine comes up in the /dev/sdb disk and below my main Arch Linux setup)
    Hope this helps!

  • Irregular flash drive mounting

    Is there a USB equivalent to "SCSI Mounter" (from way back when) that lets you actively search for USB drives and mount them? I have an Adaptec Duoconnect Firewire+USB2 PCI card. I prefer to use this because of the USB2 capability. On occasion I have problems mounting flash drives with the card. I have two 1 GB flash drives, SanDisk Cruzer, and Imation. I have two cables plugged into two of the card's ports to allow me to plug in the drives from the front of the computer. Today after the computer had been asleep for a few hours I tried plugging in the drives after waking up the computer, and they would not mount (tried repeatedly plugging and unplugging). However, I plugged in one drive in the native USB port on the back of the computer and it did mount. I then tried the same drive in the cable and it still wouldn't mount. I restarted the computer and they both mounted in their cables. Sometimes the Imation drive won't mount in one of the cables but will in the other. After restarting today it would mount in the cable in which it usually won't. At first I wondered if it was a power supply issue, or cable resistance, but I changed nothing other than restarting the computer. As I said, this isn't the first time I have had problems with the Imation drive mounting, but I thought it might just be a problem with that drive on that cable (worn connectors). Now I'm thinking it is more a software issue. I can't say for sure if it's just a post-sleep thing, though I often leave my computer switched on 24/7 so I' usually using it in a post-sleep mode.
    I don't see anything on Adaptec's website about Mac drivers so I don't think I can try that.
    Brian

    Actually, the drives are disconnected from the Mac when it goes to sleep (I already worked out that problem in another post). The real problem I had with leaving the drives plugged in was if I left the Imation drive plugged in and the computer went to sleep the computer would not wake again and I had to hard boot (restart button). I didn't seem to have this problem when I left the SanDisk drive plugged in, though of course the computer would give me a warning about the drive when I woke the computer.
    This seems to be more a matter of maybe the card, or parts of it, not waking from sleep consistently. The card works with all drives in all ports when I first start up or reboot the computer. After it has been to sleep a few times the Imation drive has problems first. Last night was the first time I couldn't get either drive to work with the card until restarting, then both drives were recognized. I just started up my computer now and all drives work in all ports.

  • How to get i photos to go on usb flash drive sandisk?

    how can I get i photos to go on usb flash drive sandisk?

    Kappy wrote:
    Try selecting them and dragging them to the mounted flash drive. Or select then CTRL- or RIGHT-click and select Copy from the options list. Open the Finder on the flash drive and press COMMAND-V to paste your selection to the flash drive.
    Note that dragging or pasting does not give you any control over the photo - you get the current preview with no metadata - the export command is a better way since it lets you make  your own choices in what is exported and how much metadata is included
    LN

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • Need help getting playlist into flash drive

    Hi friends ... so sorry to bother ... but I need some help ... my iPod Shuffle isn't compatible with my new cars audio system .... so I just bought my first usb flash drive (sandisk 8gig)  ...I inserted the flash drive and it mounted right away on the desktop ...  I just dragged all of the albums I wanted from my iTunes library to the flash drive icon .... I double clicked the flash icon and all the songs and every artist that I dragged into it showed up .... I inserted the flash into my car's usb port- and it played wonderfullyu... until I clicked on the menu and saw that instead of the 900 or so songs I dragged into the flash drive- only about 18 showed up in the audio systems menu ... only about 5 artists instead of the 30 or 40 that I loaded .... the flash drive is 8gig capacity and my entire library is only about 5 gigs .... I emptied all of the mpg's from my flash drive- threw out the trash ... and re-loaded everything again .... once again, when the transfer was finished , everything I dragged into the flash icon was there- every tune played as it shoud when clicked within the desk-mounted flash drive .... but when I inserted again into my cars usb port- once again only a fraction of what was on the flash drive showed up on my screen ...
    Please tell me what I'm doing wrong ...The flash drive never appeared in my iTunes window anywhere and under "devices" there was no option highlighted- maybe this is a clue to what I haven't done right?  this was the first time I ever used a usb flash drive..I didn't format or anything else -when the flash icon showed up on my desktop - I just intuitively dragged my playlist into the icon - everything appeared to be in there ... but didn't end up in my car's audio system .... please advise .... please advise as simply as possible .... much thanks in advance ....
    David

    David,
    Ther flash drive will not be a recognized Device to iTunes.  It will simply be another drive.  You can add files to it by drag-n-drop, as you correctly did.
    Most likely, you have many files in AAC audio format, and your car player is one of the many that can play MP3, but not AAC.
    If you need to convert any formats, consult this document:
    iTunes 11 for Mac: Save a copy of a song in a new file format
    http://support.apple.com/kb/PH12167

  • IMac disk utility not reading any FAT32/NTFS related partitions/CD/flash drives

    Hi everyone!
    I'm trying to access my drives and later on install bootcamp and windows on my iMac. At moment I can only start the iMac in safe mode (long story, if interested check out iMac 27" (late 2009), freezing - List of solutions tried). Any steps taken so far to read and format other drives has been in Safe Mode.
    Problems:
    - any formats except Mac OS X extended gets greyed out in Disk Utility.
    - Not able to read/mount flash drives, external drives or CD's with any other formats.
    Solutions tried:
    - Tried to format using OSX on current iMac, MBP and PC and no change or luck.
    - Tried on other machines and it works great. So it's related to my iMac.
    - Disk Utility try to Mount drive/partition - getting error "The disk "BOOTCAMP" could not be mounted"
    - Installed Paragon NTFS but no difference.
    - Disk Utility no disk error reported
    Searched on internet and forums for a solution w/o any luck. Haven't found anyone with similar problems or I'm using wrong keywords. Haven't found any Knowledge Base about other formats is disabled in Safe Mode state so it can't be that either. Below is a picture that shows any other partitions than mac is greyed out.
    Any suggestions or anyone encounter with this wierd behavior?

    Paragon NTFS MAC ÔS X is ideal for using NTFS insideOS X
    You want Bootcamp forum
    External drives not supported

  • Connection to server fail/Flash drive will not mount

    I'm struggling with this issue and hope someone will have some insight these problems I'm having. I'm currently running 10.6.4 on my Mac and all of the sudden I'm unable to connect to my work's servers or mount a flash drive drive. The issue began after I corrected my disk permissions and restarted my computer. On the restart, I got a pop-up for each server I automatically connect to. The pop-up reads:
    +*Connection Failed*+
    +There was an error connecting to the server "SERVER NAME". Check the server name or IP address, and then try again.+
    +If you are unable to resolve the problem contact your system administrator.+
    At the same time, my flash drive, which has always worked, won't mount on my computer. But, here's the weird thing... I have two external drives connected to my Mac and they work perfectly. My only guess is that they're formated as Mac OS Extended (Journaled) and my flash drive is formated as MS-DOS(FAT).
    Any ideas as to why these issues are happening? Thanks

    Okay, this is just getting ridiculous. Turns out that my Mac will no longer mount a DVD. I'm working on a project in which I'm making a DVD with DVD Studio Pro and the disc burns just fine. However, when I insert to the disc to verify that it was burned correctly I cannot play the DVD.

  • Mount a USB flash drive from a shell

    I am about six months new to Linux; I have installed my first arch system but not yet installed a desktop environment.  I am trying to mount a USB flash drive from the shell but I am not having much luck.  I have tried following the instructions in the archwiki, http://wiki.archlinux.org/index.php/USB_Storage_Devices. I am having a problem with the following command:
    mount -t vfat /dev/sda1 /mnt/usbstick
    I get an error message saying that the mount point does not exist.  I have in the /mnt directory the following:
    cd cdrom dvd fd0 f1
    (I am not sure what fd0 and fl are, if somebody could please tell me I would appreciate it.  Also I do not have a DVD-ROM on my computer is the dvd listed by default or do I have a package installed I do not need?)  I did some searching online and came across the following site, http://linuxcommando.blogspot.com/2007/ … -from.html. I followed the instructions to identify the correct partition name corresponding to the USB drive by running the following command:
    grep SCSI /var/log/messages.log
    and I get the following results:
    Dec 30 22:16:17 morgan-desktop scsi2 : SCSI emulation for USB Mass Storage divices
    Dec 30 22:16:22 morgan-desktop sd 2:0:0:0: [sdb] Attached SCSI removable disk
    The next steps in the instructions are to mount the partition to the existing mount point (directory) by using the following command.
    mkdir -p /mnt/myusb
    mount -t vfat -o rw,users /dev/sda1 /mnt/myusb
    This is where I am having a problem, I do not understand the results and how to proceed to the next step, please help me.
    One other small question what is the best command to shut down the computer as a normal user?
    Thank you
    Morgan Smith

    Ok, Lots of different advice here, let's see if I can explain it all together, and clear up a few bits...
    I'll try to explain why I'm saying what I am, it doesn't matter if you don't follow it all, commands are below.
    You are on the right lines here, but a few things missing.  Firstly, to mount the USB stick you are using the correct command, but the locations are a problem.  The command is "mount -t type what/to/mount where/to/mount".   You can find out more about the mount command with "mount --help" or "man mount"
    You have correctly identified type as vfat - this means the pen is formated as FAT.
    To find out what to mount, you can check /var/log/messages.log, the second command you posted searches trough that file and prints out lines including the phrase SCSI, and the result tells you that a usb storage device had been attached as sdb, so the correct device is /dev/sdb1.  Storage devices are named sda sdb sdc etc in the order they are attached, and the numbers refer to the partitions on the disk.
    You can mount it anywhere you want, as any existing directory, but the one you tried to use /mnt/usbstick doesn't exist, so create it, using mkdir.
    The commands you need therefore are:
    mkdir /mnt/usbstick
    mount -t vfat /dev/sdb1 /mnt/usbstick
    This will work as root.  There is also, as byte said, a program called pmount (which you can get with pacman -S pmount) which works the same way for a standard user.
    Finally, there are also a number of tools like HAL which can be used to automate the process.
    As for shutting down, as has been said you must be root or in the power group, then you can use 'halt' 'poweroff' 'reboot' or 'shutdown'. All have slightly different effects, and poweroff is probably the easiest.
    Hope this helps
    Jack

  • [Solved] unable to mount harddisk partition or flash drive

    After recent updates to gnome 3.4.2,i am unable to mount  harddisk partition or flash drive .I have 2 year old arch installation with gnome.
    When i click on partitions in nautilus,it says "Unable to mount program files \n Not authorized to perform operation"
    Problem is not only while mounting partitions.
    Wherever we need authorization .Like changing date and time ,changing user accounts using gnome UI etc.The unlock button is greyed out permanently.
    even i am not able to shutdown using gnome menus. it just log me out only ,do not restart or shutdown.Though i can shutdown using shutdown command on commandline.
    i run gnome using daemon method. not through xinitrc .
    https://bugs.archlinux.org/task/25031?p … ekit#close
    I found a similar discussion in this bug. But since, i do not use xinitrc, it is unlikely they will help me.
    Can someone be kind enough to help me on this?
    Thanks in advance.
    Last edited by piyushbhatt (2012-09-11 05:48:57)

    maybe changes in udev or any other package
    you have polkit polkit-gnome
    and you user is in optical, disks and wheel groups?
    for me those above work in every sitation

Maybe you are looking for