XMonad with Salix

Other talk about Salix
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: XMonad alongside Ratpoison

Post 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.
Tim CowChip wrote: I didn't mean for http://www.monperrus.net/martin/automou ... and+pmount to be the "XMonad" thread, but for this thread to be the "XMonad" thread.
Maybe just remove the "alongside Ratpoison"
That's up to the OP who created this post and can edit his posts.
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: XMonad with Salix

Post by mimosa »

OP must be me 8-)
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: XMonad alongside Ratpoison

Post 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.
ImageImage
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: XMonad alongside Ratpoison

Post 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.
ImageImage
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: XMonad with Salix

Post 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.
Image
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: XMonad with Salix

Post 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

Code: Select all

#!/bin/bash
pumount /media/sdb1 &
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).
ImageImage
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: XMonad with Salix

Post 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"
Image
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: XMonad with Salix

Post by Tim CowChip »

Ok I'll give that a try................still updating Slackel!!!!!!!!!!!!!!!
ImageImage
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: XMonad with Salix

Post 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.
ImageImage
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: XMonad with Salix

Post 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 ...
Post Reply