You are not logged in.

#1 2022-08-05 11:22:13

Registered: 2022-08-05
Posts: 1

[SOLVED] Some GUI applications start slowly due to broken xinitrc


Some applications consistently take 10, 20 or even 50 seconds to start, including gedit, nautilus, nemo, firefox just to name a few. But other applications are unaffected such as gimp, discord or kdenlive.


This issue is probably caused by a broken xinitrc that doesn't activate dbus.

In my case when I installed dwm window manager, somewhere I saw I need to create a new ~/.xinitrc and put `exec dwm` in it. Since it "worked", I didn't bother looking into how I should set up my xinitrc. But after reading the Arch wiki on xinit, I know I should've copied /etc/X11/xinitrc to ~/.xinitrc and edited that instead of making a new from scratch.


Make sure you have dbus activation somewhere in your xinitrc. By default /etc/X11/xinitrc sources /etc/X11/xinitrc.d/ which contains the dbus activation. If you've created your own from scratch, then you should append this to your ~/.xinitrc before any `exec` command.

. /etc/X11/xinitrc.d/

Or if you don't have /etc/X11/xinitrc.d/ for some reason or just don't want to source other scripts, simply add this to your xinitrc (again, before any `exec` command):

systemctl --user import-environment DISPLAY XAUTHORITY
dbus-update-activation-environment DISPLAY XAUTHORITY

Of course you need to have dbus installed and running for this to work, run `systemctl status dbus` to check if its running.

PS: I know this topic was discussed a few times before, but I only found the solution from old topics where after several unrelated discussions later someone mentioned to check the xinitrc configuration. I haven't found `dbus-update-activation-environment` command anywhere when searching for my issue, that's the main reason I made this topic.


#2 2022-08-05 11:27:08

Registered: 2012-09-01
Posts: 9,447

Re: [SOLVED] Some GUI applications start slowly due to broken xinitrc


Board footer

Powered by FluxBB