You are not logged in.

#1 2012-07-10 12:00:59

crowhill
Member
Registered: 2009-02-04
Posts: 11

[SOLVED] systemd-tools / udev / rules

Hi, there.

Finally, I tried installing archlinux again ...

The installation of the base system was straight forward. Also, I think I managed to properly set up X by following the instructions at https://wiki.archlinux.org/index.php/Be … _Interface . Then I installed openbox and edited ~/.xinitrc by following https://wiki.archlinux.org/index.php/Xinitrc (to sart openbox). To start X at boot I used the info at https://wiki.archlinux.org/index.php/Start_X_at_boot .

Unfortunately, I didn't quite understand how to enable automatic mounting of external volumes such as USB drives. While searching for a solution I came accross https://wiki.archlinux.org/index.php/Udev , which is about Udev. Then I learned that to get Udev I need to install systemd-tools (see https://www.archlinux.org/packages/core … emd-tools/ ).

My question is this: what happens if I install systemd-tools? I mean, after installing it, do I need to write a "rules" file for Udev? If that is so, is there a default rules file that works "in most cases"? If I do not need to write rules, does this mean that external volumes will automaticall be mounted once systemd-tools is installed?

I'm hoping that once systemd-tools is installed pcmanfm will detect my USB drive automatically. Is that true or is additional tweaking required?

Many thanks for your help!

Best whishes,
Crowhill

Last edited by crowhill (2012-07-12 09:20:32)

Offline

#2 2012-07-10 15:55:55

SolarBoyMatt
Member
Registered: 2012-01-07
Posts: 263

Re: [SOLVED] systemd-tools / udev / rules

If you did a net-install you should already have systemd-tools since it's what provides udev now, and udev is part of the base system, so you should have it regardless. Otherwise do an upgrade. And you might want to make sure udisks/udisks2 and dbus are installed for automounting with pcmanfm.

Last edited by SolarBoyMatt (2012-07-10 16:02:30)

Offline

#3 2012-07-10 18:21:46

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

Great! Thanks a lot for the reply. I'll check it out ...

Cheers,
Crowhill

Offline

#4 2012-07-11 09:56:00

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

SolarBoyMatt wrote:

And you might want to make sure udisks/udisks2 and dbus are installed for automounting with pcmanfm.

Actually, after some playing around, I like the file manager "ranger" better than "pcmanfm".

In "pcmanfm" I have to click on the usb stick to mount it. What's the command for this? Simply mount /media/<TAB> doesn't work; there is no completion.

If I don't install "pcmanfm", will the above command still work or is it "pcmanfm"-specific? If the latter is true, is there an alternative, "pcmanfm"-independent command?

Many thanks again,
cheers,

Crowhill

Last edited by crowhill (2012-07-11 10:01:35)

Offline

#5 2012-07-11 11:31:35

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] systemd-tools / udev / rules

you can use udiskie for fm independent automounting.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2012-07-11 11:36:53

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

Mr.Elendig wrote:

you can use udiskie for fm independent automounting.

Sweet! This is precisely what I was looking for.

Many thanks,
Andreas

Offline

#7 2012-07-11 15:36:01

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

Mr.Elendig wrote:

you can use udiskie for fm independent automounting.

OK, I installed systemd-tools, dbus and udiskie. Also, I added & udiskie to my ~/.xinitrc.

Now, if I insert my USB stick, there's neither an entry in /media nor in /run. Therefore, I wonder how I get auto-mounting of USB devices to work.

The relevant parts of my setup consist of (so far):

- x
- openbox
- ranger

Thanks a bunch,
cheers,
Crowhill

Offline

#8 2012-07-11 15:56:16

SolarBoyMatt
Member
Registered: 2012-01-07
Posts: 263

Re: [SOLVED] systemd-tools / udev / rules

Could you post your ~/.xinitrc? If you really did put "& udiskie" instead of "udiskie &", that could be an issue. You also need to start udiskie before openbox is started. Before any of that though, make sure everything is working alright by just running "udiskie &" in a terminal and see if anything appears in /media.

https://wiki.archlinux.org/index.php/Udiskie

Last edited by SolarBoyMatt (2012-07-11 16:07:28)

Offline

#9 2012-07-11 16:11:54

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

To begin, I copied /etc/skel/.xinitrc to ~/.xinitrc. Now, from how I remember (no access to the Linux box right now), I added

udiskie &
exec ck-launch-session openbox-session

to ~/.xinitrc. I'm certain that & udiskie was a typo in my previous post.

Also, I appended dbus to DAEMONS in my /etc/rc.conf.

Any ideas?

I noticed that even with "pcmanfm" I first had to click on the usb stick to mount it. What's the command line equivalent of this click?

For the purpose of the simplicity of the installation, are all of systemd-tools, dbus and udiskie (actually I just installed python2-udiskie) required?

Many thanks,
Crowhill

Offline

#10 2012-07-11 16:18:59

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

Note: the command dmesg | tail shows that the usb stick is connected. However, the folder /media is empty.

Offline

#11 2012-07-11 16:34:05

SolarBoyMatt
Member
Registered: 2012-01-07
Posts: 263

Re: [SOLVED] systemd-tools / udev / rules

dbus is needed for using udisks to mount in pcmanfm, and I belive clicking on the usb stick is the intended behavior. At least it's always been that way for me. So I guess you can get rid of dbus if you don't plan on using pcmanfm or any other package that uses it.

Right now, my only guess is that you might need to configure polkit/consolekit to work with udiskie (you do have both of those installed, right?). The udiskie article in the wiki has instructions for that.

Last edited by SolarBoyMatt (2012-07-11 16:34:30)

Offline

#12 2012-07-11 16:49:58

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [SOLVED] systemd-tools / udev / rules

Doesn't udiskie need the consolekit permissions though? So try using this line:

exec ck-launch-session bash -c "udiskie & openbox-session"

Offline

#13 2012-07-11 17:01:46

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: [SOLVED] systemd-tools / udev / rules

Are the disks being mounted under /run/media ?
https://mailman.archlinux.org/pipermail … 25994.html

Offline

#14 2012-07-11 17:54:26

martadinata
Member
Registered: 2012-01-26
Posts: 26

Re: [SOLVED] systemd-tools / udev / rules

do you already set pcmanfm to mount on insert?

Last edited by martadinata (2012-07-11 17:54:59)

Offline

#15 2012-07-12 07:10:20

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

Hi, there.

My arch-box is within reach again and the problem is now solved.

In ~/.xinitrc I replaced

udiskie &
exec ck-launch-session openbox-session

with

exec ck-launch-session bash -c "udiskie & openbox-session"

Now, I can insert a USB device, which then automatically shows up in the directory /media. This is even better than the "pcmanfm"-click-procedure.

Thanks a bunch to "anonymous_user"!

Next time, I'll read the relevant package entries more carefully; the solution can be found at the Udiskie-page.

How (where) do I mark this thread as solved?

Many thanks,
until the next time,
cheers,
Crowhill

Offline

#16 2012-07-12 09:08:06

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] systemd-tools / udev / rules

crowhill wrote:

Next time, I'll read the relevant package entries more carefully; the solution can be found at the Udiskie-page.

Happens to everyone. The key is to make sure it only happens once or twice smile

crowhill wrote:

How (where) do I mark this thread as solved?

Edit the first post and change the title.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#17 2012-07-12 09:56:28

crowhill
Member
Registered: 2009-02-04
Posts: 11

Re: [SOLVED] systemd-tools / udev / rules

ADDENDUM

When I connected my external HD to a USB port, my "solution" was no longer working.

From the site Udiskie I however learned that I need to create the file

/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla

and write

 [Local Users]
 Identity=unix-group:storage
 Action=org.freedesktop.udisks.*
 ResultAny=yes
 ResultInactive=no
 ResultActive=yes

into it (both as root). After a further reboot the external HD showed up in /media when I connect it.

Cheers,
Crowhill

Offline

Board footer

Powered by FluxBB