[SOLVED] hal, udev, udisks, pcmanfm, policy kit, automount confusion

Hello all,
I'm having a problem getting pcmanfm to recognise my external HD in the left panel, although it can be mounted manually. Upon searching this forum and the wiki to find a solution all I have managed to do is confuse myself.
Any help is appreciated.
Last edited by guriinii (2010-09-26 00:53:53)

The pcmanfm in Arch currently uses gvfs/gnome-disk-utility for mounting. I'd suggest either install pcmanfm-0.5.2 which uses HAL directly, or a git version of pcmanfm which uses udisks directly. In either case though, you'll need ck-launch-session.

Similar Messages

  • [Solved][Hal and Partitions] Newbie problem with hal policy

    Hello everybody,
    As a new user of archlinux for less than a week I have experienced a great distribution after having been for 1 year on Linux.
    After installation I was able to solve most of my problems with the wiki and the forums but there is one problem I cannot resolve.
    I have installed Kde 4.2 on my computer and I can mount Usb drives, or CDs with hal (It is in the daemons section of my rc.conf) but strangely I cannot access my other partitions such as my Ubuntu partition (ext3), or the family's Windows partition (Nfts). I have installed nfts-3g for the nfts partition hal refuses to let me access it, I will give you what Dolphin says when I try to access the Nfts:
    org.freedesktop.Hal.Device.PermissionDeniedByPolicy: hal-storage-mount-fixed-extra-options no <-- (actions,result)
    And for the ext3
    org.freedesktop.Hal.Device.PermissionDeniedByPolicy: hal-storage-mount-fixedauth_admin_keep_always <-- (actions,result)
    I don't really understand what It means but normally I am allowed to mount partitions.
    My /etc/PolycyKit/PolicyKit.conf: http://pastebin.com/m57e94025
    And my /etc/dbus-1/system.d/hal.conf: http://pastebin.com/m62861179
    I've already tried to configure these two with the wiki and the forums but nothing yet.
    If you need more information ask me.
    Thanks in advance.
    Last edited by auratux (2009-02-23 21:24:29)

    You might want to reread the Hal wiki re: Permission Denied with automounter.  Your /etc/PolicyKit/PolicyKit.conf seems to be missing the lines mentioned in the wiki.
    Edit: Or maybe it is similair to: http://bbs.archlinux.org/viewtopic.php?id=66008
    Last edited by bgc1954 (2009-02-22 14:07:10)

  • [SOLVED] Neither console, nor policy kits seem to run

    I have installed a couple of hours ago compiz standalone, removed any display managers I had before from inittab and now I run it through .xinitrc.
    But neither console nor policy kits seem to run or grant privileges to normal users for mounting usb devices or just shutdown, syspend etc.
    My .xinitrc:
    #!/bin/sh
    # ~/.xinitrc
    # Executed by startx (run your window manager from here)
    # exec gnome-session
    # exec startkde
    # exec ck-launch-session wm
    # exec enlightenment_start
    # exec startxfce4
    exec ck-launch-session dbus-launch --sh-syntax --exit-with-session $HOME/.xstart
    My .xstart:
    #!/bin/sh
    compiz ccp &
    tint2 &
    fbxkb &
    trayfreq &
    volti &
    blueman-applet &
    wicd-gtk &
    parcellite &
    fusion-icon -n
    My inittab (i reverted back to agetty and see if it works but not):
    # /etc/inittab
    # Runlevels:
    # 0 Halt
    # 1(S) Single-user
    # 2 Not used
    # 3 Multi-user
    # 4 Not used
    # 5 X11
    # 6 Reboot
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    #id:3:initdefault:
    # Boot to X11
    id:5:initdefault:
    rc::sysinit:/etc/rc.sysinit
    rs:S1:wait:/etc/rc.single
    rm:2345:wait:/etc/rc.multi
    rh:06:wait:/etc/rc.shutdown
    su:S:wait:/sbin/sulogin -p
    # -8 options fixes umlauts problem on login
    c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
    c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
    c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
    c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
    #c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
    #c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux
    #c1:2345:respawn:/sbin/fgetty tty1 linux
    #c2:2345:respawn:/sbin/fgetty tty2 linux
    #c3:2345:respawn:/sbin/fgetty tty3 linux
    #c4:2345:respawn:/sbin/fgetty tty4 linux
    # Hypervisor Virtual Console for Xen and KVM
    #h0:2345:respawn:/sbin/agetty -8 38400 hvc0 linux
    ca::ctrlaltdel:/sbin/shutdown -t3 -r now
    # Example lines for starting a login manager
    #x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    #x:5:respawn:/usr/bin/kdm -nodaemon
    #x:5:respawn:/usr/sbin/elsa --nodaemon
    #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
    #x:5:respawn:/usr/sbin/lxdm >& /dev/null
    x:5:once:/bin/su - -- twilight -l -c '/usr/bin/startx -- -nolisten tcp -br -deferglyphs 16 </dev/null >/dev/null 2>&1'
    # End of file
    ck-list-sessions:
    Session1:
    unix-user = '1000'
    realname = 'Tasos'
    seat = 'Seat2'
    session-type = ''
    active = FALSE
    x11-display = ':0'
    x11-display-device = '/dev/tty5'
    display-device = ''
    remote-host-name = ''
    is-local = FALSE
    on-since = '2011-09-30T20:02:05.547676Z'
    login-session-id = ''
    No relevant errors found in .xsession-errors:
    (lxpanel:11415): Gtk-WARNING **: Unable to locate theme engine in module_path: "thinice",
    (pcmanfm:11416): Gtk-WARNING **: Unable to locate theme engine in module_path: "thinice",
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20 (X_GetProperty)
    Resource id: 0xa000a4
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20 (X_GetProperty)
    Resource id: 0xa000a4
    QSystemTrayIcon::setVisible: No Icon set
    kdeinit4: Shutting down running client.
    Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    kbuildsycoca4 running...
    kbuildsycoca4(11472) KBuildSycoca::checkTimestamps: checking file timestamps
    kbuildsycoca4(11472) KBuildSycoca::checkTimestamps: timestamps check ok
    kbuildsycoca4(11472) kdemain: Emitting notifyDatabaseChanged ()
    yakuake(11440)/kdecore (KLibrary) findLibraryInternal: plugins should not have a 'lib' prefix: "libkonsolepart.so"
    QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.14'
    yakuake(11440) KGlobalAccelPrivate::_k_serviceOwnerChanged: detected kglobalaccel restarting, re-registering all shortcut keys
    (<unknown>:11498): Gtk-WARNING **: Unable to locate tkded4: Fatal IO error: client killed
    kglobalaccel: Fatal IO error: client killed
    e to locate theme engine in module_path: "thinice",
    (lxterminal:13327): Gtk-WARNING **: Unable to locate theme engine in module_path: "thinice",
    (lxsession-logout:13435): Gtk-WARNINGkded4: Fatal IO error: client killed
    kglobalaccel: Fatal IO error: client killed
    error: client killed
    klauncher: Exiting on signal 15
    kded4: Fatal IO error: client killed
    kdeinit4: Fatal IO error: client killed
    kglobalaccel: Fatal IO error: client killed
    Last edited by twilight0 (2011-11-15 10:16:07)

    Never mind it didnt notice the warning here:
    wiki wrote:Warning: This method will not use /bin/login or register your session, therefore no session will appear in `who` or `w`. Your session will also not be authorized as 'local' by ConsoleKit, so you will be unable to shutdown/suspend/reboot or mount drives without using sudo or su.
    But is there a way after all to run console kit even if the session isn't registered as local?
    Last edited by twilight0 (2011-09-30 21:12:09)

  • Why do i need udev+udisks+udisks2+gvfs installed to dynamic mount?

    hi there,
    yes, i have used the search function on that, but still have unanswered questions.
    1.
    why do i need udev+udisks+udisks2+gvfs installed to dynamically mount internal (ntfs, ext4) partitions ?
    If one these packages is missing, mounting an internal drive with "pcmanfm" is not possible.
    I know how to static mount these drives via "fstab", but i want to mount them when i need the access.
    2.
    why are my removable devices not automatically mounted in "pcmanfm" when plugged in?
    I have another OS (Lubuntu) running and this automatically recognizes when a cd is inserted or a usb stick is plugged in.
    I have tried to install the package "gvfs-afc" and rebooted, still no usb stick to see. But when i enter:
    sudo blkid -c /dev/null
    The usb stick is listed as "sdb1"
    I am using 64bit arch linux 3.9.3-1 with openbox+lxde.

    jasonwryan wrote:
    You don't. You need udev for a whole lot of other stuff, so leave that aside. To automount removable media, you can just use udisks and a helper like ud{iskie,evil}.
    For an ntfs partition, you will also need that driver.
    Comparing it with the Lubuntu; I am sure there is a lot more cruft preinstalled that makes this happen. In Arch, you just install what you need.
    The udev page has the details.
    so i have uninstalled the gvfs+udisks2 packages, rebooted and installed udevil-git and rebooted again.
    No partition is shown in the filemanager now. I really dont get it. The udev wiki says udev needs rules but my "/etc/udev/rules.d" folder is empty.
    The udisks wiki says that udisks and udisks2 are incompatible and that only one is needed and that udisks2 should be installed for gnome systems and udisks for xfce, but i have lxde installed. So it is not working with udisks and lxde (pcmanfm), when i try to install udisks2 additionally, it also does not work. Uninstalling udisks is also not possible because of the dependancy to libfm and so on...
    Here is my /etc/udevil/udevil-user-harry.conf:
    # udevil configuration file /etc/udevil/udevil.conf
    # This file controls what devices, networks, and files users may mount and
    # unmount via udevil (set suid).
    # IMPORTANT: IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE
    # IS MISCONFIGURED - EDIT WITH CARE
    # Note: For greater control for specific users, including root, copy this
    # file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the
    # desired username (eg /etc/udevil/udevil-user-jim.conf).
    # Format:
    # OPTION = VALUE[, VALUE, ...]
    # DO NOT USE QUOTES except literally
    # Lines beginning with # are ignored
    # To log all uses of udevil, set log_file to a file path:
    #log_file = /var/log/udevil.log
    # Approximate number of days to retain log entries (0=forever, max=60):
    log_keep_days = 10
    # allowed_types determines what fstypes can be passed by a user to the u/mount
    # program, what device filesystems may be un/mounted implicitly, and what
    # network filesystems may be un/mounted.
    # It may also include the 'file' keyword, indicating that the user is allowed
    # to mount files (eg an ISO file). The $KNOWN_FILESYSTEMS variable may
    # be included to include common local filesystems as well as those listed in
    # /etc/filesystems and /proc/filesystems.
    # allowed_types_USERNAME, if present, is used to override allowed_types for
    # the specific user 'USERNAME'. For example, to allow user 'jim' to mount
    # only vfat filesystems, add:
    # allowed_types_jim = vfat
    # Setting allowed_types = * does NOT allow all types, as this is a security
    # risk, but does allow all recognized types.
    # allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs
    allowed_types = $KNOWN_FILESYSTEMS, file, ntfs, vfat
    # allowed_users is a list of users permitted to mount and unmount with udevil.
    # Wildcards (* or ?) may be used in the usernames. To allow all users,
    # specify "allowed_users=*". UIDs may be included using the form UID=1000.
    # For example: allowed_users = carl, UID=1000, pre*
    # Also note that permission to execute udevil may be limited to users belonging
    # to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
    # depending on installation.
    # allowed_users_FSTYPE, if present, is used to override allowed_users when
    # mounting or unmounting a specific fstype (eg nfs, ext3, file).
    # Note that when mounting a file, fstype will always be 'file' regardless of
    # the internal fstype of the file.
    # For example, to allow only user 'bob' to mount nfs shares, add:
    # allowed_users_nfs = bob
    # The root user is NOT automatically allowed to use udevil in some cases unless
    # listed here (except for unmounting anything or mounting fstab devices).
    allowed_users = harry, root
    # allowed_groups is a list of groups permitted to mount and unmount with
    # udevil. The user MUST belong to at least one of these groups. Wildcards
    # or GIDs may NOT be used in group names, but a single * may be used to allow
    # all groups.
    # Also note that permission to execute udevil may be limited to users belonging
    # to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
    # depending on installation.
    # allowed_groups_FSTYPE, if present, is used to override allowed_groups when
    # mounting or unmounting a specific fstype (eg nfs, ext3, file). For example,
    # to allow only members of the 'network' group to mount smb and nfs shares,
    # use both of these lines:
    # allowed_groups_smbfs = network
    # allowed_groups_nfs = network
    # The root user is NOT automatically allowed to use udevil in some cases unless
    # listed here (except for unmounting anything or mounting fstab devices).
    allowed_groups = storage
    # allowed_media_dirs specifies the media directories in which user mount points
    # may be located. The first directory which exists and does not contain a
    # wildcard will be used as the default media directory (normally /media or
    # /run/media/$USER).
    # The $USER variable, if included, will be replaced with the username of the
    # user running udevil. Wildcards may also be used in any directory EXCEPT the
    # default. Wildcards will not match a /
    # allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs
    # when mounting or unmounting a specific fstype (eg ext2, nfs). For example,
    # to cause /media/network to be used as the default media directory for
    # nfs and ftpfs mounts, use these two lines:
    # allowed_media_dirs_nfs = /media/network, /media, /run/media/$USER
    # allowed_media_dirs_ftpfs = /media/network, /media, /run/media/$USER
    # NOTE: If you want only the user who mounted a device to have access to it
    # and be allowed to unmount it, specify /run/media/$USER as the first
    # allowed media directory.
    # IMPORTANT: If an allowed file is mounted to a media directory, the user may
    # be permitted to unmount its associated loop device even though internal.
    # INCLUDING /MNT HERE IS NOT RECOMMENDED. ALL ALLOWED MEDIA DIRECTORIES
    # SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.
    allowed_media_dirs = /media, /run/media/$USER
    # allowed_devices is the first criteria for what block devices users may mount
    # or unmount. If a device is not listed in allowed_devices, it cannot be
    # un/mounted (unless in fstab). However, even if a device is listed, other
    # factors may prevent its use. For example, access to system internal devices
    # will be denied to normal users even if they are included in allowed_devices.
    # allowed_devices_FSTYPE, if present, is used to override allowed_devices when
    # mounting or unmounting a specific fstype (eg ext3, ntfs). For example, to
    # prevent all block devices containing an ext4 filesystem from being
    # un/mounted use:
    # allowed_devices_ext4 =
    # Note: Wildcards may be used, but a wildcard will never match a /, except
    # for "allowed_devices=*" which allows any device. The recommended setting is
    # allowed_devices = /dev/*
    # WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
    # SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
    allowed_devices = /dev/*
    # allowed_internal_devices causes udevil to treat any listed block devices as
    # removable, thus allowing normal users to un/mount them (providing they are
    # also listed in allowed_devices).
    # allowed_internal_devices_FSTYPE, if present, is used to override
    # allowed_internal_devices when mounting or unmounting a specific fstype
    # (eg ext3, ntfs). For example, to allow block devices containing a vfat
    # filesystem to be un/mounted even if they are system internal devices, use:
    # allowed_internal_devices_vfat = /dev/sdb*
    # Some removable esata drives look like internal drives to udevil. To avoid
    # this problem, they can be treated as removable with this setting.
    # WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
    # allowed_internal_devices =
    # allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to
    # allowed_internal_devices, except that UUIDs are specified instead of devices.
    # For example, to allow un/mounting of an internal filesystem based on UUID:
    # allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0
    # WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
    # allowed_internal_uuids =
    # forbidden_devices is used to prevent block devices from being un/mounted
    # even if other settings would allow them (except devices in fstab).
    # forbidden_devices_FSTYPE, if present, is used to override
    # forbidden_devices when mounting or unmounting a specific fstype
    # (eg ext3, ntfs). For example, to prevent device /dev/sdd1 from being
    # mounted when it contains an ntfs filesystem, use:
    # forbidden_devices_ntfs = /dev/sdd1
    # NOTE: device node paths are canonicalized before being tested, so forbidding
    # a link to a device will have no effect.
    forbidden_devices =
    # allowed_networks determines what hosts may be un/mounted by udevil users when
    # using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs. Hosts may be specified
    # using a hostname (eg myserver.com) or IP address (192.168.1.100).
    # Wildcards may be used in hostnames and IP addresses, but CIDR notation
    # (192.168.1.0/16) is NOT supported. IP v6 is supported. For example:
    # allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com
    # Or, to prevent un/mounting of any network shares, set:
    # allowed_networks =
    # allowed_networks_FSTYPE, if present, is used to override allowed_networks
    # when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs,
    # curlftpfs). For example, to limit nfs and samba shares to only local
    # networks, use these two lines:
    # allowed_networks_nfs = 192.168.1.*, 10.0.0.*
    # allowed_networks_cifs = 192.168.1.*, 10.0.0.*
    allowed_networks = *
    # forbidden_networks and forbidden_networks_FSTYPE are used to specify networks
    # that are never allowed, even if other settings allow them (except fstab).
    # NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect
    # if the user uses that hostname. IP lookup is always performed, so forbidding
    # an IP address will also forbid all corresponding hostnames.
    forbidden_networks =
    # allowed_files is used to determine what files in what directories may be
    # un/mounted. A user must also have read permission on a file to mount it.
    # Note: Wildcards may be used, but a wildcard will never match a /, except
    # for "allowed_files=*" which allows any file. For example, to allow only
    # files in the /share directory to be mounted, use:
    # allowed_files = /share/*
    # NOTE: Specifying allowed_files_FSTYPE will NOT work because the fstype of
    # files is always 'file'.
    allowed_files = *
    # forbidden_files is used to specify files that are never allowed, even if
    # other settings allow them (except fstab). Specify a full path.
    # Note: Wildcards may be used, but a wildcard will never match a /, except
    # for "forbidden_files = *".
    # NOTE: file paths are canonicalized before being tested, so forbidding
    # a link to a file will have no effect.
    forbidden_files =
    # default_options specifies what options are always included when performing
    # a mount, in addition to any options the user may specify.
    # Note: When a device is present in /etc/fstab, and the user does not specify
    # a mount point, the device is mounted with normal user permissions using
    # the fstab entry, without these options.
    # default_options_FSTYPE, if present, is used to override default_options
    # when mounting a specific fstype (eg ext2, nfs).
    # The variables $USER, $UID, and $GID are changed to the user's username, UID,
    # and GID.
    # FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
    # WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
    default_options = nosuid, noexec, nodev, noatime
    default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
    # mount iso9660 with 'ro' to prevent mount read-only warning
    default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
    default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
    default_options_vfat = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID, utf8
    default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID
    default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID
    default_options_ntfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, utf8
    default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
    default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
    default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
    default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
    default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
    default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
    default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
    default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
    # allowed_options determines all options that a user may specify when mounting.
    # All the options used in default_options above must be included here too, or
    # they will be rejected. If the user attempts to use an option not included
    # here, an error will result. Wildcards may be used.
    # allowed_options_FSTYPE, if present, is used to override allowed_options
    # when mounting a specific fstype (eg ext2, nfs).
    # The variables $USER, $UID, and $GID are changed to the user's username, UID,
    # and GID.
    # If you want to forbid remounts, remove 'remount' from here.
    # WARNING: OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY
    allowed_options = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount
    allowed_options_nfs = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=*
    allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
    allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
    allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*
    allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*
    allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID
    # mount_point_mode, if present and set to a non-empty value, will cause udevil
    # to set the mode (permissions) on the moint point after mounting If not
    # specified or if left empty, the mode is not changed. Mode must be octal
    # starting with a zero (0755).
    # mount_point_mode_FSTYPE, if present, is used to override mount_point_mode
    # when mounting a specific fstype (eg ext2, nfs).
    # NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES
    mount_point_mode = 0755
    # don't set a mode for some types:
    mount_point_mode_sshfs =
    mount_point_mode_curlftpfs =
    mount_point_mode_ftpfs =
    # Use the settings below to change the default locations of programs used by
    # udevil, or (advanced topic) to redirect commands to your scripts.
    # When substituting scripts, make sure they are root-owned and accept the
    # options used by udevil (for example, the mount_program must accept --fake,
    # -o, -v, and other options valid to mount.)
    # Be sure to specify the full path and include NO OPTIONS or other arguments.
    # These programs may also be specified as configure options when building
    # udevil.
    # THESE PROGRAMS ARE RUN AS ROOT
    # mount_program = /bin/mount
    # umount_program = /bin/umount
    # losetup_program = /sbin/losetup
    # setfacl_program = /usr/bin/setfacl
    # validate_exec specifies a program or script which provides additional
    # validation of a mount or unmount command, beyond the checks performed by
    # udevil. The program is run as a normal user (if root runs udevil,
    # validate_exec will NOT be run). The program is NOT run if the user is
    # mounting a device without root priviledges (a device in fstab).
    # The program is passed the username, a printable description of what is
    # happening, and the entire udevil command line as the first three arguments.
    # The program must return an exit status of 0 to allow the mount or unmount
    # to proceed. If it returns non-zero, the user will be denied permission.
    # For example, validate_exec might specify a script which notifies you
    # of the command being run, or performs additional steps to authenticate the
    # user.
    # Specify a full path to the program, with NO options or arguments.
    # validate_exec =
    # validate_rootexec works similarly to validate_exec, except that the program
    # is run as root. validate_rootexec will also be run if the root user runs
    # udevil. If both validate_exec and validate_rootexec are specified,
    # validate_rootexec will run first, followed by validate_exec.
    # The program must return an exit status of 0 to allow the mount or unmount
    # to proceed. If it returns non-zero, the user will be denied permission.
    # Unless you are familiar with writing root scripts, it is recommended that
    # rootexec settings NOT be used, as it is easy to inadvertently open exploits.
    # THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
    # validate_rootexec =
    # success_exec is run after a successful mount, remount, or unmount. The
    # program is run as a normal user (if root runs udevil, success_exec
    # will NOT be run).
    # The program is passed the username, a printable description of what action
    # was taken, and the entire udevil command line as the first three arguments.
    # The program's exit status is ignored.
    # For example, success_exec might run a script which informs you of what action
    # was taken, and might perform further actions.
    # Specify a full path to the program, with NO options or arguments.
    # success_exec =
    # success_rootexec works similarly to success_exec, except that the program is
    # run as root. success_rootexec will also be run if the root user runs udevil.
    # If both success_exec and success_rootexec are specified, success_rootexec
    # will run first, followed by success_exec.
    # Unless you are familiar with writing root scripts, it is recommended that
    # rootexec settings NOT be used, as it is easy to inadvertently open exploits.
    # THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
    # success_rootexec =
    I have no idea what to do next, the only way it works, is the combination i mentioned in the title of this post. Any suggestion to solve that problem?

  • [solved] hal won't mount volumes after update

    Every time I try to mount it, hal gives me an error:
    Rejected send message, 1 matched rules; type="method_call", sender=":1.12" (uid=1000 pid=3528 comm="pcmanfm) interface="org.freedesktop.Hal.Device.Volume" member="Mount" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3228 comm="/usr/sbin/hald))
    Followed by:
    Directory doesn't exist!
    I really don't know what the deal is, and google doesn't turn up much of anything.
    Edit: This is for all drives not mounted at boot, same error.
    Drives can be manually mounted with no problems.
    Edit: This happens regardless of file manager used.
    Solution: In my case I needed ck-launch-session added to my ~/.xinitrc for mounting to work. So, this:
    exec openbox-session
    Became this:
    exec ck-launch-session openbox-session
    If this doesn't work for you, following the instructions on the hal wiki page as seen in anonymous_user's post (#11) most likely will.
    Last edited by z.s.tar.gz (2009-11-12 12:32:57)

    skottish wrote:
    simongmzlj wrote:
    I had this problem to (running Xfce).
    I fixed it by removing policykit from my machine and restarting. The new version of hal drops policykit as a dependency. I don't know whats the reasoning behind this, as hal doesn't seem to support polkit integration (at least there is no compile flag for it). So policykit now seems to interfere with the new hal package.
    Edit: Spelling
    hal requires consolekit and polkit is required by it. How the disable consolekit integration bit works I don't understand.
    You can disable consolekit by editing the PKGBUILD:
    --disable-console-kit --disable-policy-kit --disable-acl-management
    EDIT: When building the package from scratch, it seems --enable-consolekit needs --enable-policykit, i might be wrong
    EDIT: I was wrong
    Last edited by simongmzlj (2009-11-11 04:48:26)

  • [SOLVED]My udev rules don't automount usb device

    Hi,
    I'm using this .rules file for automounting usb devices:
    # start at sdc to ignore the system hard drive
    KERNEL!="sd[c-z]*", GOTO="my_media_automount_end" #sda and sdb are internal hard drives
    ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
    # import some useful filesystem info as variables
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    # get the label if present, otherwise assign one based on device/partition
    ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
    ENV{ID_FS_LABEL}=="", ENV{dir_name}="%k"
    # create the dir in /media and symlink it to /mnt
    ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"
    # global mount options
    ACTION=="add", ENV{mount_options}="relatime"
    # filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
    ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=100,dmask=000,fmask=111,utf8"
    # automount ntfs filesystems using ntfs-3g driver
    ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
    # automount all other filesystems
    ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
    # clean up after device removal
    ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"
    # exit
    LABEL="my_media_automount_end"
    The folders in /media are created successfully but no mounting takes place. The folders are empty and when I do
    umount /media/device
    , it returns:
    umount: device/: not mounted
    But when I try to remove the folder, it sometimes returns:
    rmdir: failed to remove 'device/': Device or resource busy
    When I unplug the device, the folders are deleted successfully.
    When I manually mount the device with the code for ntfs from the rules-file, it works fine. I have also verified that the device is at /dev/sdc.
    Through searching I didn't find any post with a problem like that. My guess was that somehow this test fails:
    ACTION=="add", ENV{ID_FS_TYPE}=="ntfs"
    I already tried removing the second condition, but the result stays the same. So I am left rather clueless, I hope, you guys can help me
    Last edited by toffi-fee (2014-05-04 22:47:38)

    Thanks for the reply! So now I changed the rules to:
    KERNEL!="sd[c-z]*", GOTO="my_media_automount_end"
    ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
    # import some useful filesystem info as variables
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    ACTION=="add", RUN+="/bin/udisksctl mount -b /dev/%k"
    # clean up after device removal
    ACTION=="remove", RUN+="/bin/udisksctl unmount -b '/dev/%k'"
    # exit
    LABEL="my_media_automount_end"
    But now nothing seems to happen when I plug in, also no folder creation at /run/media/user/, hmmm..
    Last edited by toffi-fee (2014-05-04 19:27:53)

  • (SOLVED) hal and automounting

    Hallo. I am e newbie of Arch. Two months ago I installed Arch on pc without problem and with a very few customisation. I tryed to do the same with my laptop. Installation with the last set was found on web was ok, but now ... I am unable to see hotplugged usb pen drives, external usb disk, internal partition. I can mount them manually by fstab edit or just console, but I see them as folder  :-(
    What seems strange to me is that on Arch pc all is right, and I can see the drives in dolphin even if not mounted.
    Last edited by Yagi858 (2008-12-18 00:17:20)

    Really sorry ... The laptop is HP Pav dv2000 series, the PC is HP too. The desktop environment for both is KDE4 from extra repo. I made just a bit of manually setting ... rc.conf and lcd-font. It' s a really clean standard installation following the cd menu.
    OK. SOLVED !!!
    Removed and reinstalled udev. Strange that pacman -Suy didn't see the new version ...
    Last edited by Yagi858 (2008-12-18 00:16:46)

  • Trouble with automounting externals...tried autofs, hal, udev.

    I'm having trouble automounting external USB hard drives, can somebody give me some pointers for setting this up on a fresh install please?  I'd rather use udev and unmount everything from the terminal, but I can't do that until they actually, you know...mount.
    I can mount manually, but it gets tedious to do this for ~6 externals every time I boot.  Anyway, I'm trying to get udev to work, and I've used the wiki here, but even after a reboot, I'm getting nothing.  Any ideas?
    Last edited by 23450987643 (2010-07-19 00:02:09)

    > it gets tedious to do this for ~6 externals every time I boot.
    You can put it in a script or into .xinirtc.
    Last edited by karol (2010-07-19 00:10:08)

  • [PARTIALLY SOLVED] HAL fails to start

    ** UPDATE: PARTIALLY SOLVED - SEE BOTTOM OF THE FIRST POST
    HAL fails to start. I'm not exactly sure why this is, but I believe it has something to do with my attempts to get automounting working under gnome.
    [zen@intellitech ~]$ sudo /etc/rc.d/hal start
    :: Starting Hardware Abstraction Layer [FAIL]
    [zen@intellitech ~]$ vim /etc/rc.conf
    MODULES=(acpi-cpufreq cpufreq_ondemand e1000 iwl4965 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore thinkpad_acpi uinput vboxdrv)
    DAEMONS=(syslog-ng @network !net-profiles @net-auto @netfs !samba !crond @acpid @dbus @hal @alsa !daemoot !avahi-daemon @cups @ddclient @bluetooth)
    [zen@intellitech ~]$ pacman -Q | grep hal
    hal 0.5.11-1
    hal-info 0.20080508-1
    [zen@intellitech ~]$ /usr/sbin/hald --daemon=no --verbose=yes
    03:13:37.451 [i] hald.c:669: hal 0.5.11
    03:13:37.451 [i] hald.c:734: Will not daemonize
    03:13:37.451 [i] hald_dbus.c:5381: local server is listening at unix:abstract=/var/run/hald/dbus-pdtZvbqaVq,guid=312b47921cba4c5cdbee099a48ec87d1
    03:13:37.452 [E] ck-tracker.c:367: Error doing GetSeats on ConsoleKit: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
    03:13:37.452 [E] ck-tracker.c:792: Could not get seats and sessions
    03:13:37.452 [W] hald_dbus.c:5806: Could not initialize seats and sessions from ConsoleKit
    Runner started - allowed paths are '/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin'
    03:13:37.453 [i] hald_runner.c:301: Runner has pid 3675
    03:13:37.453 [i] hald_runner.c:182: runner connection is 0x15bdec0
    03:13:37.456 [W] osspec.c:373: Unable to open /proc/mdstat: No such file or directory
    03:13:37.457 [D] util_helper.c:124: drop_privileges: could not set group id
    [zen@intellitech ~]$ vim /etc/group
    root::0:root
    bin::1:root,bin,daemon
    daemon::2:root,bin,daemon
    sys::3:root,bin
    adm::4:root,daemon
    tty::5:root,zen
    disk::6:root,zen
    lp::7:daemon
    mem::8:
    kmem::9:
    wheel::10:root,zen
    ftp::11:
    mail::12:
    log::19:root
    smmsp::25:
    games::50:
    network:x:90:zen
    video:x:91:zen
    audio::92:root,zen
    optical::93:root,zen
    floppy:x:94:root,zen
    storage:x:95:root,zen
    power:x:98:root,zen
    nobody::99:
    users::100:zen
    locate:x:21:
    uucp:x:14:
    http:x:33:
    scanner:x:96:
    dbus:x:81:root,zen
    hal:x:82:root,zen
    avahi:x:84:root,zen
    camera:x:97:
    gdm:x:101:
    vboxusers:x:108:zen
    samba:x:109:zen,root
    * Yes, I know it is bad practice to have a normal user listed under the disk group. It is necessary, however, in order to have raw disk access for virtual box.
    [zen@intellitech ~]$ sudo /etc/rc.d/dbus stop
    :: Stopping D-BUS system messagebus [DONE]
    [zen@intellitech ~]$ sudo /etc/rc.d/hal start
    :: Starting D-BUS system messagebus [DONE]
    :: Starting Hardware Abstraction Layer [FAIL]
    It's odd, because D-BUS will start but hal will not... Anybody have any suggestions?
    * UPDATE (10/08/08): Did a full system upgrade and removed dbus from daemons array in rc.conf. UDEV EVENTS Processing speed seems to be back to normal.
    ** SOLUTION UPDATE: After removing custom ntfs-3g fdi policies from /etc/hal/fdi/policy/, hal seems to load without any problems. This seems to be a bug, since my policies were working at one point, and I believe a hal update caused the problem. I'll see if I can track down the exact hal version that it breaks on, and submit a respective bug report for it.
    ** OFF-TOPIC UPDATE: Using hwdetect --modules to get a modules list, and using these modules in rc.conf with MOD_AUTOLOAD turned off (and also in mkinitcpio.conf and running mkinitcpio -g <path>), seems to have dramatically increased my "Load udev events" processing time. After doing this, my udev speed went from almost 4000ms to literally < 500ms.
    Last edited by intellitech (2008-10-08 14:58:53)

    koch wrote:
    intellitech wrote:DAEMONS=(syslog-ng @network !net-profiles @net-auto @netfs !samba !crond @acpid @dbus @hal @alsa !daemoot !avahi-daemon @cups @ddclient @bluetooth)
    you have dbus starting before hal but hal starts debus by default so please try this...
    DAEMONS=(...@acpid @hal @alsa...)
    and delete debus from that line.
    Removed dbus from the daemons array and hal still won't start. Also, I noticed that the "Loading udev events" portion of the boot process seems to take a lot longer than it used to. Last boot, it took about 19130ms, whereas it used to take < 3000ms. Could these be related?
    Also, I ran a full system upgrade, both udev and hal were upgraded.
    [zen@intellitech ~]$ pacman -Q | grep hal
    hal 0.5.11-4
    hal-info 0.20080508-1
    [zen@intellitech ~]$ pacman -Q | grep udev
    klibc-udev 128-1
    udev 128-5

  • [***Solved***] Hal

    Cannot obtain lock on /media/.hal-mtab
    I tried today my camera docking station. It was working fine before and now I get this error. I tried my USB Stick and got the same error.
    any ideas for a work around or fix this problem?
    Last edited by JaDa (2007-08-08 00:20:42)

    The answer found in the Archlinux Wiki
    http://wiki.archlinux.org/index.php/HAL
    USB sticks and drives do not automount correctly
    If you are experiencing problems with automounting usb sticks and/or drives, but do not have problems with automounting CDs or DVDs, and if you are able to manually mount the USB device in question, then you should create the file "preferences.fdi" in the folder /etc/hal/fdi/policy and paste the following line into the file
    <merge key="volume.ignore" type="bool">false</merge>
    Problem solved. But I have no idea why it was happened and what was the problem. It was working fine before. Anyway, now it works and this is important

  • [SOLVED]Hal refuse to stop: FAIL. Using quick-init

    When i try to restart hal to see if my policy configuration file are ok (for automount), i have this issue:
    :: Stopping Hardware Abstraction Layer [FAIL]
    :: Starting Hardware Abstraction Layer [FAIL]
    i'm using kdemod 4 and quickinit-scripts... Is there a solution? i intend to not restart dbus, but ONLY hal..thanks
    Last edited by chesterfork (2009-07-14 18:23:49)

    obviously answer:yes i'm root.... ; on the logs there's no errors...hal works fine, apart automountig ntfs in kdemod (i have to click in dolphi to activate the device)....but when i change policy i have: or to restart dbus or reboot.....
    me too can't start to troubleshooting...i miss something....at the start no errors, no problems.....????!!!
    Last edited by chesterfork (2009-07-13 12:49:43)

  • Udvm: A simple udisks-based script that automounts drives

    I know this is not the best code in the world, but I thought someone else might want it.
    udvm automounts drives using udisks for people like me who like thunar but want to get rid of HAL.
    Run it as a user.
    #!/bin/bash
    # UDisks log
    ulog=$(mktemp -u /tmp/udvm.fifo.XXXXXX)
    mkfifo "${ulog}"
    trap "rm -f ${ulog}" EXIT SIGINT SIGTERM
    # Start monitoring
    (udisks --monitor >"${ulog}") &
    udisks_pid=$!
    while ps ${udisks_pid} &>/dev/null && [[ -e "${ulog}" ]]; do
    devices=()
    read -t 2 output < "${ulog}"
    devices=($(echo "${output}"| grep '^added:' | sed s:.*/::g))
    # Mount all 'real' devices
    for ((i=0; i < ${#devices[@]}; i++)); do
    if [[ $(udisks --show-info "/dev/${devices[i]}" \
    | sed -n 's/ *usage: *//p') == "filesystem" ]]; then
    udisks --mount "/dev/${devices[i]}" >/dev/null && \
    echo "mounted: /dev/${devices[i]}"
    fi
    done
    done
    kill ${udisks_pid}
    exit

    It might work similar to the same as the second rule, but not the first.
    This needs to be run as a separate daemon, so if the rule works fine for you, stick with it. I made this because I have other users that use gnome, so they will have the drives being mounted twice if they are logged in.

  • HAL, udev and unmounting hard drives

    Hi,
    I just added a udev rule to automount my devices at /media/$DEVICE and everything's going swimmingly. However, when I unmount the device, I'd like /media/$DEVICE to be deleted. This can't be done with udev since the only actions it recognizes are add/remove, right? Is there any way to get HAL or something else to handle it?
    Cheers,
    SMRT

    ilusi0n wrote:I made a similiar question here, At the moment I let udev mount all my stuff. When I want to umount, I do always sudo umount /media/label and the udev rule delete that folder that is created on media folder.
    Wait, so you have a udev rule that automatically deletes your folder in /media? May I ask what that rule is?
    karol wrote:
    http://wiki.archlinux.org/index.php/Ude … r_.2Fmedia
    # Clean up after removal
    ACTION=="remove", RUN+="/bin/rm -f /media/usbhd-%k", RUN+="/bin/umount -l /mnt/usbhd-%k", RUN+="/bin/rmdir /mnt/usbhd-%k"
    Doesn't that only remove symlinks, unmount, remove the actual folder when the device is PHYSICALLY removed?
    Last edited by iamsmrt (2010-08-23 22:20:50)

  • Hal messed up my policy?

    Hi there,
    Latest upgrade got me to fix some policy to mount USB-HD formatted on ntfs.
    I found the solution, sorry this is Italian [url]http://www.stenoweb.it/node/129 only[/url]
    I english translation you should write a new policy in order to mount the external Hard Disk whit ntfs-3g (which let us write/read operations).
    <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
    <!--
    Montaggio unità esterne NTFS in lettura/scrittura con ntfs-3g.
    /usr/share/hal/fdi/policy/10osvendor/
    -->
    <deviceinfo version="0.2">
    <device>
    <match key="volume.fstype" string="ntfs">
    <match key="@block.storage_device:storage.hotpluggable" bool="true">
    <merge key="volume.fstype" type="string">ntfs-3g</merge>
    <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
    <append key="volume.mount.valid_options" type="strlist">locale=</append>
    </match>
    </match>
    </device>
    </deviceinfo>
    and save it as /usr/share/hal/fdi/policy/10osvendor/20-ntfs-config-write-policy.fdi
    after restart hal
    /etc/rc.d/hal restart
    I'd like to point out to the HAL packager to have a care of this. I supposed I got the policy that I has modified overwritten by last update, without any backup
    F

    I've noted that deprecation and I see that even the wiki had tried a chunk of patches.
    Mine went fine when I putted in /usr/share/hal/fdi/policy/10osvendor/13-myrule.fdi
    This solved my problem, but honestly I saw a lot of rules HAL's laying around.
    Want it not be a help if hwdetect will purge those unnecessary rules?
    F

  • [SOLVED] HAL don't start-

    Hello!
    It appears that my HAL now [FAIL] at startup even if it is in my rc.conf.
    I've tried
    # /etc/rc.d/hal restart
    :: Stopping Hardware Abstraction Layer [FAIL]
    :: Starting Hardware Abstraction Layer [FAIL]
    DBUS is also installed…
    The weird thing is that worked great before… and not even because of an upgrade, it fails…
    Have you some ideas ?
    Last edited by jiehong (2009-06-18 21:40:03)

    It also says [FAIL] for me, yet HAL still functions correctly (automounts drives, etc).  Are you sure the daemon doesn't work anyway?

Maybe you are looking for

  • Firefox freezes for a period of time when I try to fill out online info

    When I begin to fill out forms on line, the first few letters show up but then Firefox freezes for 15-60 seconds before the next letter is entered and does this with all of the letters I entered after thel initial freeze which is just what happened.

  • Radio Remote No Longer Works

    Since updating my ipod to the latest version my Radio Remote no longer works when i plug it in it says this accessory is not supported by this ipod what can i do

  • How can I add a watch to a variable or expression during javascript debugging

    Since the new update to safari 6 I am looking for a way to add a watch to a variable or expression during javascript debugging. I don't want to go to the console line every time to type in the separate variables and expressions over and over again. A

  • Workflow notification to several SPM owners

    Hello, we are trying to implement SPM using CUP for super user provisioning. In the workflow settings we have set "Super Access Owner" as a approver determinator. For we have several owners for one FF-ID we need all owners to be notified by CUP workf

  • Please fix the compatibility issue regarding google tool bar

    I have now FF5 and this version is NOT compatible with Google Tool Bar. I have all of my favorites and bookmarks on that tool. I do not and will not use the bookmark feature in FF. Google is everywhere and I can access it most places and feel it is a