Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Should Xsession source /etc/profile ? [snapd]

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
bronekk
Posts: 1
Joined: 2023-08-25 15:22

Should Xsession source /etc/profile ? [snapd]

#1 Post by bronekk »

I've managed to fix problem with snaps not working in Debian 12 correctly by adding the following file to /etc/X11/Xsession.d/ :

Code: Select all

. /etc/profile
export PATH
export XDG_DATA_DIRS
However I do wonder if there's a better fix, given that apparently before my change Xsession was not sourcing /etc/profile and things were generally not failing ? Or in, as put in subject - should /etc/profile be sourced by Xsession at all ?

In case anyone is interested what specific problem this fixed, read on:

I noticed that after installing zoom-client snap, its functionality is somewhat limited. I identified the problem as the window manager (xfce4-session in my case) being unaware of PATH and XDG_DATA_DIRS changes required by snap (in general, not just Zoom). These changes are put by snap installer in /etc/profile.d/apps-bin-path.sh Aside from some minor inconveniences (no zoom-client in path nor in application launcher) this also caused a bigger problem: inability to login to Zoom using external authentication (e.g. Google) or open Zoom links. This functionality is achieved by a web browser, which in turn relies on configuration of zoommtg MimeType, which in turn relies on XDG_DATA_DIRS having included /var/lib/snapd/desktop/ I understand these would all work, had /etc/profile.d/apps-bin-path.sh (or, more generally, /etc/profile) been sourced by Xsession. Hence, the solution as above.

Asking because I feel like I missed something important, after all /etc/profile and Xsession are decades old. So it's not like sourcing one by the other should be a new idea (in fact I saw some heated discussion on the topic, elsewhere). Also, I vaguely remember this actually working without any messing from my side in Debian 11

Post Reply