You are not logged in.

#1 2012-11-05 16:24:38

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Under systemd USB drives are not automounted in XFCE - partly solved

Not sure what I am doing wrong, but after I did a fresh Archlinux netinstall (I thought this would probably be a good way to shift from systemvinit to systemd while creating a fresh clean install) my USB drives do not mount automatically in XFCE as they were before.

I've read several similar threads but found no answer that solves my problem...

I just managed to mount a USB stick manually (sudo mount) and after having done so it is displayed correctly in Thunar.

gvfs and thunar-volman are installed, as are udisks and udisks2

It may have to do with permissions... Any help welcome!

Last edited by zilverling (2012-11-06 20:14:38)

Offline

#2 2012-11-05 18:05:13

Shinmaru
Member
Registered: 2012-09-26
Posts: 3

Re: Under systemd USB drives are not automounted in XFCE - partly solved

zilverling wrote:

Not sure what I am doing wrong, but after I did a fresh Archlinux netinstall (I thought this would probably be a good way to shift from systemvinit to systemd while creating a fresh clean install) my USB drives do not mount automatically in XFCE as they were before.

I've read several similar threads but found no answer that solves my problem...

I just managed to mount a USB stick manually (sudo mount) and after having done so it is displayed correctly in Thunar.

gvfs and thunar-volman are installed, as are udisks and udisks2

It may have to do with permissions... Any help welcome!

I installed:

udiskie

and it mounts it automatically, but it does not appear on my left side panel, but you can find it at:

/run/media/<USERNAME>/

now the question is, how to make it point at that directory?

Offline

#3 2012-11-05 18:18:35

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

You could try an entry in your /etc/fstab which might help show the usb in the left panel

/dev/sdb1 /media/usb auto user,auto 0 0

or adjust it to suit.
I just tried out thunar for another post and my usb showed up fine in the left panel.

Last edited by bgc1954 (2012-11-05 18:19:13)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#4 2012-11-05 18:58:38

doman18
Member
Registered: 2012-11-03
Posts: 9

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Maybe its noob question but i have to ask it. Are you in "storage" group?

cat /etc/group

Offline

#5 2012-11-05 19:04:53

Shinmaru
Member
Registered: 2012-09-26
Posts: 3

Re: Under systemd USB drives are not automounted in XFCE - partly solved

I rebooted my PC and it works.

@doman18
Yeah, I'm into the "storage" group, I never forget to add it on a new install or when I add a new user! ;P

I hope this helps zilverling.

I also did a clean install of Arch with XFCE4.

Offline

#6 2012-11-05 19:30:41

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Thanks for the feedback so far. Useful, but no solution for my problem yet.

@Shinmaru and @doman18 : my user was not in group storage, but after adding this user to the storage group nothing has changed...

I had installed udiskie but see no directory /run/media

@bgc1954 : editing the fstab file failed.

My /etc/fstab looks like this:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs						/tmp	tmpfs	nodev,nosuid	00

# /dev/sda5
UUID=23d6e603-6766-4b29-886e-50755849e16c	/       ext4	rw,relatime	02

# /dev/sda1
UUID=f65d51f4-b563-4bea-9ffd-2fa4889cc916	/boot   ext2	rw,relatime	02

# /dev/sda6
UUID=791ae096-0155-4c82-87c4-a367fdb8d867	/home   ext4    rw,relatime	02

After I added this line

/dev/sdb1 /media/usb auto user,auto 0 0

I couldn't boot into my system anymore...

Offline

#7 2012-11-05 19:34:03

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Did you create the directory?

# mkdir /media/usb

Also if you are using systemd don't add yourself to any groups.  See systemd wiki.  The only group I'm in is users and pcmanfm and thunar both work for me.

Edit: and also if you put noauto in the fstab after user it won't mount until you click on usb in the left panel.  That's why it probably wouldn't boot as the /dev/sdb1 couldn't be mounted.

Last edited by bgc1954 (2012-11-05 19:37:45)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#8 2012-11-05 19:35:48

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Here's what lsusb shows:

$ lsusb
Bus 001 Device 006: ID 125f:c83a A-DATA Technology Co., Ltd. 
Bus 002 Device 002: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 002 Device 003: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 002 Device 004: ID 046d:c047 Logitech, Inc. Laser Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The first device is the unmounted USB stick

fdisk generates this info:

Disk /dev/sdb: 8086 MB, 8086618112 bytes, 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x713d3448

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0      376831      188416   17  Hidden HPFS/NTFS

Disk /dev/sdb1: 192 MB, 192937984 bytes, 376832 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x713d3448

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0      376831      188416   17  Hidden HPFS/NTFS

Offline

#9 2012-11-05 19:39:53

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@bgc1954 I don't know if it is because I now created a directory /run/media but my USB-drive is now mounted automatically! :-)

I will remove myself from all groups (except users) and see if it still works.

Offline

#10 2012-11-05 19:40:32

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Maybe a dumb question but do you have ntfs-3g installed so  you can read/write the contents of the ntfs files on the usb?  See ntfs-3g wiki.

Edit: it seems I'm a tad slow.

Last edited by bgc1954 (2012-11-05 19:45:09)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#11 2012-11-05 20:10:19

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@bgc1954 I hadn't installed ntfs-g3 but could read the contents of my USB stick. It was an archlinux ISO install USB stick. However, it seems useful to install ntfs-g3 and I have done so now.

I have also discovered what made the USB stick mount: I had issued the udiskie command.

However, it is then impossible to Eject via Thunar (Error: "Failed to eject [diskname] Not authorized to perform operation" and unclear how I can umount via udiskie...

All in all not really a "solution" to my problem.

Offline

#12 2012-11-05 20:29:16

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Another detail that may be relevant: I use SLiM as login manager.

Offline

#13 2012-11-05 20:51:30

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

I would have pointed you to the udiskie wiki but it seems it isn't updated and still has references to consolekit which is now defunct.  There seem to be alot of posts lately with people having mounting problems now that polkit has taken over from consolekit.  As I said before, I'm not having your problem so am not sure where to point you ATM.  I don't think slim is your problem but it has caused problems in the past.  I use xdm which is lightweight as well and doesn't seem to have the perpetual problems of slim but It's probably unrelated.  Maybe you should try a

# systemctl status polkit.service

to see if your polkit is behaving.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#14 2012-11-05 20:57:32

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@bgc1954 Thanks for all your attention to this issue.

Polkit service looks fine:

$ systemctl status polkit.service
polkit.service - Authorization Manager
	  Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
	  Active: active (running) since Mon, 2012-11-05 20:49:50 CET; 1h 5min ago
	    Docs: man:polkit(8)
	Main PID: 277 (polkitd)
	  CGroup: name=systemd:/system/polkit.service
		  └ 277 /usr/lib/polkit-1/polkitd --no-debug

Offline

#15 2012-11-05 21:02:04

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@bgc1954 I see there are several flavours of xdm in the repositories. Which package have you installed?

Offline

#16 2012-11-05 22:45:59

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

Re: Under systemd USB drives are not automounted in XFCE - partly solved

The package for xdm is xorg-xdm. xdm-archlinux is only a theme for xdm.

Offline

#17 2012-11-06 04:25:07

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

as anonymous_user has stated xorg-xdm is what I use but I use a modified xdm-archlinux theme which has a dark background with a custom archlinux logo.  Xorg-xdm by itself is rather ugly.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#18 2012-11-06 10:56:53

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Funny, just switched on my USB hard drive with four partitions and one of them automounts fine even without issuing the udiskie command, whereas the other three are displayed in thunar, but do not open and  produce this error:

Failed to mount 80GB Volume
Error mounting /dev/sdc4 at /run/media/erik/e3c755e5-1022-4da7-9c75-8b851cebcba4: Command-line `mount -t "xfs" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdc4" "/run/media/erik/e3c755e5-1022-4da7-9c75-8b851cebcba4"' exited with non-zero exit status 32: mount: unknown filesystem type 'xfs'

At the same time the USB stick from my previous posts on this issue is also plugged in and does not show up in thunar.

$ sudo fdisk -l
[sudo] password for erik: 

Disk /dev/sda: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc6616dca

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      192779       96358+  83  Linux
/dev/sda2          192780   625137344   312472282+   5  Extended
/dev/sda5          192843    58796031    29301594+  83  Linux
/dev/sda6        58797963   621233549   281217793+  83  Linux
/dev/sda7       621233613   625137344     1951866   82  Linux swap / Solaris

Disk /dev/sdb: 8086 MB, 8086618112 bytes, 15794176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x713d3448

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0      376831      188416   17  Hidden HPFS/NTFS

Disk /dev/sdb1: 192 MB, 192937984 bytes, 376832 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x713d3448

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0      376831      188416   17  Hidden HPFS/NTFS

Disk /dev/sdc: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00038204

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   156296384    78148161   83  Linux
/dev/sdc2       156296385   312576704    78140160   83  Linux
/dev/sdc3       312576705   468857024    78140160   83  Linux
/dev/sdc4       468857025   625137344    78140160   83  Linux

Offline

#19 2012-11-06 17:53:01

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

Just wondering if you have still got an entry in /etc/fstab for /dev/sdb1.  If you want your other drives to show in the side panel you might need to enter those in your fstab and mkdir for each.  That's the only thing I can think of why mine works and yours doesn't.  And the error seems to be telling you it can't read an xfs partition so how are those partitions formatted--I can see they say linux but are they actually xfs partitions or ext3,  ext4, etc.

edit: do you have xfsprogs installed?

Last edited by bgc1954 (2012-11-06 18:26:34)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#20 2012-11-06 18:01:14

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Under systemd USB drives are not automounted in XFCE - partly solved

post your slim.conf, your ~/.xinitrc and the output of the following:

loginctl show-session $XDG_SESSION_ID

Offline

#21 2012-11-06 18:37:33

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,122

Re: Under systemd USB drives are not automounted in XFCE - partly solved

I just reinstalled thunar to play around with it and I have found that if I comment out my entries for hdd, and usb, they do not appear in the side panel.  As soon as I uncomment them again, they show up and are mountable and can be ejected.  Hmmm.....


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#22 2012-11-06 19:02:08

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@bgc1954 I do have xfsprogs installed, that's the strange thing. The partitions are all xfs if I remember well. I used xfs for several years until switching to ext4 some two years ago.

There's no entry for /dev/sdb1 in my fstab file.

@65kid

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth 

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	yes

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce4,icewm-session,wmaker,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user        simone

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       default

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

.xinitrc in my home dir:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
exec dbus-launch --exit-with-session startxfce4
export DE=xfce
# ...or the Window Manager of your choice
$ loginctl show-session $XDG_SESSION_ID
Id=2
Timestamp=Tue, 2012-11-06 11:44:02 CET
TimestampMonotonic=8298176200
DefaultControlGroup=name=systemd:/user/erik/2
VTNr=7
Display=:0.0
Remote=no
RemoteUser=root
Service=slim
Leader=269
Audit=2
Type=x11
Class=user
Active=yes
State=active
KillProcesses=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
Name=erik

Offline

#23 2012-11-06 19:05:41

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Under systemd USB drives are not automounted in XFCE - partly solved

replace your ~/.xinitrc with /etc/skel/.xinitrc and simply add

exec startxfce4

at the end, no need for dbus-launch, this may be the problem.

If /etc/skel/.xinitrc doesn't exist, install xorg-xinit.

Offline

#24 2012-11-06 19:59:30

zilverling
Member
From: Utrecht, Netherlands
Registered: 2009-08-19
Posts: 56

Re: Under systemd USB drives are not automounted in XFCE - partly solved

@65kid Change in .xinitrc does the trick for my USB harddrive (with 4 xfs formatted partitions): all automount correctly. The NTFS USB drives still don't automount, but looking at the ntfs-3g wiki I see that mounting NTFS partitions is more complicated, so I will see if I can figure out a good solution for that later on. The rest of the week I'm on another machine, so I cannot play around further with this problem. Thanks for your help!

Offline

#25 2012-11-06 23:51:29

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

Re: Under systemd USB drives are not automounted in XFCE - partly solved

How is NTFS more complicated? The text in the wiki page is just for manual mounting and putting an entry in fstab.

Ntfs-3g is needed for write access, however, Xfce should automount it the same as any other filesystem on a USB drive.

Offline

Board footer

Powered by FluxBB