Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to mount with user rw not root w/o gdm or a display manager?

Need help with peripherals or devices?
Post Reply
Message
Author
wardbones
Posts: 3
Joined: 2022-01-13 16:17

How to mount with user rw not root w/o gdm or a display manager?

#1 Post by wardbones »

Hi, all,

Love this distro.

I'm not crazy about X all the time so I like to disable gdm but since I've done so pcmanfm mounts my sdcard with root rw rather than me.

I think that's what's going on... Let me know.

Thank so much,
Blessings,

Ward

User avatar
NorthEast
Posts: 348
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 30 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#2 Post by NorthEast »

From: man mount:
The root permissions are necessary to mount a filesystem by default.

wardbones
Posts: 3
Joined: 2022-01-13 16:17

Re: How to mount with user rw not root w/o gdm or a display manager?

#3 Post by wardbones »

Well, right, my friend, in a command line system but I think dbus allows window managers to mount a fs rw under the user account. Everything was like that till I got rid of auto x on start.

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#4 Post by CwF »

sure, under some combo with a pkla rule for udisk2 and maybe systemd units, along with gvfs-fuse or systemd-mount...

wardbones
Posts: 3
Joined: 2022-01-13 16:17

Re: How to mount with user rw not root w/o gdm or a display manager?

#5 Post by wardbones »

Thanks,

I solved it but it was a happy accident. I just unmounted it and mounted it again and it came back owned by me. I did install pmount which is pretty cool. Seems like there are a lot of ways to do this. Hal and dbus seem to be working automatically now. I lost a folder on the drive and need to change my passwords... Ugh...

Thanks, CwF still seems like a good question. Pmount does it with no x-windows, not sure if it can be automated. Gnome-volume-manager does, too, with hal and dbus. You just have to load it in your .xinitrc The gnome-volume-manager program is gone in 11, though.

User avatar
NorthEast
Posts: 348
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 30 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#6 Post by NorthEast »

wardbones wrote: 2022-01-15 03:00 Well, right, my friend, in a command line system but I think dbus allows window managers to mount a fs rw under the user account. Everything was like that till I got rid of auto x on start.
Aha ... you exposed my GUI app limitations.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2497
Joined: 2006-09-24 11:28
Has thanked: 135 times
Been thanked: 134 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#7 Post by canci »

Since you got rid of GDM, there are no authentication agents started via dbus that take care of it. You'll have to start one in your .xinitrc .
Here's my example when I used Mate's Policy Kit daemon in Openbox. It somehow got rid of most of the dbus stuff:

Package name:

Code: Select all

mate-polkit
.xinitrc

Code: Select all

# Policy Kit
/usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1 &
Maybe using the one from LXDE/LxQt would be better, since pcman is their file manager, but not sure what that one's called?

There are also simple daemons just for automounting, like devmon (package: udevil), but not sure if you need those with pcmanfm.
NorthEast wrote: The root permissions are necessary to mount a filesystem by default.
In a modern system, you should ideally never use GUI programmes with root or sudo privileges. In fact, short of updating the system, less experienced users shouldn't have a need to use elevated privileges. Dbus is the preferred way to do mounting these days.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
NorthEast
Posts: 348
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 30 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#8 Post by NorthEast »

Actually, I wrote that man mount "wrote" that. Alas, I guess some of us are still antediluvian and still anchored in the shell.

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#9 Post by CwF »

the most generic agent is
https://packages.debian.org/search?keyw ... lla-search

set rules in /etc/polkit-1/localauthority/ with root, and no password needed if you choose.

With a root account available you then don't need sudo, su, su - su you too, etc.

User avatar
NorthEast
Posts: 348
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 30 times

Re: How to mount with user rw not root w/o gdm or a display manager?

#10 Post by NorthEast »

Thanks CwF. I did have a look at polikit files inspired by this thread but found a lonely couple of configs: AdminIdentities=unix-user:0 and AdminIdentities=unix-group:sudo. I'll look into it.

Post Reply