From c0be9987d07df3aa818f4573bef4235c5f59891b Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sat, 20 Oct 2018 08:25:59 +0200 Subject: [PATCH] build: Add desktop files and icons to .deb (fixes #3439) (#5277) --- build.go | 8 ++++++++ etc/linux-desktop/README.md | 12 ++++++++++++ etc/linux-desktop/syncthing-start.desktop | 9 +++++++++ etc/linux-desktop/syncthing-ui.desktop | 9 +++++++++ 4 files changed, 38 insertions(+) create mode 100644 etc/linux-desktop/README.md create mode 100644 etc/linux-desktop/syncthing-start.desktop create mode 100644 etc/linux-desktop/syncthing-ui.desktop diff --git a/build.go b/build.go index cb0178b55..cfd7437f9 100644 --- a/build.go +++ b/build.go @@ -111,6 +111,14 @@ var targets = map[string]target{ {src: "etc/linux-systemd/system/syncthing-resume.service", dst: "deb/lib/systemd/system/syncthing-resume.service", perm: 0644}, {src: "etc/linux-systemd/user/syncthing.service", dst: "deb/usr/lib/systemd/user/syncthing.service", perm: 0644}, {src: "etc/firewall-ufw/syncthing", dst: "deb/etc/ufw/applications.d/syncthing", perm: 0644}, + {src: "etc/linux-desktop/syncthing-start.desktop", dst: "deb/usr/share/applications/syncthing-start.desktop", perm: 0644}, + {src: "etc/linux-desktop/syncthing-ui.desktop", dst: "deb/usr/share/applications/syncthing-ui.desktop", perm: 0644}, + {src: "assets/logo-32.png", dst: "deb/usr/share/icons/hicolor/32x32/apps/syncthing.png", perm: 0644}, + {src: "assets/logo-64.png", dst: "deb/usr/share/icons/hicolor/64x64/apps/syncthing.png", perm: 0644}, + {src: "assets/logo-128.png", dst: "deb/usr/share/icons/hicolor/128x128/apps/syncthing.png", perm: 0644}, + {src: "assets/logo-256.png", dst: "deb/usr/share/icons/hicolor/256x256/apps/syncthing.png", perm: 0644}, + {src: "assets/logo-512.png", dst: "deb/usr/share/icons/hicolor/512x512/apps/syncthing.png", perm: 0644}, + {src: "assets/logo-only.svg", dst: "deb/usr/share/icons/hicolor/scalable/apps/syncthing.svg", perm: 0644}, }, }, "stdiscosrv": { diff --git a/etc/linux-desktop/README.md b/etc/linux-desktop/README.md new file mode 100644 index 000000000..ee72b3c91 --- /dev/null +++ b/etc/linux-desktop/README.md @@ -0,0 +1,12 @@ +# Desktop Entries + +This directory contains files to integrate Syncthing in your desktop environment (DE). +Specifically this works for DEs that implement the [XDG Desktop Menu Specification][1], which +is virtually every DE. +To add Syncthing to desktop menus for all users, copy the `.desktop` files to +`/usr/local/share/applications` (root required). To add it for just your user, copy them to `~/.local/share/applications`. +To start Syncthing automatically, you have two options: Either you go to the autostart settings of your DE and choose Syncthing or you copy the `syncthing-start.desktop` file to `~/.config/autostart`. +For more information refer to the [ArchWiki page on Desktop entries][2] + +[1]: https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html +[2]: https://wiki.archlinux.org/index.php/Desktop_entries diff --git a/etc/linux-desktop/syncthing-start.desktop b/etc/linux-desktop/syncthing-start.desktop new file mode 100644 index 000000000..8093066fd --- /dev/null +++ b/etc/linux-desktop/syncthing-start.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Start Syncthing +GenericName=File synchronization +Comment=Starts the main syncthing process in the background. +Exec=/usr/bin/syncthing -no-browser +Icon=syncthing +Terminal=false +Type=Application +Categories=Network;FileTransfer;P2P diff --git a/etc/linux-desktop/syncthing-ui.desktop b/etc/linux-desktop/syncthing-ui.desktop new file mode 100644 index 000000000..a6eb704b9 --- /dev/null +++ b/etc/linux-desktop/syncthing-ui.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Syncthing Web UI +GenericName=File synchronization UI +Comment="Opens Syncthing's Web UI in the default browser (Syncthing must already be started)." +Exec=/usr/bin/syncthing -browser-only +Icon=syncthing +Terminal=false +Type=Application +Categories=Network;FileTransfer;P2P