r/linuxquestions Why do some GTK apps start up slow when not using a display manager?

posted by u/max_bredenvlet on 23 Jan 2021

I like to start my window manager directly without a display manager by just logging into the tty and using xinit and startx to start it. When I do this, modern GTK apps like Evince, Nautilus and Thunar start verly slowly. It takes them about 30 seconds to launch with no error messages. This is not the case with PCmanFM or LXAppearance, both older programs. When I use LightDM as my display manager and start my window manager from there, I don't have that problem. This happens with several different window managers. Apparently the DM launches some process that these programs depend on? I use Debian Buster btw, but it was the same in Arch.

posted by u/dannycolin on 23 Jan 2021 3▲

I had a similar problem and I found out it was due to dbus. I added the following line in my ~/.xinitrc file and it solved the issue:

dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

posted by u/max_bredenvlet on 24 Jan 2021 1▲

Awesome, thanks, I'll give it a try.

posted by u/FineBroccoli5 on 23 Jan 2021 1▲

I noticed the same a while back no idea why it happens tho.

The only remotly possible thing I can think of is that the DM loads GTK first and so the next program that uses it loads faster, but I have no idea if it's the case.

posted by u/dannycolin on 23 Jan 2021 1▲