Skip to content

Commit a33d18e

Browse files
sergio-costasmvo5
authored andcommitted
data: install snapcraft logo in /usr/share/snapd (#12388)
This commit ensures that the snapcraft icon is shown in the lock screen notifications. Unfortunately, to make it work it requires to be modified in the .deb package; it seems that there is no way of doing this in the snap package because the required change must be set in the "first" .desktop file, and /usr/share(/applications) is before than /var/lib/snapd/desktop(/applications) in the XDG_DATA_DIRS order. Jira: DT-862
1 parent 3293220 commit a33d18e

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

data/desktop/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ DESKTOP_FILES = $(DESKTOP_SOURCES:.in=)
2323
AUTOSTART_SOURCES = snap-userd-autostart.desktop.in
2424
AUTOSTART_FILES = $(AUTOSTART_SOURCES:.in=)
2525

26+
ICON_FILES = snapcraft-logo-bird.svg
27+
ICON_FOLDER = /usr/share/snapd
28+
2629
.PHONY: all
2730
all: $(DESKTOP_FILES) $(AUTOSTART_FILES)
2831

@@ -36,11 +39,16 @@ install:: $(AUTOSTART_FILES)
3639
install -d -m 0755 $(DESTDIR)/$(SYSCONFXDGAUTOSTARTDIR)
3740
install -m 0644 -t $(DESTDIR)/$(SYSCONFXDGAUTOSTARTDIR) $^
3841

42+
install:: $(ICON_FILES)
43+
install -d -m 0755 $(DESTDIR)/$(ICON_FOLDER)
44+
install -m 0644 -t $(DESTDIR)/$(ICON_FOLDER) $^
45+
3946
.PHONY: clean
4047
clean:
4148
rm -f $(DESKTOP_FILES) $(AUTOSTART_FILES)
4249

4350
%: %.in
4451
cat $< | \
4552
sed s:@bindir@:$(BINDIR):g | \
53+
sed s:@icondir@:$(ICON_FOLDER):g | \
4654
cat > $@

data/desktop/io.snapcraft.SessionAgent.desktop.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Exec=/bin/false
55
DBusActivatable=true
66
NoDisplay=true
77
X-GNOME-UsesNotifications=true
8+
Icon=@icondir@/snapcraft-logo-bird.svg
Lines changed: 30 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)