You are not logged in.

#1 2026-08-13 17:21:00

desktopggg
Member
Registered: 2026-08-13
Posts: 4

Disable xWayland [SOLVED]

I disable XWayland by changing

ExecStart=/usr/bin/gnome-shell --mode=%i

to

ExecStart=/usr/bin/gnome-shell --mode=%i --no-x11

in

/usr/lib/systemd/user/org.gnome.Shell@.service

This change is gone when I update gdm. I want to override the systemd service.

Override attempt 1:

sudo mkdir /usr/lib/systemd/user/org.gnome.Shell@.service.d
sudo vim /usr/lib/systemd/user/org.gnome.Shell@.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/gnome-shell --mode=%i --no-x11

Override attempt 2:

# check the service name.
systemctl --user list-units 'org.gnome.Shell@*'
  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
  org.gnome.Shell@user.service loaded active running GNOME Shell


sudo mkdir /usr/lib/systemd/user/org.gnome.Shell@user.service.d
sudo vim /usr/lib/systemd/user/org.gnome.Shell@user.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/gnome-shell --mode=%i --no-x11

systemd do not see both override.conf files. What is the correct way to override and disable XWayland?

Last edited by desktopggg (2026-08-14 15:23:33)

Offline

#2 2026-08-13 18:28:54

mpan
Member
Registered: 2012-08-01
Posts: 1,639
Website

Re: Disable xWayland [SOLVED]

Hello, and welcome to the forum.

Putting aside gnome-specific stuff and its interaction with xwayland, as I don’t know it, and focusing on editing.

You are not supposed to edit files belonging to a package (except config files). Not only in this case, but in general. Administrator’s own unit files are stored in “/etc/systemd/system”. The manual contains an example of how to override units. The convenient way is, however, to use sudo systemctl edit UNIT. That’s going to open the editor and automatically create a drop-in file. Make sure $EDITOR is set, see Arch Wiki article on evnironment varialbles for some more info.

Last edited by mpan (2026-08-13 18:32:05)

Offline

#3 2026-08-13 18:29:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,523

Re: Disable xWayland [SOLVED]

https://wiki.archlinux.org/title/Systemd#Drop-in_files
(Pay attention to the actual path of the override)

Edit: Merciless Powerful Assassinating Ninja

Last edited by seth (2026-08-13 18:30:24)

Offline

#4 2026-08-14 14:29:11

desktopggg
Member
Registered: 2026-08-13
Posts: 4

Re: Disable xWayland [SOLVED]

seth wrote:

https://wiki.archlinux.org/title/Systemd#Drop-in_files
(Pay attention to the actual path of the override)

Edit: Merciless Powerful Assassinating Ninja

"systemctl edit unit" creates a file in /home/user/.config/systemd/user/org.gnome.Shell@user.service.d/override.conf. A path and file that is writable by the user. Hardened operation systems use the path /etc/systemd/user/

https://github.com/secureblue/secureblue/issues/339
https://github.com/secureblue/secureblue/pull/347

systemd on arch do not see the overrides I made for for org.gnome.Shell@ in the /etc/systemd/user/


/etc/systemd/user/org.gnome.Shell@user.service.d/override.conf and /etc/systemd/user/org.gnome.Shell@.service.d/override.conf both not seen

systemd-analyze --user unit-paths

/root/.config/systemd/user.control
/root/.config/systemd/user
/root/.config/systemd/user.attached
/etc/systemd/user
/run/systemd/user
/root/.local/share/systemd/user
/usr/local/share/systemd/user
/usr/share/systemd/user
/usr/local/lib/systemd/user
/usr/lib/systemd/user

Last edited by desktopggg (2026-08-14 14:54:45)

Offline

#5 2026-08-14 14:51:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,523

Re: Disable xWayland [SOLVED]

systemd on arch do not see the overrides I made for for org.gnome.Shell@ in the /etc/systemd/user/

in your OP you wrote:

sudo vim /usr/lib/systemd/user/org.gnome.Shell@.service.d/override.conf

Edit: did you re-enable the service?

Last edited by seth (2026-08-14 14:52:13)

Offline

#6 2026-08-14 14:56:24

desktopggg
Member
Registered: 2026-08-13
Posts: 4

Re: Disable xWayland [SOLVED]

seth wrote:

systemd on arch do not see the overrides I made for for org.gnome.Shell@ in the /etc/systemd/user/

in your OP you wrote:

sudo vim /usr/lib/systemd/user/org.gnome.Shell@.service.d/override.conf

Edit: did you re-enable the service?

I reboot. I made many overrides for systemd. Systemd see each of them. I think I'm making a mistake with this override

$ systemctl status --user  'org.gnome.Shell@user.service'
● org.gnome.Shell@user.service - GNOME Shell
     Loaded: loaded (/usr/lib/systemd/user/org.gnome.Shell@.service; static)
     Active: active (running) since Fri 2026-08-14 14:47:03 UTC; 12mi
n ago
   Main PID: 3794 (gnome-shell)
      Tasks: 71 (limit: 18744)
     Memory: 282.9M (peak: 295M)
        CPU: 6min 22.108s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/org.gno
me.Shell@user.service
             ├─3794 /usr/bin/gnome-shell --mode=user
             ├─4505 /usr/bin/Xwayland :0 -rootless -noreset -accessx
 -core -auth /run/user/1000/.mutter-Xwaylandauth.R5BRT3 -listenfd 4 -listenfd 5 
-displayfd 6 -initfd 7 -byteswappedclients -enable-ei-portal
             └─4640 /usr/lib/mutter-x11-frames

I got

/etc/systemd/user/org.gnome.Shell@user.service.d/override.conf
/etc/systemd/user/org.gnome.Shell@.service.d/override.conf
/usr/lib/systemd/user/org.gnome.Shell@user.service.d/override.conf
/usr/lib/systemd/user/org.gnome.Shell@.service.d/override.conf

Last edited by desktopggg (2026-08-14 15:01:40)

Offline

#7 2026-08-14 15:09:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,523

Re: Disable xWayland [SOLVED]

Rebootin is not re-enabling, if systemd wants to edit your ~ there's a good chance the service is already linked there.
https://wiki.archlinux.org/title/Systemd#Using_units

Offline

#8 2026-08-14 15:25:20

desktopggg
Member
Registered: 2026-08-13
Posts: 4

Re: Disable xWayland [SOLVED]

I have umask 077 as default umask. user can't read the folder and file after creating them. I had to give the right permissions

sudo chmod 755 org.gnome.Shell@.service.d org.gnome.Shell@user.service.d
sudo chmod 644 org.gnome.Shell@.service.d org.gnome.Shell@user.service.d/override.conf
$ systemctl status --user  'org.gnome.Shell@user.service'
● org.gnome.Shell@user.service - GNOME Shell
     Loaded: loaded (/usr/lib/systemd/user/org.gnome.Shell@.service; static)
    Drop-In: /etc/systemd/user/org.gnome.Shell@user.service.d
             └─override.conf

Offline

Board footer

Powered by FluxBB