IgnorantGuru's Blog

Linux software, news, and tips

udevil and devmon updates

udevil 0.2.1 is available, which now includes devmon 1.1.0.

devmon is now distributed as part of udevil – installing udevil will install devmon. If you previously installed devmon via a package (eg the PPA or the Arch AUR), remove the devmon package to install udevil and the latest devmon. (udevil packages provide devmon and conflict with the old devmon packages.) You can also download just the script if you just want devmon alone.

devmon now uses udevil for device monitoring and mounting, removing all dependencies on udisks, policykit, consolekit, gvfs, etc. devmon can also be used with udisks v1, or some combinations of udevil, udisks v2, and pmount, as detailed in the table below:

    devmon With Recommends
    any version udisks1 zenity
    1.1.0 and later udevil (set suid) eject zenity
    enable polling
    1.1.0 and later udevil + udisks1 eject zenity
    1.1.0 and later udevil + udisks2 eject zenity
    1.1.0 and later udevil + pmount eject zenity
    enable polling

udevil or udisks v1 is required for devmon’s device monitoring. devmon cannot be used with only udisks v2 or pmount alone. For devmon mounting, udevil does not need to be run suid if pmount, udisks v1, or udisks v2 is installed.

devmon’s instructions have been updated. The installation is now much simpler if using udevil for mounting – a consolekit session is not required by udevil, so devmon can be started anywhere.

If you’re still using udisks1 with devmon 1.0.5, there is no immediate need to upgrade. However, when your distro upgrades to udisks2, you’ll need devmon 1.1.0 or later and udevil.

May 25, 2012 - Posted by | Software

15 Comments

  1. Thanks for the great work!

    Comment by Max | May 25, 2012

  2. Been trying udevil out on antiX.

    First issue is that if I download your .deb, it won’t install due to lack of dependencies ie all those needed to build ie fakeroot etc.
    Secondly, trying to build a deb with all dependencies met, gives a make 2 error that seems connected with the po files. (I don’t have the file showing the error at the moment.)
    Thirdly, if all dependencies needed to create a deb are met (as in 2 above) then your provided .deb installs without issue.

    When running with the latest spacefm0_7.7 (which builds and installs without issue on an antiX system without all the deb build dependencies) it appears to work very well. I noticed that if spacefm is open when a usb device is inserted, it automatically mounts it in /media in rox-filer.

    At the moment I still prefer spacefm/rox with pmount, but if I can get udevil to install without the need for all the deb building dev files, I’ll seriously consider adding udevil to antiX.

    You are doing great work with this and spacefm (amongst other things) to keep bloat off our desktops!

    Comment by anticapitalista | May 28, 2012

    • > First issue is that if I download your .deb, it won’t install due to lack of dependencies ie all those needed to build ie fakeroot etc.

      The deb should list those as deps, so it’s working correctly if it won’t install without them. Due to variations between debian distros, I’m no longer providing binary packages (for spacefm or udevil). The self-building ones are just provided as a convenience for users whose distros don’t have it (which with udevil being new includes most).

      > Secondly, trying to build a deb with all dependencies met, gives a make 2 error that seems connected with the po files. (I don’t have the file showing the error at the moment.)

      I too see that make check error now on udevil 0.2.4:

      srcdir=. /usr/bin/intltool-update -m
      The following files contain translations and are currently not in use. Please
      consider adding these to the POTFILES.in file, located in the po/ directory.

      src/realpath.c

      If some of these files are left out on purpose then please add them to
      POTFILES.skip instead of POTFILES.in. A file ‘missing’ containing this list
      of left out files has been written in the current directory.

      Didn’t do that last time I tested it, I swear. ;) I’ll correct that before the next release. In the meantime you can work around the problem by adding a ‘src/realpath.c’ line to po/POTFILES.in

      udevil has some maturing to do but it’s off to a good start thus far.

      Thanks for the feedback!

      Comment by IgnorantGuru | May 28, 2012

      • Adding ‘src/realpath.c’ line to po/POTFILES.in fixed it.
        However, on installation of the .deb I get this message.

        dpkg -i udevil_0.2.4-1_i386.deb 
        Selecting previously unselected package udevil.
        (Reading database ... 61312 files and directories currently installed.)
        Unpacking udevil (from udevil_0.2.4-1_i386.deb) ...
        Setting up udevil (0.2.4-1) ...
        /var/lib/dpkg/info/udevil.postinst: 9: /var/lib/dpkg/info/udevil.postinst: 0: not found
        Processing triggers for menu ...
        

        This doesn’t appear to affect anything though.

        Comment by anticapitalista | May 29, 2012

        • The postinst script for udevil should set the suid bit on the executable. Not sure what that error is about but I’ll check it. You can set the suid bit as shown here. Thanks.

          Comment by IgnorantGuru | May 29, 2012

          • Just to let you know that antiX-base and antiX-full will come with spacefm and udevil installed.
            I’ll also add the configured debs on antiX to the antiX repo (unless there are any objections).

            Comment by anticapitalista | May 29, 2012

            • Great – udevil 0.2.5 now available should correct the deb package build and install errors.

              Comment by IgnorantGuru | May 30, 2012

  3. I noticed you recommend zenity. I think yad is a better alternative since zenity will bring in some gtk3 stuff.
    (I know yad is not in Debian (yet)).

    Comment by anticapitalista | June 2, 2012

    • Ideally devmon could work with either – just haven’t addressed that. It’s still on the list. :)

      Comment by IgnorantGuru | June 7, 2012

  4. /usr/bin/udevil –verbose mount smb://USER:PASS@192.168.1.100/SHARE
    ROOT: /bin/mount -v -t smbfs -o nosuid,noexec,nodev,noatime,user=’USER’,password=’PASS’ //192.168.1.100/SHARE /media/smb-192.168.1.100
    mount: unknown filesystem type ‘smbfs’
    mount exit status = 32

    So we need CIFS instead of SMBFS

    mkdir /media/smb-192.168.1.100
    /bin/mount -v -t cifs -o nosuid,noexec,nodev,noatime,user=’USER’,password=’PASS’ //192.168.1.100/SHARE /media/smb-192.168.1.100
    mount.cifs kernel mount options: ip=192.168.1.100,unc=\\192.168.1.100\SHARE,nosuid,noexec,nodev,noatime,,ver=1,user=Admin,pass=********

    cd sbin && ln -s mount.cifs mount.smbfs solves the problem
    Did I do something wrong?

    Comment by crigon | June 7, 2012

    • mount always handles the actual mounting for udevil, so it will use what helper is installed for smbfs. How this is set up varies with distro. On my debian setup there is both a mount.cifs and a mount.smbfs, and neither are links. mount.smbfs was installed with the ‘smbfs’ package, and mount.cifs with the ‘cifs-utils’ package, probably part of metapackages. I don’t use smb much personally so feel free to give me feedback on this. At the least I can add a note about it in the docs. Out of curiously, what distro are you using?

      Thanks for the feedback. Also, if you use smb regularly I’d appreciate your input on what good default and allowed options would be for the default udevil.conf file, keeping it secure but reasonably flexible for initial use. Maybe after you’ve used it for a bit.

      Comment by IgnorantGuru | June 7, 2012

      • I’m using Arch Linux. I have installed cifs-utils and there is no smbfs in repos as far as I know. Also after a bit of googling I think that SMB is deprecated now, but not sure about it.
        Actually I don’t have much experience with Samba, but I’d like to help if I can…

        My udevil.conf:
        allowed_options_smbfs = file_mode=*, dir_mode=*, nosuid, noexec, nodev, noatime, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, uid=$UID, gid=$GID, credentials=*

        file_mode and dir_mode are analogues of fmask/dmask. Don’t knowh how much secure is keeping them with ‘*’ value.

        Anyway I still can’t get write-access to NTFS share with

        udevil mount -o rw,file_mode=0777,dir_mode=0777,uid=1000,gid=100 smb://…
        (uid=*, gid=*)
        :-(

        Comment by crigon | June 7, 2012

        • Maybe mount isn’t using ntfs-3g. I thought this is taken care of in arch but you may need a link, eg:

          sudo ln -s /usr/bin/mount.ntfs-3g /usr/bin/mount.ntfs

          But you said ntfs but your url is smb://, so not sure I follow. As for smb write access – basically if you can get mount working correctly with it directly, it should work via udevil.

          Comment by IgnorantGuru | June 7, 2012

          • This is already done but thanks.

            The problem is that:
            1) Samba Linux-Linux = I can write to shared folder
            2) Linux-Windows (NTFS) = read only

            But you’re right. It isn’t udevil’s problem.

            Comment by crigon | June 7, 2012


Sorry, the comment form is closed at this time.

Follow

Get every new post delivered to your Inbox.

Join 138 other followers