Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
env: set XDG_DATA_DIRS for wayland et.al. #3398
Conversation
zyga
reviewed
Jun 8, 2017
+1 on the effort but I think this needs to be managed better across distributions and other files that serve the same purpose (though get sourced in different ways)
CC @morphis
| @@ -0,0 +1,6 @@ | ||
| +# set XDG_DATA_DIRS for snapd provisioned desktop files. | ||
| +if [ "${XDG_DATA_DIRS#*snapd}" = "${XDG_DATA_DIRS}" ]; then |
|
This very much looks like a copy of https://github.com/snapcore/snapd/blob/master/etc/X11/Xsession.d/65snappy Can't we link both somehow? |
|
What's the status of this PR? |
ogra1
approved these changes
Aug 4, 2017
since this currently blocks snap usage in wayland altogether and since wayland wont ever parse /etx/X11/Xsession.d (i was told) ... i'm approving this as interim solution
jdstrand
reviewed
Aug 21, 2017
+1 on the contents of the file, but -1 on the name of the file.
'snapd.sh' is actually referenced in ./packaging/opensuse-42.2/snapd.spec and ./packaging/arch/PKGBUILD.
I suggest renaming the file 'snapd-xdg-data-dirs.sh'.
Also, can you update ./packaging/opensuse-42.2/snapd.spec and ./packaging/arch/PKGBUILD to do for this file what they are doing for apps-bin-path.sh?
|
Unless anybody objects I'm going to take over this PR, and unify all this into a single file. Ubuntu and Debian would ship it as |
ogra1
reviewed
Aug 25, 2017
/etc/profile.d is not picked up by Xsession, it only applies to shells under X11 (but due to a hack is read for wayland sessions)...
for plain X11 the existing /etc/X11/Xsession.d/65snappy still needs to persist
|
are you sure profile.d isn't picked up by X? I moved 65snappy to /etc/profile.d/snapd.sh and started unity, xfce and jwm (heh) and in all cases |
ogra1
reviewed
Aug 25, 2017
"ps eww of the toplevel process" is surely a shell in this case ... apps are usually not executed under a shell but directly, you would have to dump the env out of a C app that is launched from a .desktop file to find out ...
|
I mean I do this:
so then
|
pedronis
added
the
Blocked
label
Aug 29, 2017
|
@chipaca is working on adjusting this |
chipaca
added some commits
Aug 29, 2017
chipaca
removed
the
Blocked
label
Aug 29, 2017
mvo5
approved these changes
Aug 29, 2017
Thanks for your work on this, this looks much nicer than before.
| @@ -117,6 +117,7 @@ endif | ||
| # XXX: hacky | ||
| $(MAKE) -C cmd distclean || true | ||
| $(MAKE) -C data/systemd clean | ||
| + $(MAKE) -C data/env clean |
| @@ -130,6 +131,9 @@ override_dh_auto_build: | ||
| cd cmd && ( ./configure --prefix=/usr --libexecdir=/usr/lib/snapd $(VENDOR_ARGS)) | ||
| $(MAKE) -C cmd all | ||
| + # Generate the env snippet | ||
| + $(MAKE) -C data/env all |
| @@ -106,6 +106,7 @@ endif | ||
| # XXX: hacky | ||
| $(MAKE) -C cmd distclean || true | ||
| $(MAKE) -C data/systemd clean |
|
Fwiw, both lightdm and gdm3 load /etc/profile which in turn will load /etc/profile.d (in gdm3-3.24.1/data/Xsession.in and lightdm-1.22.0/debian/lightdm-session). |
jdstrand
reviewed
Aug 29, 2017
I like the direction of this PR much more. Thanks for addressing my concerns (and more!) :)
| Pre-Depends: dpkg (>= 1.15.7.2) | ||
| -Description: Transitional package for snap-confine | ||
| +Description: Transitional package for snapd |
| @@ -1,10 +0,0 @@ | ||
| -[Unit] |
mvo5
added this to the 2.28 milestone
Aug 29, 2017
|
@chipaca Thanks for working on this. The current error looks related:
|
|
@niemeyer yes, looking into why we're getting a directory there. Probably some silly error on my end. |
codecov-io
commented
Aug 30, 2017
Codecov Report
@@ Coverage Diff @@
## master #3398 +/- ##
=========================================
+ Coverage 75.63% 75.7% +0.06%
=========================================
Files 407 407
Lines 35028 35268 +240
=========================================
+ Hits 26494 26698 +204
- Misses 6654 6687 +33
- Partials 1880 1883 +3
Continue to review full report at Codecov.
|
sergiusens commentedMay 24, 2017
Currently XDG_DATA_DIRS is only setup for an X session, there
is currently no specific location to set this up for anything
using the wayland protocol. The profile.d mechanism seems like
the next best choice.
LP: #1681547
Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com