Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:45:29+00:00 2026-05-28T20:45:29+00:00

I writing a script that mounts and unmounts several USB devices quickly. When a

  • 0

I writing a script that mounts and unmounts several USB devices quickly. When a new device is mounted, Ubuntu, by default, opens up a file browser window for that device. That behavior gets very annoying when it is mounting multiple devices.
I looked online, and found a tutorial explaining how to disable that feature through the gui (http://www.liberiangeek.net/2010/09/disableenable-auto-mount-ubuntu-10-0410-10-maverick-meerkat/) , but I wish to find a way to do that from within the script.

This is how I am currently mounting the devices:

 def mount_all(self):
        paths = self._get_partitions()
        vfat_path = paths[0][0]
        vfat = self.sysbus.get_object(SD.udisks_bus, vfat_path) 
        vfat_props = dbus.Interface(vfat, dbus_interface=SD.prop_bus)
        if vfat_props.Get(vfat_path, 'DeviceIsMounted'):
           self.fat = vfat_props.Get(vfat_path, 'DeviceMountPaths')[0]
        else:
           while True:
               try:
                   self.fat = vfat.FilesystemMount('vfat', {}, dbus_interface=SD.device_bus)
                   break
               except dbus.exceptions.DBusException:
                   time.sleep(0.1)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:45:30+00:00Added an answer on May 28, 2026 at 8:45 pm

    This turned out to be way simpler than I had thought. You can edit the .gconf properties with the tool gconftool-2 as explained here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a script that will grab several files and then copy them into
I'm writing a script that performs the same function several times, but when I
I am writing a script that will be polling a directory looking for new
I'm writing a script that takes a list of files from a directory, opens
I'm writing a script that has to download several files from the www. To
I'm writing a script that has to move some file around, but unfortunately it
I am writing a script that will look in a custom reports directory, copy
I am writing a script that checks if given domain is parked or not.
I'm writing a script that will ping my ip range. Here's what I have
I'm writing a script that'll read through my ftpd logs and generate a hash

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.