# Gnome Shell extension: Syncthing Icon

**URL:** https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759
**Category:** General
**Created:** [September 24, 2015, 4:23pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759 "2015-09-24T16:23:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [September 24, 2015, 4:23pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/1 "2015-09-24T16:23:34Z")

</div>

Hello Syncthing community,

I am using Syncthing for quite some time now and for my own personal needs I have written a tiny shell extension for Gnome 3. It can be found at this [GitHub repository](https://github.com/jaystrictor/gnome-shell-extension-syncthing). If you are using Gnome 3, please give it a try.

It features a small symbolic Syncthing icon that opens a menu with

- an on/off switch for starting/stopping Syncthing by utilizing `systemd`
- a button for opening the Web user interface
- a list of folders that are managed by Syncthing

Feedback is very welcome.

Kind regards, Jay

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [September 24, 2015, 5:21pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/2 "2015-09-24T17:21:03Z")

</div>

> [@jaystrict](#):
>
> an on/off switch for starting/stopping Syncthing by utilizing systemd

You could add `syncthing-inotify.service` as well, if it exists.

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [September 25, 2015, 8:25pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/3 "2015-09-25T20:25:19Z")

</div>

> [@rumpelsepp](#):
>
> You could add syncthing-inotify.service as well, if it exists.

Hmm, I thought about your suggestion for a while, but I have the feeling that this is not the right place to start/stop syncthing-inotify.

If it really should be started together with syncthing and also stoppped together with syncthing every time, then one could establish this dependency

- either in the syncthing binary itself
- or in the corresponding systemd unit files.

Probably you know more about whether this is appropriate for the systemd unit files, as you have written most of them, IIRC.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [September 25, 2015, 8:37pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/4 "2015-09-25T20:37:04Z")

</div>

> [@jaystrict](#):
>
> Probably you know more about whether this is appropriate for the systemd unit files, as you have written most of them, IIRC.

It is the other way round; when you start `syncthing-inotify.service` it pulls `syncthing.service` as a dependency. When you stop `syncthing.service` unfortunately `syncthing-inotify.service` keeps running and fails. Since the inotify watcher is an optional “add on”, it makes sense that we do not touch `syncthing.service`.

I was thinking about sth. like this:

```plaintext
# stop; pseudocode
if (systemctl --user is-active syncthing-inotify.service) && (systemctl --user is-enabled syncthing-inotify.service); then
     systemctl --user stop syncthing-inotify.service
fi

# start; pseudocode
if (systemctl --user is-enabled syncthing-inotify.service); then
    systemctl --user start syncthing-inotify.service 
fi

```

Otherwise `syncthing-inotify.service` keeps staying in a strange state when you stop `syncthing.service`.

**edit:** This Problem seems to be fixed now… I just tested it again:

```plaintext
$ systemctl --user stop syncthing.service

Sep 25 22:38:54 naboo systemd[1086]: Stopping Syncthing Inotify File Watcher...
Sep 25 22:38:54 naboo systemd[1086]: Stopped Syncthing Inotify File Watcher.
Sep 25 22:38:54 naboo systemd[1086]: Stopping Syncthing - Open Source Continuous File Synchronization...
Sep 25 22:38:54 naboo systemd[1086]: Stopped Syncthing - Open Source Continuous File Synchronization.

```

So, inotify does stop when syncthing stops. But won’t come up again, when syncthing is restarted.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [September 25, 2015, 9:09pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/5 "2015-09-25T21:09:13Z")

</div>

> [@jaystrict](#):
>
> If it really should be started together with syncthing and also stoppped together with syncthing every time, then one could establish this dependency

> <https://github.com/syncthing/syncthing/pull/2312>
>
> This patch adds syncthing-inotify.service as an optional dependency to
> syncthing….service. That means, if syncthing-inotify.service is
> available, it is started and stopped with syncthing.
> 
> See discussion here:
> https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759

---

<div class="post-metadata">

### Author: ![jimzhong](https://forum.syncthing.net/user_avatar/forum.syncthing.net/jimzhong/32/4182_2.png) [@jimzhong](https://forum.syncthing.net/u/jimzhong)
#### Post date: [October 5, 2015, 2:17pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/6 "2015-10-05T14:17:59Z")

</div>

It’s a good start. However the functions are still limited.

---

<div class="post-metadata">

### Author: ![terrycloth](https://forum.syncthing.net/user_avatar/forum.syncthing.net/terrycloth/32/2668_2.png) [@terrycloth](https://forum.syncthing.net/u/terrycloth)
#### Post date: [October 6, 2015, 11:27pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/7 "2015-10-06T23:27:48Z")

</div>

I like this idea! I can’t get it to work, though.

The switch to toggle Syncthing on and off is unresponsive. When I click on the switch, nothing happens.

---

<div class="post-metadata">

### Author: ![jimzhong](https://forum.syncthing.net/user_avatar/forum.syncthing.net/jimzhong/32/4182_2.png) [@jimzhong](https://forum.syncthing.net/u/jimzhong)
#### Post date: [October 7, 2015, 4:28am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/8 "2015-10-07T04:28:52Z")

</div>

Is your syncthing listening on port 8384?

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 7, 2015, 9:56am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/9 "2015-10-07T09:56:12Z")

</div>

> [@terrycloth](#):
>
> The switch to toggle Syncthing on and off is unresponsive. When I click on the switch, nothing happens.

Is the switch sensitive and you can toggle it, but Syncthing is not switched on/off in response?

Or is the switch unsensitive, i.e., “grayed out”?

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 7, 2015, 9:57am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/10 "2015-10-07T09:57:50Z")

</div>

> [@jimzhong](#):
>
> Is your syncthing listening on port 8384?

As for the problem with ports other than 8384: I am working on that. Should be fixed in the next release.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [October 7, 2015, 10:22am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/11 "2015-10-07T10:22:07Z")

</div>

Just installed it; it’s pretty neat and that stuff with `syncthing-inotify.service` works well. 👍

```nohighlight
Okt 07 12:16:34 kronos gnome-shell[1655]: GNOME Shell started at Wed Oct 07 2015 12:16:34 GMT+0200 (CEST)
Okt 07 12:16:40 kronos systemd[1253]: Started Syncthing - Open Source Continuous File Synchronization.
Okt 07 12:16:40 kronos systemd[1253]: Started Syncthing Inotify File Watcher.
Okt 07 12:16:40 kronos syncthing-inotify[22823]: [WARNING] Cannot connect to Syncthing: Get http://127.0.0.1:8384/rest/404: dial tcp 127.0.0.1:8384: connection refused
Okt 07 12:16:40 kronos syncthing[22822]: [35K66] INFO: syncthing v0.12.0-beta2+23-g7e8b76e "Beryllium Bedbug" (go1.5.1 linux-amd64 default) stefan@lap-tatschner.aisec.fraunhofer.de 2015-10-01 09:47:16 UTC
Okt 07 12:16:40 kronos syncthing[22822]: [35K66] INFO: My ID: 35K664T-JVVJ4MZ-NNISZW6-O4QGUOS-PPDK5VK-VGJKMEB-A2XXOI4-6Z3ZIAV
Okt 07 12:16:40 kronos syncthing[22822]: [35K66] INFO: Database block cache capacity 65536 KiB
Okt 07 12:16:41 kronos syncthing-inotify[22823]: [WARNING] Cannot connect to Syncthing: Get http://127.0.0.1:8384/rest/404: dial tcp 127.0.0.1:8384: connection refused
Okt 07 12:16:42 kronos syncthing-inotify[22823]: [WARNING] Cannot connect to Syncthing: Get http://127.0.0.1:8384/rest/404: dial tcp 127.0.0.1:8384: connection refused
Okt 07 12:16:42 kronos syncthing[22822]: [35K66] INFO: Starting deadlock detector with 20m0s timeout
Okt 07 12:16:42 kronos syncthing[22822]: [35K66] OK: Ready to synchronize m-und-s (read-write)
Okt 07 12:16:43 kronos syncthing-inotify[22823]: [WARNING] Cannot connect to Syncthing: Get http://127.0.0.1:8384/rest/404: dial tcp 127.0.0.1:8384: connection refused
Okt 07 12:16:43 kronos syncthing[22822]: [35K66] OK: Ready to synchronize dokumente (read-write)
Okt 07 12:16:43 kronos syncthing[22822]: [35K66] INFO: Completed initial scan (rw) of folder m-und-s

```

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 7, 2015, 10:44am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/12 "2015-10-07T10:44:34Z")

</div>

> [@rumpelsepp](#):
>
> Just installed it; it’s pretty neat and that stuff with syncthing-inotify.service works well. 👍

Thank you. 🙂And thank’s for enhancing the service files.

I forgot to mention that the extension can now also be found on [extensions.gnome.org](https://extensions.gnome.org/extension/989/syncthing-icon).

---

<div class="post-metadata">

### Author: ![terrycloth](https://forum.syncthing.net/user_avatar/forum.syncthing.net/terrycloth/32/2668_2.png) [@terrycloth](https://forum.syncthing.net/u/terrycloth)
#### Post date: [October 7, 2015, 10:38pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/13 "2015-10-07T22:38:19Z")

</div>

@jimzhong and @jaystrict

Sorry, I should have been more specific. I could move this to a GitHub issue or something if you want.

The Syncthing switch is grayed out.

![Screenshot of the Syncthing Icon GNOME Shell extension in action.](https://forum-uploads.syncthingcdn.net/original/2X/1/1923c875654d9e67a6db4b2ab1bbed2fc5d3eab7.png)

I’m running Syncthing v0.11.26 on Fedora 22 (64-bit) with GNOME 3.16.3.

GUI Listen Address: 127.0.0.1:8384  
Sync Protocol Listen Address: 0.0.0.0:22000

Let me know if you need any other info.

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 8, 2015, 10:14am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/14 "2015-10-08T10:14:20Z")

</div>

> [@terrycloth](#):
>
> Sorry, I should have been more specific. I could move this to a GitHub issue or something if you want.

Yes, please create an issue on [GitHub](https://github.com/jaystrictor/gnome-shell-extension-syncthing). This is the right place to fix bugs.

Thank you.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [October 9, 2015, 6:15am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/15 "2015-10-09T06:15:15Z")

</div>

Today gnome 3.18 appeared in the arch Linux repos. Is your extension compatible to gnome 3.18?

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 9, 2015, 8:05am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/16 "2015-10-09T08:05:26Z")

</div>

> [@rumpelsepp](#):
>
> Today gnome 3.18 appeared in the arch Linux repos. Is your extension compatible to gnome 3.18?

Yes, it is. Just updated the version information in the GitHub repo.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [October 9, 2015, 8:14am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/17 "2015-10-09T08:14:08Z")

</div>

There seems to be a problem on 3.18:

```nohighlight
GLib.FileError: Failed to open file '/home/stefan/.local/share/gnome-shell/extensions/syncthingicon@jay.strict@posteo.de/schemas/gschemas.compiled': open() failed: No such file or directory

Stack trace:
  getSettings@/home/stefan/.local/share/gnome-shell/extensions/syncthingicon@jay.strict@posteo.de/convenience.js:82
  SyncthingIconPrefsWidget<._init@/home/stefan/.local/share/gnome-shell/extensions/syncthingicon@jay.strict@posteo.de/prefs.js:38
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  buildPrefsWidget@/home/stefan/.local/share/gnome-shell/extensions/syncthingicon@jay.strict@posteo.de/prefs.js:52
  Application<._selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:95
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  Application<._onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:259
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  main@resource:///org/gnome/shell/extensionPrefs/main.js:397
  @<main>:1

```

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [October 9, 2015, 8:37am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/18 "2015-10-09T08:37:27Z")

</div>

Did you just copy the files, without compiling the schema? Running `./install.sh` should compile it automatically.

---

<div class="post-metadata">

### Author: ![rumpelsepp](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rumpelsepp/32/2006_2.png) [@rumpelsepp](https://forum.syncthing.net/u/rumpelsepp)
#### Post date: [October 9, 2015, 10:51am UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/19 "2015-10-09T10:51:03Z")

</div>

Yes; I tried installing via [extensions.gnome.org](http://extensions.gnome.org) but that seemed to be broken… Anyway, it works now. Thanks!

---

<div class="post-metadata">

### Author: ![jaystrict](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jaystrict](https://forum.syncthing.net/u/jaystrict)
#### Post date: [March 18, 2016, 3:57pm UTC](https://forum.syncthing.net/t/gnome-shell-extension-syncthing-icon/5759/20 "2016-03-18T15:57:38Z")

</div>

There is a new version available on [extensions.gnome.org](https://extensions.gnome.org/extension/989/syncthing-icon/).

![](https://forum-uploads.syncthingcdn.net/original/2X/e/e88d44e9dd17444dec4464f33e9db23600ca782d.png)

It now has status indication and config file parsing. Check it out!
