Code Monkey home page Code Monkey logo

ldm's Introduction

NAME

ldm - Lightweight Device Mounter

SYNOPSIS

ldm [-d] [-u user] [-p path] [-c command] [-m mask] [-h]

DESCRIPTION

ldm is a lightweight device mounter following the UNIX philosophy written in C and based on udev and libmount. The user can use umount to unmount the device or ldmc with the -r switch. The daemon can be controlled with the ldmc tool.

OPTIONS

  • -d

    Run ldm as a daemon.

  • -u user

    Specify the user who owns the mountpoints.

  • -p path

    Specify the base folder for the mount points. The default is /mnt.

  • -m fmask,dmask

    Specify the fmask and dmask for the mounted devices in octal or symbolic format (eg. the octal mask 0777 is represented as rwxrwxrwx).

    If only the fmask is specified then its used as umask and it's value is used as dmask too.

  • -c command

    Specifies a command that is executed after a successful mount/unmount action. The following environment variables are defined :

    • LDM_MOUNTPOINT

      The complete path to the mountpoint.

    • LDM_NODE

      The path pointing to the device node in /dev

    • LDM_FS

      The filesystem on the mounted device.

    • LDM_ACTION

      The action ldm has just performed, it can either be mount, pre_unmount or unmount

  • -h

    Print a brief help and exit.

BLACKLISTING

ldm doesn't offer any blacklisting by itself but it honors the options found in the fstab so it will ignore any device with flag noauto.

INSTALL

The included systemd service expects a config file at /etc/ldm.conf similar to this:

    
    MOUNT_OWNER=username
    BASE_MOUNTPOINT=/mnt
    FMASK_DMASK=fmask,dmask
    EXTRA_ARGS=-c <path_to_executable>
    
    

The options FMASK_DMASK and EXTRA_ARGS are optional. The default value for FMASK_DMASK is 0133,0022. EXTRA_ARGS will be appended to the ldm executable.

SEE ALSO

ldmc(1), umount(8)

WWW

git repository

AUTHOR

2011-2019 (C) The Lemon Man [email protected]

ldm's People

Contributors

asergi avatar baskerville avatar bugabinga avatar dequis avatar ekroth avatar evanpurkhiser avatar jschwab avatar lemonboy avatar rolinh avatar rufuswilson avatar stephen304 avatar unc0 avatar vodik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ldm's Issues

More hook options

I propose that we add more options like -c path/to/script. For example, an option -e "STRING" that would let you execute shell commands as in bash -c "STRING". This would be helpful if you just want to run simple commands like a notify event, for which a script is perhaps too overkill and a bit redundant.

It would also be nice to be able to tell the hook script or commands what actually happened, for example with shell variables. For instance:

  • LDM_MOUNT=1 if a mount happened, 0 if an unmount happened
  • LDM_DEVICE=/dev/... for the device mounted/unmounted
  • LDM_MOUNTPOINT=/path/... for the path that it was mounted to or umounted from

So that then, you could use these in the script and reliably know what did ldm do to call you. It is also much safer and easier than having to parse /etc/mtab, which might have unexpected results if multiple events happen simoultaneously.

I can do a pull request with these if you want, but I wanted to propose the ideas first.

core dump

I experimented with the option and got a core dump when specifying a script as "-c".
Version is 0.6 (from arch aur). Architecture is armv7 (raspberry pi).
My use case is an automated backup of my photos as soon as the camera sd card is mounted.

The service is then dead and won't restart, because the /run/ldm.pid file still exists after a crash.
I helped me by adding a "ExecStartPre" call in the systemd unit file which deletes the file. Perhaps specifying the option "PIDFile" would work too. Don't know if systemd will clean up the file in case of crashes.

My ExecStartPre script now looks like this:

#!/usr/bin/bash
# Used as ExecStartPre in systemd unit file for ldm v0.6
#1)
#    removes pid file after crash, ldm won't start if the file exists
#2)
#    try to delete orphaned mount points (e.g. after crash or power off)
#    ldm does no clean up / check itself
if [ -b /run/ldm.pid ] ; then
    echo "remove pid file after crash"
    rm /run/ldm.pid
fi
dir=$1
if [ "$dir" = "" ]; then
    echo mount point not specified, assuming default..
    dir=/mnt
fi
echo cleaning up mount directory "$dir"
for f in "$dir/*/"; do
    rmdir --ignore-fail-on-non-empty $f
done
exit 0

Output of journalctl --unit=ldm

Jul 04 00:22:09 pi2 ldm[12147]: strtoul: Success
Jul 04 00:22:09 pi2 ldm[12147]: ldm v0.6
... [stop and restart with -c option]
Jul 04 00:22:10 pi2 ntfs-3g[12154]: Unmounting /dev/sdb1 (Intenso)
Jul 04 00:22:55 pi2 systemd[1]: ldm.service: Main process exited, code=dumped, status=11/SEGV
Jul 04 00:22:55 pi2 systemd[1]: ldm.service: Unit entered failed state.
Jul 04 00:22:55 pi2 systemd[1]: ldm.service: Failed with result 'core-dump'.
Jul 04 00:22:59 pi2 systemd-coredump[12184]: Process 12147 (ldm) of user 0 dumped core.
Jul 04 00:24:20 pi2 systemd[1]: Started lightweight device mounter.
Jul 04 00:24:20 pi2 systemd[1]: Starting lightweight device mounter...
Jul 04 00:24:20 pi2 ldm[12214]: strtoul: Success
Jul 04 00:24:20 pi2 ldm[12214]: ldm is already running!

Feature: eject without root

Eject requires root privilegies. It will be nice if ldmc take care of ejecting device without root. It is relevant for external HDD's to spin-down the drive

ldm v0.6.2 doesn't automount cdrtools data DVD-RW

I'm using Arch Linux with cdrtools v3.02a03-1 and ldm v0.6.2. I burned data onto a blanked DVD-RW using:

tsize=mkisofs -J -r -N -d -hide-rr-moved -udf -print-size "$source"
mkisofs -J -r -N -d -hide-rr-moved -udf -V "$label" "$source" | cdrecord -v -eject gracetime=3 dev=$device driveropts=burnfree tsize=$tsize\s -data -pad -

This DVD-RW is not automounted by ldm v0.6.2. It does automount ok if I downgrade ldm to v0.5 or if I manually mount it using "mount /dev/sr0 /mnt".

Other DVD-RWs I created using Windows are automounted by ldm v0.6.2, it's just the one I created using cdrtools that doesn't work.

I run ldm by: ldm -d -g 100 -u 1000 -p /media.

Error starting ldm.service

Hi,

Latest AUR package from arch linux. Good mountpoint/mount_owner in ldm.conf.

When starting with systemctl start ldm.service
ldm realpath(): No such file or directory

When starting with /usr/bin/ldm -u USER -p mountpoint, working sucessfully.
An idea ?
thanks

Feature: Notifications

Hi,
I believe I once asked but maybe I am mistaking. So I was wondering if there is a way to get (custom?) notifications on mount / unmount? I am using the systemd service. If it is possible, I'd like to see a / some simple examples on how to configure it and I guess this would make people start using it easier.

umask

Hello!
Would be great if it the umask could be configured.

Sincerely
Andreas Nilsson

using systemd ldm.service

Hi thanks for a very nice project,

I believe my issue is similar to #58, but that issue was closed without documention the solution.

The problem occurs when I try to start ldm as a systemd service. When I start it manually it works fine. From the output below it seems the value of the ${MOUNT_OWNER} is empty.

May 23 11:24:04 tjaart-laptop systemd[1]: Started lightweight device mounter.
May 23 11:24:04 tjaart-laptop ldm[5138]: Could not find any information about the user ""
May 23 11:24:04 tjaart-laptop systemd[1]: ldm.service: Main process exited, code=exited, status=1/FAILURE
May 23 11:24:04 tjaart-laptop systemd[1]: ldm.service: Unit entered failed state.
May 23 11:24:04 tjaart-laptop systemd[1]: ldm.service: Failed with result 'exit-code

I am not sure how this needs to be configured. Does anyone have any pointers?

small readme fix

I believe

USER_GID = gid USER_UID = uid BASE_MOUNTPOINT = /mnt

should be

USER_GID = gid
USER_UID = uid
BASE_MOUNTPOINT = /mnt

thank you for the tool

NTFS 755/644 permissions

The Arch wiki suggests mounting NTFS drivers with the mount options dmask=022,fmask=133.

Could this be incorporated? Or am I missing something and this is already possible to configure.

Feature request: notifications

Hi,
I'm sorry to write it to the 'Issues'-place but I couldn't find a more appropriate place. Would it be possible (maybe as a patch or so) to implement notifications, e.g. when a disk gets mounted? I'd love it!

AUT ldm package does not install systemd

Packagebuild from aur https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ldm does not install systemd service.
As I can see from https://github.com/LemonBoy/ldm/blob/master/Makefile installing systemd service processed only with command
make install systemd
But PKGBUILD does only install
So additional string should be added to PKGBUILD:

    make PREFIX=/usr DESTDIR="$pkgdir" install
    make PREFIX=/usr DESTDIR="$pkgdir" install systemd

@LemonBoy looks like you is mainteiner of https://aur.archlinux.org/packages/ldm/?comments=all

Error while mounting /dev/sr0 (Read-only file system)

I am trying to use ldm to auto mount CDs inserted into my HTPC. Since CDs are read only, ldm fails to mount it. It would be nice if I could specify to mount everything read only or maybe even have ldm mount as read only when the above error is encountered.

Thoughts?

Mount options

Hello,

I'm wondering if you could allow us to specify mount options?
I guess most use the tool for removable media for file transfer and for these it would be great to specify for example mount -o flush.

Mountpoint creation bug

This is on Manjaro-LXQt (ldm from AUR). My external USB storage (Yedek) gets mounted on /mnt as Yedek, but the next time after a restart (or start because of power failure) it gets mounted as Yedek_ and the first Yedek is locked which appears to empty when unlocked. This is a persistant behaviour, so that the next time the previous Yedek_ is locked and a newer Yedek_ is created.

connect: Connection refused

Every so often, ldm starts spitting out an error (via ldmc):

connect: Connection refused

This happens with both options, -l and -r. ldm also stops mounting devices.

I'm running ldm on Arch via systemd.

I cannot link this to any patterns of activity, it just seems to happen sometimes. Restarting the ldm service doesn't work but a reboot of the machine does.

EXTRA_ARGS example

Sorry, I created an issue when I was trying to search.

What I am trying to achieve is:

  1. Plug in SDCARD
  2. Automounts via /dev/mmcblk0p1 /mnt/sdcard/ exfat defaults,nofail 0 0
  3. $HOME/stared.sh is executed as uid=1000 & gid=1000

If I can achieve this with ldm, please let me know.

The path (null) doesn't name a folder or doesn't exist!

I'm trying to run ldm as a systemd service and the output says:

The path (null) doesn't name a folder or doesn't exist!

I assume it's do to with the mountpoint noted in /etc/ldm.conf - mine looks like this:

USER_GID=1000
USER_UID=1000
LDM_MOUNTPOINT=/mnt

immediate remounting when ldmc -r

When umounting the device with umount or ldmc -r the device seems to be mounted again very soon after.

running ldmc -r /mnt/usb && ls -la /mnt comes back with nothing but if I then manually ls -la /mnt after I can see the drive there again.

Ignores config file?

I have my config file set up in /etc/conf.d as stated in the readme.
However, whenever I run ldm, it apparently ignores the config file and only expects the GID and UID to be in the command-line arguments.
A quick scan of the source code seemed to confirm this.

Would you mind fixing this? If it's any trouble, I can submit a patch.

MTP support

Hi, is there any plan on giving support for mtp??

Add `-s` for safely remove USB devices?

This is related to #14 . I'm using a 3.5'' HDD USB bay with power adapter.

I'm using pmount-safe-removal to solve #14 , although ldm will show some warning when I pumount -D some ntfs partition :

Feb 10 21:54:12 unco-new ntfs-3g[25604]: Unmounting /dev/sdd2 (2TB_CETA)
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 1
Feb 10 21:54:12 unco-new systemd-udevd[31068]: inotify_add_watch(7, /dev/sdd2, 10) failed: No such file or directory
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 2
Feb 10 21:54:12 unco-new ldm[27791]: /dev/sdd2 syspath is /sys/devices/pci0000:00/0000:00:10.0/usb4/4-1/4-1:1.../sdd2
Feb 10 21:54:12 unco-new ldm[27791]: /dev/sdd2 parent is /sys/devices/pci0000:00/0000:00:10.0/usb4/4-1/4-1:1....3:0:0
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 3
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 4
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 1
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 488378645
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 488378645
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 1
Feb 10 21:54:12 unco-new kernel: Buffer I/O error on device sdd, logical block 488378645
Feb 10 21:54:12 unco-new ldm[27791]: ntfs-3g: Failed to access volume '/dev/sdd2': No such file or directory
Feb 10 21:54:12 unco-new ldm[27791]: ntfs-3g 2013.1.13AR.2 external FUSE 29 - Third Generation NTFS Driver
Feb 10 21:54:12 unco-new ldm[27791]: Configuration type 7, XATTRS are on, POSIX ACLS are on
Feb 10 21:54:12 unco-new ldm[27791]: Copyright (C) 2005-2007 Yura Pakhuchiy
Feb 10 21:54:12 unco-new ldm[27791]: Copyright (C) 2006-2009 Szabolcs Szakacsits
Feb 10 21:54:12 unco-new ldm[27791]: Copyright (C) 2007-2012 Jean-Pierre Andre
Feb 10 21:54:12 unco-new ldm[27791]: Copyright (C) 2009 Erik Larsson
Feb 10 21:54:12 unco-new ldm[27791]: Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
Feb 10 21:54:12 unco-new ldm[27791]: Options:  ro (read-only mount), windows_names, uid=, gid=,
Feb 10 21:54:12 unco-new ldm[27791]: umask=, fmask=, dmask=, streams_interface=.
Feb 10 21:54:12 unco-new ldm[27791]: Please see the details in the manual (type: man ntfs-3g).
Feb 10 21:54:12 unco-new ldm[27791]: Example: ntfs-3g /dev/sda1 /mnt/windows
Feb 10 21:54:12 unco-new ldm[27791]: News, support and information:  http://tuxera.com

Using this pmount command, the power light of my HDD bay will go red as I safely remove this in Windows. It will stop the HDD, so I can turn it off without breaking it.

According to pmount-safe-removal author's blog post. We need these steps to safely remove an USB device:

  • Calls sync() to flush buffers
  • Unbinds the driver (which, as discussed earlier, takes care of sending the SYNCHRONIZE CACHE and START-STOP messages to the device)
  • Suspend the device

I tried to patch ldm to get this safely remove feature, but it won't trigger those udev events like pumount. This is my gist: https://gist.github.com/unc0/8916528#file-ldm-safely-remove-patch-L100 .

Helb ;_;

I know this is a bad place to post this, but I don't know of any other way to contact you. I remember that you added HuC3 support and some other things to GameYob, but there still isn't save support for the HuC3 games like Robopon. I think this has to do because there original game cards had interchangeable batteries. Drienn doesn't seem to know how to fix this. If you have any ideas, please try to find a way to add support for saves. It would make me and many others very happy :]

ldm: invalid option -- 'r'

Running ldm with systemctl, I'm trying to umount a device with

ldm -r /mnt/mydevice

And I get

ldm: invalid option -- 'r'

This has never failed me in the past but recently it's been giving me the above error.

Reuse empty mount folder?

I have a drive with the label 'Music'. It gets mounted to /mnt/Music/. If I reboot the computer without disconnecting the drive first the next time I check my /mnt/ directory there are two folders Music (owned by root) and Music_ (where the drive is mounted). Why doesn't ldm reuse the empty directory as a mountpoint?

Hard-coded /usr/local/bin/ldm path in ldm.service

6705be6 makes ldm.service use /usr/local instead of /usr, which breaks the ldm and ldm-git AUR packages.

Assuming there is no way to make PREFIX work nicely with ldm.service, could you switch it back to /usr or fix it in the two PKGBUILDs?

Thanks!

So confused on how to set up ldm

I apologize in advance if it is not appropriate to ask such a noob question here. Basically, I'm trying to set up automounting devices that I plug to my system and auto-dismounting them when I unplug it.

A question not related to ldm:

Does the latter even make sense? Would I have to manually dismount my devices no matter what if I want to unplug them? Is it necessary to dismount them if I'm not doing any writing on the drive (i.e. can I assume the system is not doing any background writing such as cache, and if so, does that mean I do not need to dismount)?

A question relating to ldm:

I cannot get ldm to work, despite getting using the provided service file (enabled and started it, I did not change its contents) and creating an /etc/ldm.conf with the appropriate GID and UID values. Is it possible someone can provide a straightforward guide on how to set it up once I install ldm? I am going to uninstall and delete every thing so I can start from scratch without things conflicting, since I guess I messed up somewhere.

Thanks.

Mountpoint creation bug

I'm having an issue where partitions and removable storage that are present when the system is booted and aren't manually unmounted before shutdown/reboot get a new mountpoint on each boot, with an extra trailing underline "_" added.

So, as an example, I have an SDHC card and an Sandisk Cruzer Fit that are now appearing as "/media/SDHC___________", and "/media/FIT___________".

By listing the contents of "/media/" I can see other versions of those mountpoints with progressively less trailing underlines, up until just "SDHC" and "FIT".

The other versions are owned by root:root and the two bigger ones that are currently mounted are owned by thiago:users.

I have boiled this issue down to the function device_create_mountpoint (line 234), but my C is more than a little rusty (too much time doing web dev) and I prefer not to mess with it on my own...

I run Arch Linux X86-64, my system is up to date and I've built ldm from source (git clone of this repository, master branch head) and I am using the systemd service.

sandisk_cruzer_fit

Disable noexec somehow

I keep my Steam library on a windows partition. However, it seems that the partition is mounted noexec, and Steam won't allow me to add it with that option.

Is there a way to disable noexec for one or all mounts?

Use -c option when using the systemd service

Using the systemd service file as it is makes it impossible to specify a callback script since only two parameters are supported in the settings file.

I think a good way to support everything would be to add a environment variable "ADDITIONAL_ARGS"

So one could set

ADDITIONAL_ARGS="-c /path/to/my/script"

in the settings file and the systemd service file should look like:

ExecStart=/usr/bin/ldm -u ${MOUNT_OWNER} -p ${BASE_MOUNTPOINT} ${ADDITIONAL_ARGS}

Cannot unmount properly with ldm -r exfat

Hello,

After issuing ldmc -r /mnt/xxx:

jan 10 11:40:06 MacBookPwn kernel: sd 11:0:0:0: [sdd] Write Protect is off
jan 10 11:40:06 MacBookPwn kernel: sd 11:0:0:0: [sdd] Mode Sense: 23 00 00 00
jan 10 11:40:06 MacBookPwn kernel: sd 11:0:0:0: [sdd] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
jan 10 11:40:06 MacBookPwn kernel: sdd: sdd1
jan 10 11:40:06 MacBookPwn kernel: sd 11:0:0:0: [sdd] Attached SCSI removable disk
jan 10 11:40:06 MacBookPwn systemd[1]: Mounted /mnt/351B-3566.
jan 10 11:40:33 MacBookPwn systemd[1]: mnt-351B\x2d3566.mount: Unit entered failed state.

And after removing / puting back, the fs need to be repared.

Encrypted root and home partitions are mounted twice

I have an LVM setup with dmcrypt, so lvm-root and lvm-home are mounted at / and /home respectively before ldm is started. The issue is, ldm mounts the both of them again under /media. Which wouldn't be much of a problem if the directories were removed at shutdown, which they are not because the home and root partitions don't seem to be unmountable by ldm.

So here's the relevant part of my mtab after the first boot:

/dev/mapper/lvm-root / ext4 rw,relatime,discard,data=ordered 0 0
/dev/sda1 /boot ext2 rw,relatime 0 0
/dev/mapper/lvm-home /home ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-root /media/dcacb5b9-ea02-48eb-a0f4-2039b2b5c438_ ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-home /media/ecc412d5-204a-4883-a024-f34b25de3572_ ext4 rw,relatime,discard,data=ordered 0 0
/dev/mapper/lvm-home /media/ecc412d5-204a-4883-a024-f34b25de3572__ ext4 rw,relatime,discard,data=ordered 0 0

I'm not sure why is lvm-home being mounted twice either. As days pass by, I end up with dozens of directories under /media following the underscore pattern.

I'd be willing to build and test code to get this fixed.

Avoid the automount of some devices

Hi,

I'm using a Kindle with Calibre, and Calibre needs to do the mounting itself in order to properly detect the device. So now, while using ldm, I have to manually unmount the Kindle before telling Calibre to connect to the device. Which is kind of… wrong.

I'd like to avoid that. Could there be a way to tell ldm to NOT automatically mount some particular devices? A configuration file somewhere is fine.

Edit. — Of course, this isn't a real issue, it's just a suggestion for improvements. :)

ldm mounts old burned dd iso.

I recently dd'ed a debian iso onto a device.

After that I deleted all the partitions with fdisk, created a new DOS partition table and a new partition.

I did format the partition with mkfs.vfat /dev/sdb1 and the usb drive does mount correctly with mount /dev/sdb1 /mnt. but with ldm, its mount like this.

/dev/sdb on /media/Debian_8.2.0_M-A_1 type iso9660 (ro,relatime,uid=1000,gid=1000,utf8)

And the files of the iso are still listed.

On a Gnome 3 DE with all the features, the device does mount fine.

Here is a fdisk -l of the device.

Disk /dev/sdb: 14.6 GiB, 15610576896 bytes, 30489408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb72e99e2

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 30489407 30487360 14.6G 83 Linux

Any suggestions would be welcome.

Regards,

Boot partition is mounted to specified mount dir

Tested on Raspberry Pi 2 with arch linux. On Pi the boot partition is typically /dev/mmcblk0p2.

This is an extract of the mount output (I'm mounting to /media):
/dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)
[..]
/dev/mmcblk0p2 on /media/0d6d30bb-1671-4656-9f6e-a49e309f81af type ext4 (rw,relatime,data=ordered)

The last line is showing the issue. I have to umount to prevent a security breach.

Config file for mount point

Hi there,

I would like to change the mount point since file managers do not seem to recognise devices that are mounted under /mnt but only /media or /run/media.

I know that you can change the mount point in the code before compiling. However, this is not really user-friendly.

Is it an idea to provide a user config file that allows you to specify certain settings such as the mount point?

ldm name collision with LTSP display manager

ldm - LTSP display manager - well "dm" usually stands for display manager, while device would by fine too it probably is not very lucky as those packages can not be installed together. Making e.g. ldmd of the deamon would help at least.

ldm.service loaded but failed

Hi

Immediately after installation of ldm, when I plug in a USB memory, the name of the device quickly flashes in thunar (archlinux, i3) and disappear. After reboot, nothing happens and systemd logs that the ldm.service is loaded but failed. Then, systemctl status ldm.service indicates that realpath()does not exist... I am not sure whether it is a problem on my system or with ldm... Any clue?
Thanks

Cannot unmount with ldmc -r

I must apologise for being a Linux noob, but this is a nice program I would really like to use, if only I could get it working somehow. The problem is that I cannot seem to unmount my flash drive with ldmc -r. I have installed ldm from the AUR, I have enabled ldm.service and have set the required options in /etc/ldm.conf.

Here is what I tried:

  1. My usb flash drive gets automounted nicely when I plug it in.
  2. I run ldmc -l, the drive is listed (/dev/sdb1).
  3. I run ldmc -r /dev/sdb1, and get the message "Operation completed successfully".
  4. I run ldmc -l again, the drive is not listed any more.
  5. However, when I run lsblk, the drive is still shown as mounted.
  6. Thinking that there is another service somewhere that is automounting the drive, I run 'sudo systemctl stop ldm.service && sudo umount /dev/sdb1.
  7. This seems to unmount the drive, as lsblk is not showing it as mounted any more.
  8. I reinsert the flash drive, but it does not get mounted, so I guess there isn't another program trying to automount the drive (successfully, at least).
  9. I run 'sudo systemctl start ldm' and the drive gets automounted quickly, it shows up in both lsblk and ldmc -l.
  10. When I run ldmc -r /dev/sdb1 again, I get the message "Operation completed successfully" again.
  11. Now, however, even ldmc -l shows it still as mounted, not only lsblk.

So, I don't know what to do any more. Might it be a problem with udev configuration? Unfortunately I am quite the noob and I don't know where to start troubleshooting it. My Arch Linux install is also quite old now and I don't remember all the things I did in /etc/ several months ago.

NTFS gets remounted automaticly

When using sudo umount to unmount an NTFS usb HD, the drive gets remounted right away after being unmounted. Have to stop the daemon in order to unmount the drive. Also the folder that is created a the mount point is persistent, unlike for other media devices I've tried.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.