You are not logged in.

#76 2012-05-04 20:27:19

asd01
Member
Registered: 2010-12-19
Posts: 19

Re: devmon - bash udisks automounting & autostarting

drcouzelis wrote:

Does Clementine just need a link than points "/dev/cdrom" to "/dev/sr0"?

I just tried to

ln -s /dev/sr0 /media/cdrom

And still nothing is visible in Clementine. Thanks for pointing out about the lack of file system!

EDIT:
It seems to be Clementine problem, and not the devmon fault!

mplayer -cdrom-device /media/cdrom cdda://

And I can play music in mplayer! I will try to figure out how to achieve this in Clementine. Thanks!

Last edited by asd01 (2012-05-04 20:33:05)

Offline

#77 2012-05-25 20:41:16

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: devmon - bash udisks automounting & autostarting

devmon is now distributed as part of udevil, and there is an updated version available which adds some support for udisks2 and pmount.  Please read the details.

Offline

#78 2012-11-20 10:43:36

tlamer
Member
From: Bratislava, Slovakia.
Registered: 2010-02-04
Posts: 42

Re: devmon - bash udisks automounting & autostarting

Hi, i am using arch linux with a window manager. Should i start devmon from my .xinitrc file? I found that there is devmon@.service file for systemd but i cant figure out how to use it... simple systemctl start devmon@ returns that service is not valid... I have migrated to systemd just a few weeks ago so im not very used to it yet.

Thanks.


:wq

Offline

#79 2012-11-20 16:06:49

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: devmon - bash udisks automounting & autostarting

@tlamer : just migrate to full systemd and always launch devmon with my old .xinitrc (herbstluftwm as my wm):

exec ck-launch-session dbus-launch --exit-with-session bash -c 'devmon -g & herbstluftwm'

think need to rewrite

exec bash -c 'devmon -g & herbstluftwm'

edit: fix typo

Last edited by mentat (2012-11-20 16:08:21)

Offline

#80 2012-11-20 19:00:39

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: devmon - bash udisks automounting & autostarting

tlamer wrote:

Hi, i am using arch linux with a window manager. Should i start devmon from my .xinitrc file? I found that there is devmon@.service file for systemd but i cant figure out how to use it... simple systemctl start devmon@ returns that service is not valid... I have migrated to systemd just a few weeks ago so im not very used to it yet.

First, devmon does not require systemd.  Those files were provided by a user for those who want to try systemd startup.  I'm not familiar with it but you could try asking here.  Input on the value of those systemd files being included is welcome.

It's usually best to start devmon from your window manager's startup script.  Some examples are shown here.

However, when used with udevil, devmon can be started anywhere, including xinitrc - it won't require consolekit, etc.  (It will use udevil by default if installed.)

Offline

#81 2013-06-17 05:46:18

innn
Member
Registered: 2010-10-12
Posts: 96

Re: devmon - bash udisks automounting & autostarting

hi,
I've tried devmon and it worked mounting a sd card and a usb flash drive but I have problems unmounting by right clicking the mountpoints in /media and choosing to eject/unmount.  I get permission errors.
I use rox as file manager and have devmon & line in my .xinitrc.
And one more question would be how can I use this script:

#!/bin/sh
killall devmon udisks
sleep 10
devmon --exec-on-drive "notify-send --icon=block-device --urgency=low \"Disc %l has been mounted\"" \
       --exec-on-drive "rox %d" &

to get all the goodies like notifications and file manager launching?
I hope it's the right place to ask if not I apologize and gladly start a new thread.

Last edited by innn (2013-06-17 05:46:43)

Offline

#82 2013-10-18 19:19:00

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: devmon - bash udisks automounting & autostarting

innn wrote:

hi,
I've tried devmon and it worked mounting a sd card and a usb flash drive but I have problems unmounting by right clicking the mountpoints in /media and choosing to eject/unmount.  I get permission errors.  I use rox as file manager and have devmon & line in my .xinitrc.

There was some discussion of devmon with rox here and in here.  Not sure why rox wouldn't unmount it since it presumably uses udisks for unmounting.

You might also try SpaceFM file manager which works well with udevil or udisks.

And one more question would be how can I use this script:

#!/bin/sh
killall devmon udisks
sleep 10
devmon --exec-on-drive "notify-send --icon=block-device --urgency=low \"Disc %l has been mounted\"" \
       --exec-on-drive "rox %d" &

to get all the goodies like notifications and file manager launching?

Set that script to run from .xinitrc instead of running devmon directly (script installation).  Also note that SpaceFM contains most of the functionality of devmon if you prefer a gui app - it can open folders when mounted, etc.

Last edited by IgnorantGuru (2013-10-18 21:46:22)

Offline

#83 2013-10-18 21:37:00

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: devmon - bash udisks automounting & autostarting

Hi IgnorantGuru,
Please, sorry for this off-topic but I'm very happy to hear you again wink
Welcome back.

Offline

#84 2013-10-18 21:48:59

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: devmon - bash udisks automounting & autostarting

Thanks mentat - may the moderators spare you their wrath.  wink

Offline

#85 2014-01-11 12:33:30

kvtb
Member
Registered: 2014-01-11
Posts: 30

Re: devmon - bash udisks automounting & autostarting

Can udevil/devmon also be used as an autofs replacement, for automounting and unmounting network shares? Or is that out of scope for this project?

Example use cases:
- pre-define an SSHFS or NFS share (e.g. remote home directory, or remote directory with MP3/video)
- gets mounted when needed, gets unmounted when there is no connection. (Ideal for laptops)

If it is not the intention of this project to support this, then that's OK.

Offline

#86 2014-01-11 13:31:48

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: devmon - bash udisks automounting & autostarting

kvtb wrote:

Can udevil/devmon also be used as an autofs replacement, for automounting and unmounting network shares? Or is that out of scope for this project?

There have been a few requests for this but it's out of scope in terms of current plans for devmon.  You're always welcome to open a request on the tracker - not sure if it will ever be added though.  Network support in general tends to be more of a pandora's box compared to devices.  But when work is planned in an area, I do review the tracker to see what requests can be accommodated in any upcoming changes, so that's the best place to put ideas.

If you want to replace autofs, it shouldn't be too difficult to write a script (or add code to devmon) that watches for network changes (changes to network files or watch events?) and then runs udevil to mount/unmount.  For a given expected network or two this should be easier to hack, but for supporting it in a general way would be more involved.  (Maybe there are already scripts for this that could be hacked?)

Offline

#87 2014-01-11 19:47:54

kvtb
Member
Registered: 2014-01-11
Posts: 30

Re: devmon - bash udisks automounting & autostarting

Thanks for your reply. If it is deemed out of scope, then I'm OK with that, I will not open a request on the tracker,
I'm now investigating the alternative route of using systemd.automount - see if that works as expected.

Offline

#88 2014-06-19 13:33:03

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: devmon - bash udisks automounting & autostarting

This is in my .zprofile:

devmon  --no-gui \
        --exec-on-drive "notify-send -a \"devmon\" \"Mounted\" \"Mounted %l on %d\"" \
        --exec-on-unmount "notify-send -a \"devmon\" \"Unmounted\" \"Unmounted %l.\"" \
        --exec-on-disc "notify-send -a \"devmon\" \"Mounted data CD/DVD.\"" \
        --exec-on-video "notify-send -a \"devmon\" \"Mounted video DVD.\"" \
        --exec-on-audio "notify-send -a \"devmon\" \"Inserted audio CD.\"" \
        --exec-on-remove "notify-send -a \"devmon\" \"Drive removal\" \"Removed %l.\"" > /dev/null 2>&1 &

It wouldn't send notifications on mount, but if I ran the exact same code in a terminal emulator in X, it worked well. I figured out that if devmon was initialized outside of X [, and told to notify-send], it wouldn't work. I do want devmon to automount also when I'm not using X.

Offline

Board footer

Powered by FluxBB