help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken KDE initialization with `guix home`


From: Philip McGrath
Subject: Re: Broken KDE initialization with `guix home`
Date: Thu, 19 May 2022 17:37:03 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Hi,

On 5/13/22 13:41, Philip McGrath wrote:
Hi,

I'm trying to start using `guix home` on a fairly fresh install of Kubuntu 22.04 with SDDM and the KDE Plasma Wayland session. I'm running in to some problems when the session starts up: I suspect some environment variables may not be getting set when they need to be, but the symptoms are confusing: does anyone know what might be going on?

When I log in from SDDM (again, to a Wayland session, not X11), I see a splash screen with a spinner for a while, then the screen goes black. I've found at this point I can use the Alt-Space shortcut to access KRunner, which lets me run `plasmashell --replace` (and evidently finds "/usr/bin/plasmashell").

That gets a desktop to appear, but there are more problems. The "Application Launcher" menu doesn't show any desktop entries: there are "Favorites" and "All Applications" submenus (no others), but they are empty. [...]


I've found at least a workaround, maybe even a solution, though some of this might constitute a bug in Guix Home.

Looking into the symptoms, I found the `kbuildsycoca5` command to rebuild KDE's cache of .desktop files. It initially reported the error:

    kf5-applications.menu not found in ()

That file existed in /etc/xdg/menus/, but I discovered that XDG_CONFIG_DIRS was set to:

  /home/philip/.config/kdedefaults:/home/philip/.guix-home/profile/etc/xdg:

i.e. ending with ":" rather than ":/etc/xdg".

Creating a file /etc/profile.d/99-guix-home-hack.sh with the content:

    export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"

and rebooting was enough to get Plasma Shell to start normally, though I still had to run `kbuildsycoca5` manually to get the launcher menu entries and panel items to work.

I think it might be better to change this code from 'environment-variables->setup-environment-script' in '(gnu home services)':

case $XDG_CONFIG_DIRS in
  *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
  *) export XDG_CONFIG_DIRS=$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFIG_DIRS 
;;
esac

To likewise use `${XDG_CONFIG_DIRS:-/etc/xdg}`.

I'm not any kind of expert on the XDG specs, but I read e.g. "If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used." to apply only to the whole variable being "", not to an empty element in the colon-separated list. At least, if KDE behaves this way, I imagine others do, too.

In the same place, the handling of MANPATH and INFOPATH seem fine, because they have specified behavior for a trailing ":". On the other hand, XDG_DATA_DIRS seems like it would have the same problem if it weren't for the fact that, for me, other scripts in /etc/profile.d/ have already added items and included the default tail. I similarly suspect the handling of XCURSOR_PATH might be related to an odd issue where the cursor disappears when hovering over the border of a window (even though this is Wayland), but I need to investigate that further.

On I somewhat-related note, I had previously relied on GUIX_LOCPATH being set by /etc/profile.d/guix.sh, but now, because $HOME/.guix-profile doesn't exist, it isn't set there. I've set it in my home configuration, but it seems like it would be better to provide analogous automatic support.

-Philip



reply via email to

[Prev in Thread] Current Thread [Next in Thread]