Xfce add user to group and have it take effect without rebooting - xfce/lightdm

I notice that if I add my username to a group and logout and back in that it doesn't affect my login. I have to reboot in order for it to take. I know that I can create a new login shell (su - $USER) where it does take (for that shell), but I'm curious if there's a way to get the entire environment to reload itself that doesn't require a reboot. I'm using XFCE with LightDM as the display manager.
 
I notice that if I add my username to a group and logout and back in that it doesn't affect my login
That would be odd. Group membership is determined at login. It begs the question, how are you logging in?
 
That would be odd. Group membership is determined at login. It begs the question, how are you logging in?
Via the lightdm login screen, by selecting my user (it's the default and only) and clicking Log In. It's either something LightDM does or XFCE, but it works that way on Linux too. No amount of wishing it was different changes the fact that you can't add a user to a group and "Log out" of XFCE and back in and have any hope of it changing the user's group for any of the subsequent shells (that aren't --login shells or CTL-ALT-FX shells). It seems like every time I ask this question every year or two after I've learned a lot more, it's the same story - are you sure you are logging out and back in :). Sheesh.
 
I notice that if I add my username to a group and logout and back in that it doesn't affect my login. I have to reboot in order for it to take. I know that I can create a new login shell (su - $USER) where it does take (for that shell), but I'm curious if there's a way to get the entire environment to reload itself that doesn't require a reboot. I'm using XFCE with LightDM as the display manager.
service lightdm restart
 
Check if the user has active processes when logging out.

Read from here:
Because there's no session, it has to take care of this kind of thing itself. So the backend daemon code speaks to upower directly, and the greeters ask the daemon to implement their policy decisions.

This is pretty obviously miserable. Now you've got two sets of policy - one at the login screen, and one in your session. How do I ensure they're consistent? The only sane solution is to ignore the functionality the backend provides and have my greeter run gnome-power-manager.

dm-tool()
dm-tool list-seats
 
After reading up, I swapped DMs and read up some more. I'm done with DMs. They're unnecessary cruft in my opinion. The simple option is to edit .bash_profile thusly:

Code:
if [[ -z $DISPLAY ]] && [[ $(tty)=/dev/tty0 ]]; then
startx
fi

But, why bother. Just login and if you want xfce, just run it on demand.
 
How often are you changing the groups of your user, realistically?

Sounds very, very edge case, and probably the behavior of the user is more of the cause of the issue than the behaviour of XFCE/Lightdm in this example, in the sense that "fixing" the DM to support this use case probably isn't worth it for the 99.9% of XFCE users who don't change user groups after initial installation.
 
Not edgy at all. After installing a new service or app, adding a new user, etc, often requires group membership adjustment. LightDM is broken with respect to login and now that I know what I'm looking for, it's a very well known issue and I know several different ways of dealing with it.
 
How often are you changing the groups of your user, realistically?

Sounds very, very edge case, and probably the behavior of the user is more of the cause of the issue than the behaviour of XFCE/Lightdm in this example, in the sense that "fixing" the DM to support this use case probably isn't worth it for the 99.9% of XFCE users who don't change user groups after initial installation.
I've thought exactly that. I think DMs bring some advantages beyond UX. I looked it up in the past but I don't remember anything in particular.
 
Back
Top