Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Mount issues in Xfce4 Desktop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Wed Apr 23, 2014 11:13 am    Post subject: [SOLVED]Mount issues in Xfce4 Desktop Reply with quote

Hi guys,

i tried Xfce4 Desktop this two days, and there's an unsolved issue related with mount.

the result of running command lsblk:
Code:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 298.1G  0 disk
├─sda1   8:1    0     2M  0 part
├─sda2   8:2    0   128M  0 part /boot
├─sda3   8:3    0     4G  0 part [SWAP]
├─sda4   8:4    0    80G  0 part /
├─sda5   8:5    0   134G  0 part /home
└─sda6   8:6    0    80G  0 part
sdc      8:32   1   3.7G  0 disk
└─sdc1   8:33   1   3.7G  0 part
sr0     11:0    1  1024M  0 rom

as you see, sda6 is not used, and sdc1 is usb storage.
when i tried to mount sdc1 in tty1 as non-root user, it complained: mount: only root can do that
and to the worse, in Xfce4 Desktop, there's only one icon of sda6, for mounting! no icons for sdc1!
if i clicked the icon of sda6, it complained: Not authorized to perform operation! (i experted that,
this icon for sda6 donot show in desktop, for it is reversed for other use! if possible, i want it not showed in file manager!)

the content of file /etc/fstab:
Code:
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda2      /boot      ext2      defaults,noatime   0 2
/dev/sda3      none      swap      sw         0 0
/dev/sda4      /      ext4      noatime         0 1
/dev/sda5      /home      ext4      noatime         0 1
/dev/cdrom      /mnt/cdrom   auto      noauto,user      0 0
/dev/sdc1      /mnt      auto      noauto,user      0 0


the content of file /var/lib/portage/world:
Code:
app-editors/vim
net-misc/dhcpcd
sys-boot/grub
sys-kernel/genkernel
sys-kernel/gentoo-sources
x11-base/xorg-server
x11-misc/slim
x11-terms/xfce4-terminal
xfce-base/xfce4-meta
xfce-extra/thunar-volman
xfce-extra/xfce4-battery-plugin
xfce-extra/xfce4-mixer
xfce-extra/xfce4-notifyd
xfce-extra/xfce4-power-manager
xfce-extra/xfce4-volumed

as you see, the needed parts of xfce4 related with auto-mount are already installed!
and i configed the settings > Removale Drivers and Media!
but, they do not work...

Hmm...in short, the issues are:
1) how to mount as non-root user?
2) how to hide the part not listed in fstab? (not allow mount!)

what can i do? any ideas?
any one please give me a hand! thanks!


Last edited by kenmux on Mon Apr 28, 2014 5:16 am; edited 1 time in total
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1637
Location: Switzerland (Romandie)

PostPosted: Thu Apr 24, 2014 12:14 pm    Post subject: Reply with quote

I think mount and how it will be shown into the file managers are 2 different things. You can use /etc/fstab to put options like user or users to allow mount by the users. Or configure what you call "xfce4 automount" (gvfs?). After, I am doubtful a file manager will hide a mounted partition. You can put restrictive access rights on a partition, as example it will show up but the access will not be granted by the system.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Fri Apr 25, 2014 2:16 pm    Post subject: Reply with quote

Dominique_71 wrote:
I think mount and how it will be shown into the file managers are 2 different things. You can use /etc/fstab to put options like user or users to allow mount by the users. Or configure what you call "xfce4 automount" (gvfs?). After, I am doubtful a file manager will hide a mounted partition. You can put restrictive access rights on a partition, as example it will show up but the access will not be granted by the system.


Hmm, how to say...yes, you're right, in some meanings.
the second question, i did similar things before ( long ago when
i just used centos+xp, i hide the xp partion for centos in the grub
config file)
maybe, i just do the same thing?

but, think it in another way, please! for the first question!
i did all the options the wiki and forums posts suggested,
but, unfortunately the system just could not mount usb storage,
either in xfce4 or tty1, as non-root user!
i thought this was the problem that broke the automount of xfce4!

some one said, the ck-launch-session would start dbus itself,
and an additional start of dbus may cause unexpected result, so
i run rc-update del dbus default to remove it from rc starting progress.
some one said, the file manager thunar need no entry in the fstab,
so i just commented the sdc1 in the fstab.
but, it just could not work! it just complained: Not authorized to perform operation!
it just complained: mount: only root can do that!

then, where's the authorization from? how to get it for users?
i wondering, searching, and thinking, but cannot find the answer...
could any one have any goog idea? or someone stucked by the similar issue?
please give me a hand! thanks a lot!
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1637
Location: Switzerland (Romandie)

PostPosted: Fri Apr 25, 2014 4:09 pm    Post subject: Reply with quote

kenmux wrote:
some one said, the ck-launch-session would start dbus itself,
and an additional start of dbus may cause unexpected result, so
i run rc-update del dbus default to remove it from rc starting progress.
some one said, the file manager thunar need no entry in the fstab,
so i just commented the sdc1 in the fstab.
but, it just could not work! it just complained: Not authorized to perform operation!
it just complained: mount: only root can do that!

If it is related to ck-launch-session, this is a console-kit/policy-kit issue. I have no clue here since I removed them from my system it is a long time ago. Thunar work fine without them here.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Sat Apr 26, 2014 2:41 am    Post subject: Reply with quote

Dominique_71 wrote:
If it is related to ck-launch-session, this is a console-kit/policy-kit issue. I have no clue here since I removed them from my system it is a long time ago. Thunar work fine without them here.


so, in your opinion, thunar can mount removable storage without console-kit/policy-kit installed?
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1637
Location: Switzerland (Romandie)

PostPosted: Sat Apr 26, 2014 10:51 am    Post subject: Reply with quote

kenmux wrote:
Dominique_71 wrote:
If it is related to ck-launch-session, this is a console-kit/policy-kit issue. I have no clue here since I removed them from my system it is a long time ago. Thunar work fine without them here.


so, in your opinion, thunar can mount removable storage without console-kit/policy-kit installed?


Of course yes, I can even eject CDROM/DVD from thunar:

Quote:
[ebuild R ] xfce-base/thunar-1.6.3 USE="dbus exif libnotify pcre startup-notification -debug {-test} -udev" XFCE_PLUGINS="trash" 0 kB


Thunar will use whatever it find. For what I understand, the udev flag in thunar trigger udisk which trigger *kit, which is mad because it is both the udisk and udisk2 USE flag in portage.

Note also I have USE="-consolekit -policykit -udisk -udisk2 -upower[/quote]" in make.conf. You can see pmount-gui + *kit free system [lxde kde ...]
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Apr 26, 2014 9:32 pm    Post subject: Reply with quote

kenmux wrote:
where's the authorization from? how to get it for users?
i wondering, searching, and thinking, but cannot find the answer...
could any one have any good idea?

Code:
$ groups
adm tty disk wheel uucp cron audio cdrom dialout video games cdrw usb users plugdev portage

istr disk is used for mounts, and plugdev for removable, but I could be wrong. To add your user to more groups use, eg:
Code:
usermod -a -G disk,plugdev,usb mylogin

See man usermod for more info.

There has been a move to polkit for such authorisation, but typically one ends up adding a javascript(!) rule to match against the traditional groups in any case. Personally I'm fine with just the groups, and don't see any need for a reimplementation. At most I'd add a group for logged-in users if I really had to, though I've always got on with pam, another backend polkit uses. Again, I can't see the point of adding another layer, let alone one with such a bad history and a massive attack vector.
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Mon Apr 28, 2014 4:47 am    Post subject: Reply with quote

Hmm...sorry for late! i did all tests during the past two days, and this issue i thought may be marked as solved!

for the first question, mount doesn't work at all,
just refer to this post: https://forums.gentoo.org/viewtopic-t-858965-highlight-tips+tricks.html
and i found i missed one big thing: add consolekit to rc-update!!! after doing this, all is ok!

for the second question, how to hide an unused partition from desktop,
i googled, and found the solution: add a rule to udev! the steps may be:
1) create a file end with .rules (like 99-hide-partitions.rules) to the path: /etc/udev/rules.d/
2) edit the file, just type: KERNEL=="sda6",ENV{UDISKS_IGNORE}="1"
3) save & quit, reboot the system
then it's done! you'll not see it from desktop, but you can find it by running lsblk, you also can mount it as root in ttys.

to Dominique_71 & steveL:
duo to your two's opinions, i focus the problem on the issues related with *kit.
thanks a lot for your caring. cheers!


Last edited by kenmux on Mon Apr 28, 2014 8:20 am; edited 1 time in total
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Mon Apr 28, 2014 5:05 am    Post subject: Reply with quote

steveL wrote:
istr disk is used for mounts, and plugdev for removable, but I could be wrong.


Hmm...actually, this is just for the systems used hal, not udev. for only hal will create a group plugdev.
i type all the groups in my system: root bin daemon sys adm disk wheel floppy tape video
and users belong to: wheel audio users kenmux

steveL wrote:
There has been a move to polkit for such authorisation, but typically one ends up adding a javascript(!) rule to match against the traditional groups in any case. Personally I'm fine with just the groups, and don't see any need for a reimplementation. At most I'd add a group for logged-in users if I really had to, though I've always got on with pam, another backend polkit uses. Again, I can't see the point of adding another layer, let alone one with such a bad history and a massive attack vector.

in my opinion, consolekit plays a big role for auto mounting as users.
i do not know the role of polikit. (its installation is pulled by other packages, and i just use the default config)


Last edited by kenmux on Mon Apr 28, 2014 8:24 am; edited 2 times in total
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Mon Apr 28, 2014 5:15 am    Post subject: Reply with quote

Dominique_71 wrote:

Of course yes, I can even eject CDROM/DVD from thunar:

Quote:
[ebuild R ] xfce-base/thunar-1.6.3 USE="dbus exif libnotify pcre startup-notification -debug {-test} -udev" XFCE_PLUGINS="trash" 0 kB


Thunar will use whatever it find. For what I understand, the udev flag in thunar trigger udisk which trigger *kit, which is mad because it is both the udisk and udisk2 USE flag in portage.

Note also I have USE="-consolekit -policykit -udisk -udisk2 -upower" in make.conf. You can see pmount-gui + *kit free system [lxde kde ...]


pmount-gui, this sounds interesting! i just want to try it later,
and there's two things confused me: which desktop do you use? can you shutdown/reboot your system as users?
in my opinion, if you want to shutdown/reboot system, you must get the authorization of root to do this.
(this can be done by the help of consolekit & upower???)
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1637
Location: Switzerland (Romandie)

PostPosted: Tue Apr 29, 2014 5:57 pm    Post subject: Reply with quote

I use fvwm-crystal. It can use several ways to logout - restart as user. The simplest is to use sudo.

For that, I have the following in /etc/sudoers.d/dom:
Code:
dom ALL=(ALL) NOPASSWD: /sbin/shutdown
dom ALL=(ALL) NOPASSWD: /sbin/reboot
dom ALL=(ALL) NOPASSWD: /sbin/halt
dom ALL=(ALL) NOPASSWD: /bin/mount
dom ALL=(ALL) NOPASSWD: /bin/umount


It can also use gdm (gdmflexiserrver). I don't know if this will work with current gdm versions. I must try it someday.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Wed Apr 30, 2014 1:44 am    Post subject: Reply with quote

Dominique_71 wrote:
I use fvwm-crystal. It can use several ways to logout - restart as user. The simplest is to use sudo.

For that, I have the following in /etc/sudoers.d/dom:
Code:
dom ALL=(ALL) NOPASSWD: /sbin/shutdown
dom ALL=(ALL) NOPASSWD: /sbin/reboot
dom ALL=(ALL) NOPASSWD: /sbin/halt
dom ALL=(ALL) NOPASSWD: /bin/mount
dom ALL=(ALL) NOPASSWD: /bin/umount


It can also use gdm (gdmflexiserrver). I don't know if this will work with current gdm versions. I must try it someday.

ok, i get it! thanks a lot! Hmm...how to say? yeah...another flavor? less components, but simple & efficient.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu May 01, 2014 2:37 am    Post subject: Reply with quote

kenmux wrote:
in my opinion, consolekit plays a big role for auto mounting as users.
i do not know the role of polikit. (its installation is pulled by other packages, and i just use the default config)

It used to just be udev. Then for every idea that comes along, a new package has to be installed, instead of considering whether it's already handled. For instance:
Quote:
in my opinion, if you want to shutdown/reboot system, you must get the authorization of root to do this.
(this can be done by the help of consolekit & upower???)

I really don't understand why we suddenly need a whole "new" layer to do this; KDE has always been able to shutdown or reboot the machine, for as long I've used it, ie over 15 years. The X display server and afaik the display manager, are already privileged. It would be a poor desktop indeed that couldn't do this, and indeed it's been basic functionality since the 1990s. Feels more like "innovation" for the sake of it.
Back to top
View user's profile Send private message
kenmux
n00b
n00b


Joined: 13 Apr 2014
Posts: 59

PostPosted: Thu May 01, 2014 6:09 am    Post subject: Reply with quote

steveL wrote:
I really don't understand why we suddenly need a whole "new" layer to do this; KDE has always been able to shutdown or reboot the machine, for as long I've used it, ie over 15 years. The X display server and afaik the display manager, are already privileged. It would be a poor desktop indeed that couldn't do this, and indeed it's been basic functionality since the 1990s. Feels more like "innovation" for the sake of it.

hmm...KDE/Gnome is too heavy and too slow for me, i just want a fast and more light weight DE but with full functions.
so, i come from KDE, to Gnome, to Mate, now to Xfce4, and maybe to Openbox later.
in order to let DE be full function, the necessary independent packages (maybe combined to new layer) are encouraged.
thanks to them, we can custom different DEs with different flavors, that are also in line with the philosophy of Gentoo: the choice, you select!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3690
Location: Dallas area

PostPosted: Thu May 01, 2014 9:23 am    Post subject: Reply with quote

steveL wrote:
Quote:
in my opinion, if you want to shutdown/reboot system, you must get the authorization of root to do this.
(this can be done by the help of consolekit & upower???)

I really don't understand why we suddenly need a whole "new" layer to do this


Well it's not needed. But it is part of most DEs. I boot into console mode and run X with startx.
When I'm done I go back to the console.
From there I can do a 3-finger reboot, even logged out, because I'm on the console.
If I need to do shutdown, then I use sudo or become root.
Since most (I would guess >99%) users run single user machines, like windows, then indeed
Quote:
Feels more like "innovation" for the sake of it.

this is true.

It would have been easy to set up each and every desktop with the option of single/multi user.
Single user not needing *kit or those silly authorizations.
And for a local connection all that was ever needed was a "are you sure you want to shutdown/reboot" dialog.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum