Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions startlxqt.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@ export XDG_MENU_PREFIX="lxqt-"

export XDG_CURRENT_DESKTOP="LXQt"

# set environment variables for new units started by user service manager
if command -v systemctl >/dev/null; then
systemctl --user import-environment XDG_CURRENT_DESKTOP
Copy link
Contributor

@palinek palinek Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we push the variable into the systemd environment block for the sake of running lxqt-session, then we probably should also remove it (systemctl --user unset-environment) after lxqt-session's end.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's needed, because it seems that these variables are imported to the systemd user environment anyway, the systemctl --user show-environment command lists them after login. This explicit import just ensures that it happens early enough before the XDG Desktop Portal service starts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember login from tty with startx with xfwm4 it was needed, but I'm not sure if DMs play a role in set/unset here too.

fi

# Start the LXQt session
exec lxqt-session