

I was experimenting. This might be helpful (https://lemm.ee/post/62662283/20097388)
Just another Reddit refugee
I was experimenting. This might be helpful (https://lemm.ee/post/62662283/20097388)
I found something interesting, thanks to my friend
sudo
access inside swayexec su - xavier666
. It asked for my user password and the command was accepted.groups
output looks normal (xavier666
is now part of sudo
) and my permissions are fineIt is as if this user is an imposter with incorrect privileges 📮
I did it. The issue still lingers. Check my last comment for output.
Great suggestion. I tried this method just now.
Unfortunately, I’m still getting the same bug.
The main difference between the two sessions is the output of the groups
command
In pure tty
$ groups
xavier666 adm cdrom sudo dip plugdev lpadmin lxd sambashare
The moment I enter into sway from inside the tty
$ groups
xavier666 root
Now you know why your mom spent so much time with the Amiga
!lemmysilver
The output of the above command is nearly the same for me.
Even though I have manually added myself to /etc/sudoers
file, my groups
output is very weird.
It’s just xavier666 root
Kind of stumped here.
user-IDs (prefixed with ‘#’)
And I thought it just meant a comment.
Thanks for this, I had no idea.
For i3, the desktop file is like this (present in /usr/share/xsessions
)
[Desktop Entry]
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
TryExec=i3
Type=Application
X-LightDM-DesktopName=i3
DesktopNames=i3
Keywords=tiling;wm;windowmanager;window;manager;
And sway (present in /usr/share/wayland-sessions
)
[Desktop Entry]
Version=1.0
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=/usr/bin/sway
Type=Application
DesktopNames=sway
Gdm probably sums up all the DE from both the wayland and x11 sessions.
There are some files & directories in /etc/gdm3
but I’m too lazy to go through all of them
Init PostSession Prime config-error-dialog.sh greeter.dconf-defaults
PostLogin PreSession PrimeOff custom.conf Xsession
Thanks for your help.
It takes 7+ years to bring a new factory online. more to get all the kinks worked out and at full production
Not to take away from your point but they also have to
Once you have created this factory (which needs to be subsidized by the government in order to compete with the foreign product), we then apply targeted tariffs so that people can slowly shift to the homegrown product. Doing all this can takes decades of careful planning.
Tariff is not an ON/OFF switch which Trump thinks
I won’t give you any free stuff any more
Gives free stuff next year
Gigachad
Check how your environment variables differ between i3 and sway and see if that might be the issue
Just running set
for each session and then diff
should be enough, right?
Just the way I launch sway; via gdm.
As what user are you executing all these ‘groups’ commands?
I’m using my default user (xavier666
)
The “normal” user should not be in the root group, and root should not be in the normal user’s group.
I just made the user a root user/system administrator during the Ubuntu installation process, which is very standard.
Have you done other things beside the “fix” you mentioned?
AFAIK, I haven’t done any changes. This is a single user system.
I checked the contents of /etc/sudoers
and these are the only other lines of significance. I didn’t change them (Why are there signs?)
# User privilege specification
root ALL=(ALL:ALL) ALL
xavier666 ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
That “fix” from your op, btw, looks totally valid to me.
It’s working fine also. However, I believe in “don’t touch what ain’t broke” and “why isn’t it documented?”
However, in my installations I have never touched the sudoer file to make the ONLY user part of sudo
group post install.
Either I’m dumb or I’m launching sway/wayland with improper permissions.
I also can’t find anything on the arch wiki which deals with this.
Why isn’t the same problem happening on i3?
Yeah, I ran it and rebooted it. But no change :(
I’ll do it once more just in case.
I’m unsure how to use the command. I added it to the main Sway config file, which means it’s executed whenever Sway starts (Post login).
However, it didn’t make any difference. I also ran it manually
$ loginctl enable-linger xavier666
$ sudo visudo
[sudo] password for xavier666:
Sorry, user xavier666 is not allowed to execute '/usr/sbin/visudo' as root on <HOSTNAME>.
My lazy hack
If it looks stupid but works, then it’s not stupid
these are all text files
Yeah, it just calls the executable mentioned in the .desktop
file (/usr/bin/sway).
It should not be a GDM, issue, right?
I also checked that I don’t have seatd
installed, which is a “minimal user, seat and session management daemon” mentioned in arch wiki (https://wiki.archlinux.org/title/Sway). Could it be related?
Sorry, I have to go now. More tonight, if you want.
No hurry, the fix I am using is not causing issue. I just want to know why this is happening. This is a fun research problem.
PS: I checked Google and I didn’t find anyone who has faced the same issue.
Inisde i3 WITHOUT FIX
$ groups
xavier666 adm cdrom sudo dip plugdev lpadmin lxd sambashare
$ groups xavier666
xavier666 : xavier666 adm cdrom sudo dip plugdev lpadmin lxd sambashare
Inside sway WITH/WITHOUT FIX
$ groups
xavier666 root
$ groups xavier666
xavier666 : xavier666 adm cdrom sudo dip plugdev lpadmin lxd sambashare
PS: I corrected the username, it should be xavier666
. I corrected the main post.
$ which sway /usr/bin/sway $ sway --version sway version 1.9 $ file $(which sway) /usr/bin/sway: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=70fe358f7e410f618ad8a9ce0e573ed6826b2e75, for GNU/Linux 3.2.0, stripped $ ls -l $(which sway) -rwxr-xr-x 1 root root 600352 Apr 1 2024 /usr/bin/sway
id
pre and post loginuid=1000(xavier666) gid=1000(xavier666) groups=1000(xavier666),0(root) --------------- uid=1000(xavier666) gid=1000(xavier666) groups=1000(xavier666),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),132(lxd),133(sambashare)
A funny thing; I think this has nothing to do with gdm. I have gdm disabled now and launching sway directly from the terminal and the issue still persists.
The problem goes away (
xavier666
becomes part ofsudo
like expected) when I typeexec su - xavier666
for that terminal session only. If I open a new terminal, it problem reappears. I’ll just in case check if zsh/omyzsh is doing something funny.