Page 2 of 3
Re: XMonad alongside Ratpoison
Posted: 28. Jun 2012, 09:36
by Shador
Tim CowChip wrote:I tested your rule edit and it did not work for me.
I keep saying it ... does not work is sooooo vague ...
Shador wrote:Even using ranges like KERNEL=="sd[b-z]*" would be a better solution.
This instead of copy and pasting rules is still better.
Tim CowChip wrote:Only once in all the distros that I have installed was my builtin block device not sda. I think it was with openSUSE and I was able to rename the block device from sdb to sda.
My point is mostly that there's no limit to the count of removable block devices and that you might add non-removable devices moving the assumed line between removable and non-removable. Also that line never actually existed.
That's up to the OP who created this post and can edit his posts.
Re: XMonad with Salix
Posted: 28. Jun 2012, 09:46
by mimosa
OP must be me

Re: XMonad alongside Ratpoison
Posted: 28. Jun 2012, 17:24
by Tim CowChip
Shador wrote:Tim CowChip wrote:I tested your rule edit and it did not work for me.
I keep saying it ... does not work is sooooo vague ...
I edited the rule with your corrections. I rebooted. I plugged my Sansa e140 into a USB port, Opened caja and did not see an entry labeled sdb1.
I re-edited the rule to the original text from
http://www.monperrus.net/martin/automou ... and+pmount. I rebooted. I plugged my Sansa e140 into a USB port, Opened caja and saw an entry labeled sdb1.
Re: XMonad alongside Ratpoison
Posted: 28. Jun 2012, 17:46
by Tim CowChip
Shador wrote:
Tim CowChip wrote:Only once in all the distros that I have installed was my builtin block device not sda. I think it was with openSUSE and I was able to rename the block device from sdb to sda.
My point is mostly that there's no limit to the count of removable block devices and that you might add non-removable devices moving the assumed line between removable and non-removable. Also that line never actually existed.
.
I have one hard disk in micro atx desktop box. There are two sata ports, but its pretty crowded in there and the one suits my needs. Its always been labeled sda (or hd0), except for the time the openSUSE installer labeled it sdb, because it labeled the USB stick that I was installing from as sda.
Shador wrote:
But nobody can guarantee you that sdb won't ever turn into a builtin device.
I don't see any risk of this happening to me unless I try to re-install openSUSE.
Re: XMonad with Salix
Posted: 28. Jun 2012, 23:57
by Shador
This is working here:
Code: Select all
ACTION=="add", KERNEL=="sd*", ATTRS{removable}=="1", RUN+="/usr/bin/pmount --sync --umask 000 %k"
ACTION=="remove", KERNEL=="sd*", RUN+="/usr/bin/pumount %k"
Notice that 'ATTRS' (not 'ATTR') is needed here so sdc1 is also detected. Because ATTRS also checks parent devices and only sdc has the removable attribute set. During remove attributes are already gone so we can't filter that one, but it shouldn't matter anyway because that unmount is useless (the device is already gone). That's also the reason why using udev for this is not recommended. You might want to remove that remove rule alltogether. I don't think it has any effect because when udev notice you removed the device it's already gone and not all data might have been written back to the device. You should call pumount manually instead before unplugging the device.
Re: XMonad with Salix
Posted: 29. Jun 2012, 00:18
by Tim CowChip
This is what I use to unmount:
Code: Select all
theme transpy
launchbar
exec google-chrome
icon /home/chris/Images/chrome.png
exec firefox
icon /home/chris/Images/fasterfox.png
exec midori
icon /home/chris/Images/midori.png
exec gpodder
icon /home/chris/Images/gpodder.png
exec urxvt -e cmus
icon /home/chris/Images/cmus.png
exec java -jar TED/ted.jar
icon /home/chris/Images/ted.png
exec conky -c Conky/thermometer_v5.conky
icon /home/chris/Images/weather_icon.png
exec urxvt -e ctw --nometric USOR0057
icon /home/chris/Images/weather-icon.png
exec ./pumount
icon /home/chris/Images/sansa.png
exec ./shutty
icon /home/chris/Images/exit.png
~/.pumount
I suppose I could create a ~/.pmount script as well and forget about auto mounting. Thanks for the advice. I'll remove that udev rule as soon as Slackel is done updating (seems as though I didn't escape the mega updates I had with Arch).
Re: XMonad with Salix
Posted: 29. Jun 2012, 01:10
by Shador
If you're umounting manually anyway, automatic mounting should be fine. You don't need the second line for unmounting then (it's useless anyway). The first one is enough to mount automagically:
Code: Select all
ACTION=="add", KERNEL=="sd*", ATTRS{removable}=="1", RUN+="/usr/bin/pmount --sync --umask 000 %k"
Re: XMonad with Salix
Posted: 29. Jun 2012, 01:13
by Tim CowChip
Ok I'll give that a try................still updating Slackel!!!!!!!!!!!!!!!
Re: XMonad with Salix
Posted: 29. Jun 2012, 03:50
by Tim CowChip
Shador wrote:If you're umounting manually anyway, automatic mounting should be fine. You don't need the second line for unmounting then (it's useless anyway). The first one is enough to mount automagically:
Code: Select all
ACTION=="add", KERNEL=="sd*", ATTRS{removable}=="1", RUN+="/usr/bin/pmount --sync --umask 000 %k"
Not to be vague, but it worked*
*I edited the rule with your corrections. I rebooted. I plugged my Sansa e140 into a USB port, Opened caja and saw an entry labeled sdb1.
Re: XMonad with Salix
Posted: 29. Jun 2012, 08:22
by mimosa
Slackel is rolling release, just like Arch. So expect massive updates and less stability.
By the way XMonad seems to have got a bit lost on this thread ...