unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Broken KDE initialization with `guix home`
@ 2022-05-13 17:41 Philip McGrath
  2022-05-19 21:37 ` Philip McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Philip McGrath @ 2022-05-13 17:41 UTC (permalink / raw)
  To: help-guix

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. A few applications are supposed to be pinned to the "Icons-only 
Task Manager" component of the default panel: "System Settings", 
"Discover" (c.f. Gnome Software), the file manager, and the browser. All 
of them show a blank paper icon instead of the actual icon. For the 
first two, hovering shows a tooltip reading "systemsettings.desktop" or 
"org.kde.discover.desktop", respectively, and clicking produces an error 
notification from "Plasma Workspace" saying "Unknown application 
folder". For the later two, the tooltip is blank, and the error message 
says "preferred://filemanager" or "preferred://browser", respectively. 
(Presumably these ought to be handled via KIO.)

Using KRunner also doesn't recognize available desktop entries, e.g. 
typing "kon" shows an item "Get Konsole…", which tries to install 
Konsole but actually produces an error window with titled "Error — KIO 
Client" saying "appstream://org.kde.konsole.desktop". However, typing 
"konsole" does get KRunner to offer to run the command, which it finds 
successfully in "/usr/bin/konsole". Inside the Bash shell Konsole 
starts, the output of `env` looks like I would expect, unless I'm 
missing something: in particular, `echo $XDG_DATA_DIRS` shows an entry 
for "/usr/share" in the search path, where the desktop files are e.g. 
"/usr/share/applications/org.kde.konsole.desktop".

I've also tried switching to a different tty and logging in to a 
non-graphical session. It also has expected results from `env`.

-Philip


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Broken KDE initialization with `guix home`
  2022-05-13 17:41 Broken KDE initialization with `guix home` Philip McGrath
@ 2022-05-19 21:37 ` Philip McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Philip McGrath @ 2022-05-19 21:37 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-19 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 17:41 Broken KDE initialization with `guix home` Philip McGrath
2022-05-19 21:37 ` Philip McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).