coldfix / udiskie Goto Github PK
View Code? Open in Web Editor NEWAutomounter for removable media
License: MIT License
Automounter for removable media
License: MIT License
These are suited for replacement by a user-defined functions. They could for example be customized in a ~/.config/udiskie/commands.py
file, much like the configuration model of ranger. The runpy module might be of use here.
Other alternatives:
module:object
I looked at the code and it looks fine, but xprop
tells me it is not getting the dialog properties:
_NET_WM_USER_TIME(CARDINAL) = 524565221
_NET_WM_STATE(ATOM) =
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
window id # of group leader: 0x2000001
XdndAware(ATOM) = BITMAP
_NET_WM_OPAQUE_REGION(CARDINAL) = 0, 0, 718, 883
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554437, 33554438
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x2000004
WM_CLIENT_LEADER(WINDOW): window id # 0x2000001
_NET_WM_PID(CARDINAL) = 29565
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "bronto-burt"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 0, 0
program specified minimum size: 207 by 105
program specified base size: 0 by 0
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "udiskie-mount", "Udiskie-mount"
WM_ICON_NAME(STRING) = "udiskie"
_NET_WM_ICON_NAME(UTF8_STRING) = "udiskie"
WM_NAME(STRING) = "udiskie"
_NET_WM_NAME(UTF8_STRING) = "udiskie"
Automounting mtp-enabed devices using libmtp or any other mtp backend
Love the work you do coldfix. I have an issue in regards to my sdcard which I leave permanently in. 9/10 suspends it remounts perfectly after a suspend. On those rare occassions, I notice that the mapping changes from /dev/sdb1 to /dev/sdc1 which results in a failed mounting at /media. Not sure if this is a udiskie issue but thought I'd try to seek your help first.
Oct 06 11:54:48 AeriusX systemd[1]: Stopped TLP suspend/resume.
Oct 06 11:54:48 AeriusX kernel: usb 2-3: new SuperSpeed USB device number 2 using xhci_hcd
Oct 06 11:54:48 AeriusX kernel: usb-storage 2-3:1.0: USB Mass Storage device detected
Oct 06 11:54:48 AeriusX kernel: scsi host5: usb-storage 2-3:1.0
Oct 06 11:54:48 AeriusX kernel: usb 1-3: new full-speed USB device number 2 using xhci_hcd
Oct 06 11:54:48 AeriusX kernel: usb 1-3: ep 0x81 - rounding interval to 1024 microframes, ep desc says 2040 microframes
Oct 06 11:54:48 AeriusX kernel: hub 1-3:1.0: USB hub found
Oct 06 11:54:48 AeriusX kernel: hub 1-3:1.0: 3 ports detected
Oct 06 11:54:48 AeriusX mtp-probe[16092]: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3"
Oct 06 11:54:48 AeriusX mtp-probe[16092]: bus: 2, device: 2 was not an MTP device
Oct 06 11:54:48 AeriusX kernel: usb 1-5: new full-speed USB device number 3 using xhci_hcd
Oct 06 11:54:48 AeriusX kernel: usb 1-3.1: new full-speed USB device number 4 using xhci_hcd
Oct 06 11:54:48 AeriusX kernel: apple 0003:05AC:0291.0011: hiddev0,hidraw0: USB HID v1.10 Device [Apple Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:14.0-5/input0
Oct 06 11:54:48 AeriusX kernel: input: Apple Inc. Apple Internal Keyboard / Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:05AC:0291.0012/input/input26
Oct 06 11:54:48 AeriusX kernel: usb 1-3.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Oct 06 11:54:48 AeriusX kernel: input: HID 05ac:820a as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/0003:05AC:820A.0013/input/input27
Oct 06 11:54:48 AeriusX kernel: apple 0003:05AC:0291.0012: input,hiddev0,hidraw1: USB HID v1.10 Keyboard [Apple Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:14.0-5/i
Oct 06 11:54:48 AeriusX kernel: input: bcm5974 as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/input/input28
Oct 06 11:54:49 AeriusX systemd-udevd[16110]: error opening ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host5/scsi_host/host5/link_power_management_policy} for w
Oct 06 11:54:49 AeriusX kernel: hid-generic 0003:05AC:820A.0013: input,hidraw2: USB HID v1.11 Keyboard [HID 05ac:820a] on usb-0000:00:14.0-3.1/input0
Oct 06 11:54:49 AeriusX mtp-probe[16114]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Oct 06 11:54:49 AeriusX mtp-probe[16114]: bus: 1, device: 3 was not an MTP device
Oct 06 11:54:49 AeriusX kernel: usb 1-3.2: new full-speed USB device number 5 using xhci_hcd
Oct 06 11:54:49 AeriusX kernel: usb 1-3.2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Oct 06 11:54:49 AeriusX kernel: input: HID 05ac:820b as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.2/1-3.2:1.0/0003:05AC:820B.0014/input/input29
Oct 06 11:54:49 AeriusX kernel: hid-generic 0003:05AC:820B.0014: input,hidraw3: USB HID v1.11 Mouse [HID 05ac:820b] on usb-0000:00:14.0-3.2/input0
Oct 06 11:54:49 AeriusX kernel: usb 1-3.3: new full-speed USB device number 6 using xhci_hcd
Oct 06 11:54:49 AeriusX kernel: scsi 5:0:0:0: Direct-Access APPLE SD Card Reader 3.00 PQ: 0 ANSI: 6
Oct 06 11:54:49 AeriusX mtp-probe[16158]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.3"
Oct 06 11:54:49 AeriusX mtp-probe[16161]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1"
Oct 06 11:54:49 AeriusX mtp-probe[16161]: bus: 1, device: 4 was not an MTP device
Oct 06 11:54:49 AeriusX mtp-probe[16159]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.2"
Oct 06 11:54:49 AeriusX mtp-probe[16159]: bus: 1, device: 5 was not an MTP device
Oct 06 11:54:49 AeriusX mtp-probe[16158]: bus: 1, device: 6 was not an MTP device
Oct 06 11:54:49 AeriusX kernel: sd 5:0:0:0: [sdc] 251394048 512-byte logical blocks: (128 GB/119 GiB)
Oct 06 11:54:49 AeriusX kernel: sd 5:0:0:0: [sdc] Write Protect is off
Oct 06 11:54:49 AeriusX kernel: sd 5:0:0:0: [sdc] Mode Sense: 23 00 00 00
Oct 06 11:54:49 AeriusX kernel: sd 5:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Oct 06 11:54:49 AeriusX kernel: sdc: sdc1
Oct 06 11:54:49 AeriusX kernel: sd 5:0:0:0: [sdc] Attached SCSI removable disk
Oct 06 11:54:50 AeriusX kernel: EXT4-fs (sdc1): recovery complete
Oct 06 11:54:50 AeriusX kernel: EXT4-fs (sdc1): mounted filesystem with writeback data mode. Opts: (null)
Oct 06 11:54:50 AeriusX udisksd[1735]: Mounted /dev/sdc1 at /media/Jetdrive on behalf of uid 1000
Oct 06 11:54:50 AeriusX systemd[1]: media-Jetdrive.mount: Unit is bound to inactive unit dev-sdb1.device. Stopping, too.
Oct 06 11:54:50 AeriusX systemd[1]: Unmounting /media/Jetdrive...
Oct 06 11:54:50 AeriusX udisksd[1735]: Cleaning up mount point /media/Jetdrive (device 8:33 is not mounted)
Oct 06 11:54:50 AeriusX org.freedesktop.Notifications[1393]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Oct 06 11:54:50 AeriusX systemd[1]: Unmounted /media/Jetdrive.
Oct 06 11:54:50 AeriusX systemd[1]: media-Jetdrive.mount: Unit entered failed state.
Oct 06 11:59:47 AeriusX kernel: EXT4-fs error (device sdb1): ext4_wait_block_bitmap:493: comm lftp: Cannot read block bitmap - block_group = 635, block_bitmap = 20447243
Oct 06 11:59:47 AeriusX kernel: EXT4-fs error (device sdb1): ext4_discard_preallocations:4020: comm lftp: Error reading block bitmap for 635
Oct 06 11:59:51 AeriusX kernel: EXT4-fs error (device sdb1): ext4_put_super:800: Couldn't clean up the journal
Oct 06 11:59:51 AeriusX kernel: EXT4-fs (sdb1): Remounting filesystem read-only
This is the full build log [1]
and the snip of the log
dh_auto_clean
I: pybuild base:170: python2.7 setup.py clean
gdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
running clean
removing '/build/buildd/python-udiskie-1.2.0/.pybuild/pythonX.Y_2.7/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
I: pybuild base:170: python3.4 setup.py clean
gdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
Traceback (most recent call last):
File "setup.py", line 51, in <module>
metadata = exec_file('udiskie/__init__.py')
File "setup.py", line 48, in exec_file
exec(f.read(), namespace, namespace)
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 307: ordinal not in range(128)
E: pybuild pybuild:256: clean: plugin distutils failed with: exit code=1: python3.4 setup.py clean
dh_auto_clean: pybuild --clean -i python{version} -p 3.4 --dir . returned exit code 13
debian/rules:9: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 13
make[1]: Leaving directory '/build/buildd/python-udiskie-1.2.0'
debian/rules:6: recipe for target 'clean' failed
So this is fun. The window always pops on the left monitor, but my right monitor is the primary. The window size is determined by the screen where the pointer currently is, but my right monitor is 1080p versus 1440x900 for the left one, so the size gets proportioned and the buttons and input overlap. I think just popping up on the screen with the mouse (or keyboard focus; not sure which) would be better.
As explained on unix.stackexchange.com, I'd like unused mount points to be automatically deleted. Scenario:
User plugs in pen drive. On Ubuntu 14.04, it gets mounted to: /media/user/MYDRIVE
On Arch with a udisks2
/udiskie
standard installation, and with mounting to /media/
enabled, the pen drive gets mounted to: /media/MYDRIVE
User removes pen drive. On Ubuntu, the mount point gets removed, I believe by gvfs-udisks2-volume-monitor
. On Arch, the directory remains.
User plugs in pen drive again. On Ubuntu, it gets mounted again to /media/user/MYDRIVE
.
On Arch a new mount point is used (name could be slightly off - have to check):
/media/user/MYDRIVE2
I get the following error in two situations:
GDBus.Error:org.freedesktop.UDisks.Error.PermissionDenied: Authentication is required
I started udiskie with this command:
udiskie -a -2
It successfully mounts a inserted USB-Stick. When I try to unmount it using
udiskie-umount /media/<id>
I get the error I posted above.
I also get this error message if I launch udiskie using this systemd user-service file:
[Unit]
Description=Udiskie service
[Service]
ExecStart=/usr/bin/udiskie -2 -a
[Install]
WantedBy=default.target
Because both error messages are the same I reckon they have the same reason. The permissions have been set with polkit:
polkit.addRule(function(action, subject) {
var YES = polkit.Result.YES;
var permission = {
"org.freedesktop.udisks2.filesystem-mount": YES
"org.freedesktop.udisks2.filesystem-mount-system": YES
"org.freedesktop.udisks2.encrypted-unlock": YES
"org.freedesktop.udisks2.eject-media": YES
"org.freedesktop.udisks2.power-off-drive": YES
};
if (subject.isInGroup("storage")) {
return permission[action.id];
}
});
I hope you can tell me what I am doing wrong or whether this is an issue with udiskie.
The command line help should provide information about the usage of the configuration file. One possibility to improve the usefulness of --help
very easily is to use docopt to parse the command line instead of the legacy optparse.
A while back, I created zsh autocompletion files for the CLI utilities. Some of that is copied from my /usr/share/zsh/functions/Completion/Unix/_mount
. So, I am not 100% sure that I can just add this to this repository. I believe there should be no problem, but better be sure.
Hi,
Again, I have been reading the documentation and I don't think udiskie supports that, so apologies if it does.
I am using gnome-keyring to manage my passwords. I suppose others are using different programs.
It would be nice to be able to set udiskie to get the password for unlocking a LUKS encrypted disk from the standard output of another program. Basically, invoking:
%s <uuid of the device>
Where %s would be replaced with a user string (in my case, I would use "gnome-keyring-query get ").
This way, people could automatically extract their passwords from the keyring.
Cheers
Thorough unit tests for all features as well as integration tests should be added. The dbusmock module could be an interesting option, although it's API is somewhat quirky (relies on eval
uating strings).
coldfix, with this week's update in portage, I seem to have lost all notifications. However, udiskie does seem to mount/unmount properly, so no actual functionality is lost. I notice the dependency on notify-python is gone now, but I doubt that is the culprit here, because adding it with the new version does not change things. However, downgrading to 0.6.4 pulls in notify-python, and solves the issue.
I am running xmonad with trayer, and it has worked perfectly through several versions of udiskie, so the problem is related to the upgrade.
I've read the new documentation and tried passing -n as well. I notice that the notification daemon is 'optional'. What should I be using (libnotify is installed ATM), and does it require configuration? Nothing has been necessary in the past.
This is the bug I have filed in gentoo's bugzilla, but I don't know if it is an actual ebuild bug because of a forgotten dependency or just some new configuration that I have not done: https://bugs.gentoo.org/show_bug.cgi?id=519026
As said, the copyright file says
2010 Byron Clark.
Can you please update it?
thanks!
Hi there,
Thanks for udiskie, very nice tool!
I have a question regarding the man (--help) page:
-t, --tray show tray icon
-T, --auto-tray show tray icon
What is the exact difference between the two? Can the help page be more explicit on this?
Thanks!
There are two aspects
mount_points
and device_id
respectivelyIs there any way I can use udiskie as python library? Is there any documentation regarding this?
Should be fairly easy to implement. Assuming pygobject is installed anyway (which is a must-be for the daemon!), this allows to remove one additional dependency on zenity.
Updating python-setuptools to version 1:18.7-1 breaks my version of udiskie on Arch Linux.
Traceback looks like this:
I have an USB stick with two partitions on it. The first one is regular NTFS
partition, the other one is LUKS-encrypted f2fs partition for my sensitive data.
When mounting with udiskie, the first partition is mounted as expected, but the
encrypted one is not. When I try to mount it manually (with udiskie-mount
), I
get the following:
$ udiskie-mount /dev/sdb2 TODO: 11 tasks, 4 H
not unlocking /org/freedesktop/UDisks2/block_devices/sdb2: unhandled device
Udiskie is configured to use Udisks2 per default.
Is there something I overloked, or did I find an issue?
Thanks in advance for any help.
I want to mount my external HDD formatted in btrfs with these options: rw, nosuid, nodev, noatime, compress=lzo, space_cache, autodefrag
With this entry in /etc/fstab
, it works fine.
/dev/disk/by-uuid/d40cbab5-85a1-43de-96ce-06dbfe2fa70b /run/media/USER/external_hdd btrfs rw,nosuid,nodev,noatime,compress=lzo,space_cache,autodefrag 0 0
Result from /etc/mtab
/dev/sdb1 /run/media/USER/external_hdd btrfs rw,nosuid,nodev,noatime,compress=lzo,space_cache,autodefrag 0 0
But, when I tries to use udiskie to mount it with the same options from config file, it doesn't seem to work properly
~ udiskie -c "$HOME/.config/udiskie/config.yml"
failed to mount /org/freedesktop/UDisks2/block_devices/sdb1: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount option `compress=lzo' is not allowed
Instead, it's mounted with (perhaps) default options.
Result from /etc/mtab
/dev/sdb1 /run/media/USER/external_hdd btrfs rw,nosuid,nodev,relatime,space_cache 0 0
My config file in $HOME/.config/udiskie/config.yml
udisks_version: 2
tray: false
automount: false
notify: true
mount_options:
- id_uuid: d40cbab5-85a1-43de-96ce-06dbfe2fa70b
options: [rw, nosuid, nodev, noatime, compress=lzo, space_cache, autodefrag]
Am I missing something?
device is mounted success, but is there any way to disable this warning?
[lsm@em ~]$ udiskie-mount -2 -a
** (udiskie-mount:1035): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
mounted /org/freedesktop/UDisks2/block_devices/sdc on /run/media/lsm/Arch
[lsm@em ~]$
I try to add an ignore rule to cli.py, but no effect:
[lsm@em ~]$ grep warning /usr/lib/python3.4/site-packages/udiskie/cli.py
import warnings
warnings.filterwarnings("ignore", ".*could not open display.*", Warning)
warnings.filterwarnings("ignore", ".*g_object_unref.*", Warning)
warnings.filterwarnings("ignore", ".*register with accessibility bus.*", Warning)
log.warning(_('Failed to connect Udisks2 dbus service..\n'
[lsm@em ~]$
nice to have
It'd be nice to have a device automatically unlocked via a keyring associated with the process. Basically, put the passphrase in the kernel (with an optional timeout) when unlocking a device and try it first.
See keyutils(7)
and keyrings(7)
.
Trying to start udiskie I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/udiskie", line 9, in <module>
load_entry_point('udiskie==1.0.0', 'console_scripts', 'udiskie')()
File "/usr/local/lib/python2.7/dist-packages/udiskie/cli.py", line 204, in main
return cls(argv).run()
File "/usr/local/lib/python2.7/dist-packages/udiskie/cli.py", line 178, in __init__
self._init(config, options)
File "/usr/local/lib/python2.7/dist-packages/udiskie/cli.py", line 307, in _init
daemon = get_backend('Daemon', options['udisks_version'])
File "/usr/local/lib/python2.7/dist-packages/udiskie/cli.py", line 52, in get_backend
msg = sys.exc_info()[1].get_dbus_message()
AttributeError: 'GError' object has no attribute 'get_dbus_message'
Do I use an incompatible version of some library ? I'm not sure where to look right now.
The config file makes it possible to give defaults for program options. Unfortunately, for some options, there is currently no way to negate the config file setting on the command line (there is no --no-suppress or --automount for example).
(udiskie:549): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
I'm not really sure how to debug this. I use archlinux.
Coppied over from the old bitbucket
I am actually going to start working on this... at some point... if I ever have time again...
It would be really awesome if there were a place to define where certain drives got mounted. like is someone wanted them always mounted in $XDG_RUNTIME_DIR/mounts it could be defined in $XDG_CONFIG_HOME/udiskie/config
or if there was a way to say this uuid if it shows up please mount it to $HOME/patriotflashdrive for me, then the default for everyone else or something similar.
Thanks
When running udiskie without installed libnotify and leaving default options for the daemon in place, the daemon's setup fails when it tries to load nonexistent gi.repository.Notify
.
Preliminary discussion on this topic in PR #77.
external harddrive, luks-encrypted
-> udev-rule to call cryptsetup with a keyfile to open the harddrive automatically
With udisks1 as a backend, udiskie then mounts the devicemapper that appears as a consequence of the udev-rule doing its work. The device itself (containing the LUKS-volume) gets correctly recognized as not-to-be-handled.
However, when using udisks2 as a backend, udiskie ignores the upcoming devicemapper and asks for a password to unlock the harddrive (although it is already unlocked, the devicemapper is existing already, according to udiskie's debug-output below).
This behavior can be observed in version 1.2 with udisks2 as a default but in version 1.1.3 as well by explicitly using udisks2 as a backend. (earlier versions not tested, can be done if helpful).
Output generated by a running udiskie when plugging in a harddrive of the sort in question.
(udiskie command used: udiskie -v -t -n -a [-(1|2)]
)
DEBUG [2015-07-29 02:07:57,200] udiskie.config: IgnoreDevice(match={'is_external': False}, value=True) used for /org/freedesktop/UDisks/devices/dm_2d1
DEBUG [2015-07-29 02:07:57,359] udiskie.config: IgnoreDevice(match={'is_external': False}, value=True) used for /org/freedesktop/UDisks/devices/dm_2d1
DEBUG [2015-07-29 02:07:57,359] udiskie.mount: mounting /org/freedesktop/UDisks/devices/dm_2d1 with {'fstype': 'ext4', 'options': None}
INFO [2015-07-29 02:07:57,514] udiskie.mount: mounted /org/freedesktop/UDisks/devices/dm_2d1 on /media/Epsilon
INFO [2015-07-29 02:07:57,551] udiskie.mount: not unlocking /org/freedesktop/UDisks/devices/sde: already unlocked
DEBUG [2015-07-29 02:00:51,724] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/block_devices/dm_2d1
DEBUG [2015-07-29 02:00:51,729] udiskie.config: IgnoreDevice(match={'is_external': False}, value=True) used for /org/freedesktop/UDisks2/block_devices/dm_2d1
DEBUG [2015-07-29 02:00:51,732] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/drives/WDC_WD30EURS_73TLHY0_WD_WMC4N0270075
DEBUG [2015-07-29 02:00:51,732] udiskie.config: IgnoreDevice(match={'is_block': False}, value=True) used for /org/freedesktop/UDisks2/drives/WDC_WD30EURS_73TLHY0_WD_WMC4N0270075
DEBUG [2015-07-29 02:00:51,741] udiskie.udisks2: +++ device_added: /org/freedesktop/UDisks2/block_devices/sde
Hi again,
I'm having an issue where udiskie crashes when trying to use config.yml (I'm using the default config) which gives a traceback:
Traceback (most recent call last):
File "/usr/bin/udiskie", line 9, in <module>
load_entry_point('udiskie==1.3.2', 'console_scripts', 'udiskie')()
File "/usr/lib/python3.5/site-packages/udiskie/cli.py", line 214, in main
return cls(argv).run()
File "/usr/lib/python3.5/site-packages/udiskie/cli.py", line 180, in __init__
config = udiskie.config.Config.from_file(config_file)
File "/usr/lib/python3.5/site-packages/udiskie/config.py", line 197, in from_file
return cls.from_file(path)
File "/usr/lib/python3.5/site-packages/udiskie/config.py", line 215, in from_file
return cls(load(f))
File "/usr/lib/python3.5/site-packages/yaml/__init__.py", line 94, in safe_load
return load(stream, SafeLoader)
File "/usr/lib/python3.5/site-packages/yaml/__init__.py", line 72, in load
return loader.get_single_data()
File "/usr/lib/python3.5/site-packages/yaml/constructor.py", line 35, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
File "/usr/lib/python3.5/site-packages/yaml/composer.py", line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
File "/usr/lib/python3.5/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3.5/site-packages/yaml/parser.py", line 393, in parse_block_sequence_entry
"expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block collection
in "/home/frank604/.config/udiskie/config.yml", line 8, column 5
expected <block end>, but found '?'
in "/home/frank604/.config/udiskie/config.yml", line 9, column 5
Below is my basic config.yml
1 program_options:
2 udisks_version: 2
3 tray: false
4 automount: true
5 notify: true
6 file_manager: xdg-open
7 mount_options:
8 - id_type: exfat
9 options: [noatime, flush]
udiskie works fine when not using the config.yml as well as when I only have lines 1-6 in config.yml. Thank you for your time.
There is a uefi partition on my usb disk /dev/sdb and There is also partition on /dev/sdb1 and files inside.
So udiskie mounting /dev/sdb but its not mounting /dev/sdb1 and gives following errors :
mounted /org/freedesktop/UDisks/devices/sdb on /media/Ubuntu 14.04 LTS amd64
failed to mount /org/freedesktop/UDisks/devices/sdb1: GDBus.Error:org.freedesktop.UDisks.Error.Failed: Error mounting: mount exited with exit code 1: helper failed with:
mount: /dev/sdb1 is already mounted or /media/usb0 busy
operation failed for device: /org/freedesktop/UDisks/devices/sdb1
On one of my computers I have a LVM volume joining an internal volume with an USB one (I know it may sound weird, but I needed some extra space and I had an spare USB disk). The thing is that I do not want udiskie to handle /dev/sdb at all. So I put this on my config file:
ignore_device:
device_file: /dev/sdb
But it fails:
Traceback (most recent call last):
File "/usr/bin/udiskie", line 9, in <module>
load_entry_point('udiskie==1.1.1', 'console_scripts', 'udiskie')()
File "/usr/lib/python3.4/site-packages/udiskie/cli.py", line 204, in main
return cls(argv).run()
File "/usr/lib/python3.4/site-packages/udiskie/cli.py", line 178, in __init__
self._init(config, options)
File "/usr/lib/python3.4/site-packages/udiskie/cli.py", line 311, in _init
ignore_device=config.ignore_device,
File "/usr/lib/python3.4/site-packages/udiskie/config.py", line 225, in ignore_device
return FilterMatcher(map(IgnoreDevice, config_list), False)
File "/usr/lib/python3.4/site-packages/udiskie/config.py", line 139, in __init__
self._filters = list(filters)
File "/usr/lib/python3.4/site-packages/udiskie/config.py", line 124, in __init__
config_item = config_item.copy()
AttributeError: 'str' object has no attribute 'copy'
Regards
Hi,
Thanks for udiskie!
I'm reading the documentation, and I don't find a way to do what I want. Basically, I would like to trigger a script once a device has been mounted and unlocked.
My use case would be an rsync script, that would need to receive the path of the mounted device as an argument. Is there a way to do that with udiskie?
I am flexible about the way this happens. I could rewrite my script such that it listens to dbus, or something like that.
When a device is mounted, the notifcation contains an action that opens the file manager.
When a device appears, the notifcation does not contain an action. It would be really helpful if the notication contained an action that mounts the just appeared device.
If there are multiple partitions on that device, there could be multiple actions, or just mount all of them.
The feature will be removed in a future version.
Personally, I don't like menus without images, so not sure yet what to do about this.
Hi again, this isn't a real issue, but I would like to understand more why the buildd reports a try to connect to X and dbus during the build
I: pybuild base:170: python2.7 setup.py clean
gdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
running clean
are them really required?
Another issue I'm wondering is this one:
WARNING:root:[Errno 2] No such file or directory: 'gtk-update-icon-cache'
it seems to be failing only for python3
thanks!
It seems as if udiskie v1.0.2 is not automounting anymore.
Using arch with latest stuff.
However I can mount with: "udiskie-mount -a"
prompt >> udiskie -s
/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py:50: RuntimeWarning: You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0
warnings.warn(warn_msg, RuntimeWarning)
not mounting /org/freedesktop/UDisks/devices/sdb1: already mounted
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/udiskie/tray.py", line 400, in _left_click_event
m.popup(parent_menu_shell=None,
AttributeError: 'Menu' object has no attribute 'popup'
environment: i3wm on Arch Linux
Is there anything I can do to fix this? Thanks in advance.
I'd like my USB key to autolock after a timeout of no activity (though I don't know how "activity" is to be determined). This may be a UDisks2-level change instead.
Hi again, I recently spotted (with a Debian bug report) some missing runtime dependencies to the package.
Package: python-udiskie
Architecture: all
Depends: gettext,
gobject-introspection,
python-gi | python-gi-cairo,
python-notify,
python-pkg-resources,
udisks2,
${misc:Depends},
${python:Depends}
Package: python3-udiskie
Architecture: all
Depends: gettext,
gobject-introspection,
python-notify,
python3-gi | python3-gi-cairo,
python3-pkg-resources,
udisks2,
${misc:Depends},
${python3:Depends}
some of them (the python*:Depends) includes PyYAML and docopt, because they are listed in install_requires setup field.
I would like to know if they are really needed the above dependencies, and know if they can be added to the setup.py (at least maybe the gi, pkg-resources and the notify packages?)
thanks
Hi, I have recently built a chroot ISO and installed in a VM including udiskie in the install.
When I mount the Guest Additions (Virtual Box) There is the option to 'Browse' the folder.
However clicking this opens a terminal... does this use xdg-open to open, or does it look for a specific file manager, or use some other method to choose what program to open? I am currently using Rox, JWM and Ubuntu as the base system... It is built extremely minimally.
I have set Rox to handle inode/directory
i.e. I made a rox.desktop file and:
xdg-mime default rox.desktop inode/directory
Thanks for your help...
I will also try installing this to some metal and see what happens :)
Hello,
when I try to test new udiskie features directly from the github master branch, I don't really want to "sudo python2 setup.py install". Is there any friendlier way to execute udiskie without actually installing? (I tried to install to another location, but still does not work).
Thanks
Hi,
I'm trying using udskie in ubuntu 14.04 but no icon shows up on systray. I followed the installation guide here https://github.com/coldfix/udiskie/wiki/Ubuntu-Debian-installation-guide
hi guys,
udiskie config problem here.
When automount with "udiskie -2" the tool use as default mount point: /var/run/media/...
I want to change mount point but I can't find any documentation about that.
Does anybody can help me ?
config:
$ cat .config/udiskie/config.yml
program_options:
udisks_version: 2
tray: auto
notify: true
file_manager: xdg-open
Can you link to the wiki page I made on the homepage. This will make it much easier for low-resource computer users (like myself) to install this.
Hi,
I was wondering how complicated would it be changing the status icon from the current CDROM to a USB PENDRIVE. Nowadays, CDROM are not much used, as opposed to USB drives (HDDs, PENDRIVES...). Would it be possible to change the default icon?
Another option would be making it change depending on the kind of device attached. For instance, HDD, PENDRIVE, CDROM.
Regards
I'm working for dm-crypt (luks) encrypted external devices and use them with keyfiles, too. Would be great if it were possible to advice udiskie to use a keyfile instead of the password prompt.
Currently, the daemon uses synchronous operations. This makes the UI unresponsive when a long running task is going on. This might be improvable by resorting to asynchronous operations.
The following functions are affected:
get_password_XXX()
udiskie.mount.Mounter.XXX
methodsFixes:
Worker thread
At first sight, this looks easy to do. But the doubts follow just as fast:
queue
function, since it might be called from either main or worker threaduse async variants of dbus functions and non-modal dialog.
This looks like it might require a lot more code-changes, especially since we want to support both async/sync variants, but is probably the correct way to go. It might actually be implementable with not too many code changes using decorators.
See also: Why you shouldn't block on D-Bus calls
I just noticed that the automount hint appears to be set to false by udisks for LUKS devices. This means that they won't be automounted or even shown in the tray menu by udiskie. Therefore, the naive rule {'should_automount': False, 'ignore': True}
is not a viable default. I disabled the rule and uploaded a bug-fix release for now.
It might be possible to add a replacement rule like
- {'should_automount': False,
'is_luks_cleartext': False,
'ignore': True}
after some more careful testing.
@mathstuf Sorry for this inconvenience. If you need this rule, you can put it in your config file for now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.