You are not logged in.

#1 2012-11-23 12:05:51

justdanyul
Member
Registered: 2011-09-29
Posts: 130

systemd and udev

Hello,

I used to be able to have udev rules like:

KERNEL=="sda2",ENV{UDISKS_PRESENTATION_HIDE}="1" 
KERNEL=="sda3",ENV{UDISKS_PRESENTATION_HIDE}="1"

to hide partitions from being shown in file managers and such. This seems to get ignored after systemd got introduced. How come? is systemd managing my devices now? Whats the relationship between the two? And how do i make my udev rules (like the above) work again?

Offline

#2 2012-11-23 15:07:49

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd and udev

systemd doesn't care about your udev rules. Udev's handling of them hasn't changed because of systemd. If you're using udisks2, then I believe there's a different method of hiding partitions.

Offline

#3 2012-11-23 16:02:27

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: systemd and udev

falconindy wrote:

systemd doesn't care about your udev rules. Udev's handling of them hasn't changed because of systemd. If you're using udisks2, then I believe there's a different method of hiding partitions.

but, if nothing has changed, how come they don't work anymore? Is this because of udisks?

Last edited by justdanyul (2012-11-23 16:02:43)

Offline

#4 2012-11-23 16:09:51

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd and udev

I'm going to have to give that question a very stong "maybe"!  Seriously, I am not sure that you have really provided enough clear information for anyone to give you a straight answer here.

I think falconindy gave you a pretty good spot to start there, but it would seem from your response you are simply ignoring it.

Offline

#5 2012-11-25 00:28:21

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: systemd and udev

WonderWoofy wrote:

I'm going to have to give that question a very stong "maybe"!  Seriously, I am not sure that you have really provided enough clear information for anyone to give you a straight answer here.

I think falconindy gave you a pretty good spot to start there, but it would seem from your response you are simply ignoring it.

I wasn't ignoring his answer at all. I'm just trying to understand why the udev rules stopped working, since this have worked for me in the past. I spend my whole adult life developing software, and one thing I have learnt from experience is that attempting to fix a problem by throwing a different technology at it(in this case udisks2), without understanding why what you had where broken in the first place, is not a good plan.

Offline

#6 2012-11-25 01:09:16

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: systemd and udev

You didn't ignore falconindy's answer, but it seems to me you didn't understand it. Udev's handling of rules hasn't changed, but something outside of udev changed - udisks was replaced by udisks2.

Offline

#7 2012-11-25 01:17:26

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: systemd and udev

Gusar wrote:

You didn't ignore falconindy's answer, but it seems to me you didn't understand it. Udev's handling of rules hasn't changed, but something outside of udev changed - udisks was replaced by udisks2.

We'll I certainly didn't take that from the answer, so no I didn't understand him. I am not versed enough in the inner working of udev to interpret "if you use udisk2" to the statement you just posted.
Anyways, thanks for clearing that out smile

Last edited by justdanyul (2012-11-25 01:18:13)

Offline

#8 2012-11-25 01:19:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,784
Website

Re: systemd and udev

udisks2 doesn't "replace" udisks. You can have either or neither or both installed simultaneously, and they'll both work as they were designed to (though you may encounter problems trying to unmount partitions mounted by the other helper).

I believe falconindy was simply saying that any changes to udev's rule handling were not due to it and systemd's merger.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2012-12-10 14:01:27

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: systemd and udev

update,

after a bit of digging around, I finally found that changing UDISKS_PRESENTATION_HIDE to UDISKS_IGNORE fixes this.

I noticed that XFCE page in the wiki( https://wiki.archlinux.org/index.php/Xfce ) has a section called "Hide selected partitions on the desktop", where it says you can use udev rules (identical to the ones I posted) to hide partitions on the desktop. Somebody should update the wiki (i don't want to step on anybody's toes and "just do it")

Offline

#10 2012-12-11 01:28:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: systemd and udev

It is a wiki - it is supposed to get updated as needed by whoever is in a position to do so.

However, since others may not be using udisks2, you should edit it to explain when not to use the method mentioned there and the alternative available in that case. (Rather than, say, just replacing it which won't help people using udisks, for example.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2012-12-18 10:41:27

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: systemd and udev

Ok, I added a bit to the relevant section on the wiki smile

Offline

Board footer

Powered by FluxBB