Gnome auto mounts SD cards... umount them from the shell? [SOLVED]

Subject says it all.  I wrote a trivial script to unload pics from an SD card inserted into my card reader.  I'd like to add a line that umounts the SD card but I'm not sure how to do this since gvfs-fuse-daemon auto-mounted it for me.
$ mount
gvfs-fuse-daemon on /home/user1/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=user1)
/dev/sde1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1003)
I can do it in two lines, but is there a better way?
sudo umount -l ~/.gvfs
sudo umount /media/disk
Last edited by graysky (2009-08-25 19:52:24)

Try gvfs-mount -u /media/disk

Similar Messages

  • 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

  • After downloading photos from my Nikon, I accidentally deleted them from the card.  The photos are in IPhoto.  Can I recover them to the camera card?

    After downloading photos from my Nikon, I accidentally deleted them from the card.  The photos are in IPhoto.  Can I recover them to the camera card?

    Probably -will your card mount to the desktop? If not you will need a card reader - select the photo(s) in iPhoto and export to a desktop folder - mount the card to the desktop and drag the photos to the corredct folder on it
    LN

  • How can I copy pictures from my computer to my SX50 so I can show them from the camera?

    How can I copy pictures from my computer to my SX50 so I can show them from the camera?

    I know this is an older thread, but FWIW you should be able to open up My Computer in Windows, locate your memory card there, then either drag and drop and/or copy and paste images from your computer's hard drive onto the memory card.

  • I just downloaded Yosemite and all my iPhotos have disappeared! I tried importing them from the photo library but it said there wasn't enough space on my hard drive which is rubbish, because they were there before. How do I get them back to iPhoto?

    I just downloaded Yosemite and all my iPhotos have disappeared! I tried importing them from the photo library but it said there wasn't enough space on my hard drive which is rubbish, because they were there before. How do I get them back to iPhoto?

    There are 9 different versions of iPhoto and they run on 9 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.

  • I have playlists on my original iPod but are not in the library.  How can I move them from the iPod to the library?

    I have playlists on my original iPod but are not in the library.  How can I move them from the iPod to the library?

    She can choose to either enable the setting on her iPod to Manually manage music and videos.  With setting enabled she can sync content to her iPod from multiple computers without it affecting whats already stored her iPod. For more information on syncing content to an iPod manually see this article. 
    http://support.apple.com/kb/ht1535
    However, I would recommend copying whats on her iPod to her iTunes library first.  There are several ways to accomplish this.  See this older post from another forum member Zevoneer discussing the different ways to do it.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    From the Finder menu select 'Secure Empty Trash'. If this or the suggestion above doesn't resolve the problem take a look at the various suggestions in this link:
    http://www.thexlab.com/faqs/trash.html

  • I am unable to see any POP3 or IMAP tab when I set up an account in my iphone 4S. Hence by default all my email accounts become IMAP and the messages are deleted from the server when I delete them from the iphone.

    I am unable to see any POP3 or IMAP tab when I set up an account in my iphone 4S. Hence by default all my email accounts become IMAP and the messages are deleted from the server when I delete them from the iphone.

    ok sorry everyone but i solved it myself but the solution is so nuts i've posted it here to help others who have the same problem.
    to setup a comcast imap account on your iphone:
    go to mail, contacts, etc in settings
    under accts, select add account
    select "other"
    new screen, choose "add mail account"
    now on the new acct screen you must enter your name, email address and password for your GMAIL acct ! (yes i said your gmail acct !, or some other acct with a NON comcast address).
    hit next
    then the acct verifies
    when verified a screen will open with all the acct settings for this acct AND @ the top of the screen are the 2 buttons > imap or POP
    select imap and THEN CHANGE ALL THE ACCOUNT information to the comcast account !
    then hit next and the account will take a couple minutes to verify but it will verify and now you have a comcast imap acct set up on your iphone.  The problem must be that when the iphone sends the initial verify acct info to comcast (if you enter that information first) the comcast server is simply not setup yet to signal the iphone that there is an imap option.

  • How do I put photos in an album and remove them from the camera roll?

    I would like to be able to move photos into an album and remove them from the camera roll. Is this possible?
    I take many photos of mundane things that I simply want to remember, such as serial number of products. I would like to save these photos for viewing, but I don't want them to appear in my camera roll, where I have to continuously scroll through many such photos to get to the ones that I want to view there.
    I know that Apple has a "hide" feature, but it doesn't actually do anything. When I press-and-hold on individual photos, the photos stay in the camera roll: they aren't hidden at all. It's not clear what the purpose of this function is at all.

    You don't do this, as the photos are in the camera roll.  That is where they live.  When you make an album you are simply making a list of pointer to your photos in camera roll.
    If you remove them from the camera roll, then they are gone. 
    Photos in albums are not in two places.  They are in only one place, the camera roll.  The album merely contains pointers to those pics, so that you can categorize them however you like.
    You should be importing these pics to your computer.  I find it far easier to organize my photos on my computer, then sync them to the iPhone.

  • My husband has retrieved emails from my exchange email account. I deleted them from the trash bin. How is he doing this?

    My husband has retrieved emails from my exchange email account. I deleted them from the trash bin. How is he doing this?

    shannon284 wrote:
    My husband has retrieved emails from my exchange email account. I deleted them from the trash bin. How is he doing this?
    OK, let's come back to the original issue; how are deleted messages retrievable?
    First, is the account set up as an Exchange account or a POP account? I'll assume it's Exchange. If it were POP the answer is obvious.
    If it's an Exchange account are you deleting the messages from the phone or from some other computer? If you are deleting them from another computer they will not be removed from the Trash folder on the phone until the phone next syncs AND the Trash folder is opened. But this will take time. You can force the Trash folder to sync in near real time by going into Settings/Mail,Contacts,Calendars, tap on the Exchange account, tap on Mail Folders to Push and check "Deleted Items". Note that doing this will result in increased data usage and reduced battery life.
    If I haven't described the situation tell me what assumptions I made that are incorrect.

  • Is there another way to close apps other than deleting them from the multitask bar.....I have a small crack in the bottom of my screen and that part of the screen does not recognize the touch.  :(

    Is there another way to close apps other than deleting them from the multitask bar.....I have a small crack in the bottom of my screen and that part of the screen does not recognize the touch. 

    There's generally no reason to be closing them that way at all. The apps you see in the recents bar are just that, apps that you used recently. Most of them are doing absolutely nothing. The only apps that are really doing anything in the background are ones that play music and ones that are using location services. Just leave them be.
    Best of luck.

  • How can I saved the ipad isms conversation in a iMac file to be able of deleting them from the ipad?

    how can I saved the ipad isms conversation in a iMac file to be able of deleting them from the ipad?

    Hi Aurea,
    One way of saving your sms conversations so that you can then delete them from your iPad would be to back up the contents of your iPad using either iTunes or iCloud. See these articles -
    Create and delete iPhone, iPad, and iPod touch backups in iTunes - Apple Support
    iCloud: iCloud storage and backup overview
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • HT201269 All the photographs stored on my computer ended up getting put on my iPhone. How can I get rid of them from the iPhone?

    All the photographs stored on my computer ended up getting put on my iPhone. How can I remove them from the iPhone?

    Photos synced to your phone can only be removed from your phone the same way they got there, through the iTunes sync process. Connect your phone, iTunes running, & under the photos tab remove the checks for all albums/folders you do not want on your phone. Hit the apply/sync button & they will be removed from your phone.

  • I Trashed Some Song Files from my Computer that Had Been Previously Matched, and Now iTunes Can't Located Them. How Do I Download Them from the Cloud?

    The title pretty much says it all. I deleted some songs from my hard drive that had already been added to the cloud using iTunes Match, and now, when I try to play them, I'm asked to locate the files. The songs are still available on my other devices, so I didn't delete them from the cloud. How do I reconect the songs on my computer with the files in the cloud?

    Apple provides a brain-dead simple way to backup all your personal data in the form of Time Machine that keeps incremental backups going back at least several weeks, if not months (depending on the size of the backup drive). Why more people don't use it is a puzzle to me. In this day and age of person, and very important, data being digitial (sometimes exclusively) backing everything up becomes imperative. Ideally a good backup scheme should incorporate multiple backup solutions in case of very serious emergencies, but for most people, and in the case described in the OP TM is a very good solution. If a file is deleted, then found to be needed again, just go to the date and time in TM just before the file was deleted and restore it. Simple. But it doesn't work if you aren't backing up. So... backup, backup, backup. You'll thank yourself that you did when you finally need it.

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

Maybe you are looking for