How to get Debian Duplicati Tray Icon?

Google "Failed to load module canberra-gtk-module” “debian” gave solutions that helped some people.

Debian Buster x64: Failed to load module “canberra-gtk-module” #23 got below. Something’s missing.

sudo apt-get install libcanberra-gtk-module

My Linux Mint system does Duplicati Tray Icon OK without that, but I also didn’t have to fight to get Tray.
I know you did that one, but I did not see that you had tried any canberra solutions, so I wanted to ask…

The intent is for it to just work, but Linux systems vary a lot. This is a common area for missing pieces.
With luck, what’s missing is available to install. Sometimes that’s not so, and that becomes a problem.

8200 is supposed to look different than 8300 because it’s a different Duplicati. There’s a search series.
Duplicati components gets into this some. Typically the Duplicati launched at boot gets up first at 8200.
The --no-hosted-server plan would have had only 8200, but without that, your next server may be 8300.

This, however, seems weird, although I tend not to run Linux. Maybe someone else will have some idea.
Can you check that the Duplicati on port 8200 is running as root? You can run lsof, e.g. lsof -i :8200

Debian is probably one of the more challenging distributions to get started with. Don’t get me wrong, I love Debian. Actually it’s my preferred distribution. But I work mostly with servers and no GUI (just command line stuff). When I want to put Linux on a desktop machine, I have found Mint to provide a more pleasing experience. It’s based on Debian so the same command-line knowledge still works. Plus I get the Duplicati tray icon. Just a thought. :slight_smile:

hey! I know it has been a bit since I’ve been able to reply so I’m hoping @ts678 and @drwtsn32 see this and can provide more insights because I sincerely appreciated them.

As I see it, I am having two issues. 1 is the tray icon. 2 is understanding what should be running/if Duplicati is even running properly in regard to 8200/8300.

  1. I did this: sudo apt-get install libcanberra-gtk-module
    then I did: duplicati --no-hosted-server
    and got this: Request error: System.Net.WebException: The remote server returned an error: (401) Not logged in.

  2. In regard to 8200/8300, I am just puzzled here. So is Duplicati supposed to open by itself and I should ideally never even have to login to the web interface? Which one (82 or 83) should I be configuring my backups on? I am just confused on this. Like I said, I had set everything up on 8300 but then the backups were not occuring unless I manually logged into Duplicati via web and that’s not how I envisioned this going. I have since (manually) configured 8200 and that seems to work automatically in the background. Is this correct?

I am sorry for the hand holding requests. Like I said, being new to Debian/Linux and Duplicati itself having an almost really good but still somewhat lacking instructions (when it comes to linux) has just left me scratching my head a little more than I was expecting.

when I run duplicati --no hosted server I also get this now:
duplicati --no-hosted-server
Request error: System.Net.WebException: The remote server returned an error: (401) Not logged in.

So just to be clear, the part that you said seems weird is fixed now. It eventually populated a list. My question is, which localhost do I set up and configure backups on? 8200 or 8300? I am assuming 8200 because like I previously said it doesn’t seem that 8300 was doing things automatically. As in, I would be using my computer for days at a time, login to Duplicati web interface and only THEN would a backup start, even though I had scheduled backups to occur daily, they would only happen when I’d login manually to 8300. I’d prefer they just go on in the background. This is why I want a tray icon so I can visually know it’s working and not have to worry.

It sounds correct for a goal of a service backing up in the background, plus a tray icon after Linux login.

This, though, sounds like a Duplicati login. Did you set a Duplicati password from the Settings screen?
How important is that? It interferes with Tray Icon getting in, though I usually see it fail in a different way.

How about taking an inventory of what’s running on the port, and what Linux user they’re running as, e.g.

# lsof -i :8200
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
firefox   3736 me    105u  IPv4  71491      0t0  TCP localhost:36230->localhost:8200 (ESTABLISHED)
mono-sgen 4156 root    9u  IPv4  71405      0t0  TCP localhost:8200 (LISTEN)
mono-sgen 4156 root   14u  IPv4  71493      0t0  TCP localhost:8200->localhost:36230 (ESTABLISHED)
# 

and repeat for 8300. The LISTEN allows a connect. You can see my browser ESTABLISHED its session.
In the setup I have in mind, your start-at-boot Duplicati would be on 8200, as root. 8300 is no longer used.

# systemctl status duplicati
● duplicati.service - Duplicati web-server
   Loaded: loaded (/lib/systemd/system/duplicati.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-02-23 19:40:27 EST; 35min ago
 Main PID: 4152 (mono)
    Tasks: 15 (limit: 2296)
   CGroup: /system.slice/duplicati.service
           ├─4152 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe
           └─4156 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe

So there you see PID 4156 again. Duplicati processes often come in pairs, with the child doing the work.

I don’t generally run either a service or Duplicati on Linux, but what I get now is that I right-click Tray Icon then choose Open from its menu. That doesn’t seem able to open the browser, but will open Duplicati in browser that’s already opened. This is possibly subject to some system setting that I’m not familiar with.

I think the intent was for Tray Icon to get the server password out of the server database, but file system permissions get in the way unless you reduce them. Again, if you have a password, can you do without?

EDIT:

If you have a password but can do without, then you can edit as root /etc/default/duplicati with this option:

DAEMON_OPTS=“–webservice-password=”

and then (as root) systemctl restart duplicati. Then as you, try duplicati --no-hosted-server.
If that seems to hold, open a browser and try the Tray Icon right-click and Open, to see if you get Duplicati.

EDIT:

Or if the password is important, but you don’t mind it being somewhat exposed on shell and process info:

$ duplicati --no-hosted-server --webserver-password=password

seems to work with server password. Basically, you tell Tray Icon what it needs to know to get in, and not

$ duplicati --no-hosted-server
Request error: System.Net.WebException: The remote server returned an error: (401) Not logged in.

Thank you for the quick and in depth reply. Let’s see here…

“It sounds correct for a goal of a service backing up in the background, plus a tray icon after Linux login.”

Yes! This is what I w ant but still don’t have the tray icon. Your next line gives me a little confusion: “This, though, sounds like a Duplicati login.” What is the difference between a service backing up in the background and a Duplicati login? Just the manual interaction from the user?

To be clear, I don’t have anything in the top of my computer’s bar, like where the clock is. That is what I am understanding to be a tray icon. What I do have is in my apps, an appliation called Duplicati which if I open opens a browser page to localhost:8300. I only say this to make sure I am not asking to get something which doesn’t exist/I already have. I am under the impression a tray icon is something that appears where the clock/wifi/etc icons are on my comp. Yes, I am so new to Linux that I took the time to ask this to make sure we are on the same page.

I did set a Duplicati password. I can, and have, removed this. I can keep this removed if need be, but if I can get to a place where I eventually see the Tray Icon, I may try re-enabling and trying your later advice about both co-existing.

lsof -i :8300 nothing comes up.
lsof -i :8200 I get:
lsof -i :8200
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mono-sgen 18699 user 5u IPv4 330569 0t0 TCP localhost:40072->localhost:8200 (ESTABLISHED)

the PID does not match the PID listed here:
$ systemctl status duplicati
● duplicati.service - Duplicati web-server
Loaded: loaded (/etc/systemd/system/duplicati.service; enabled; vendor preset
Active: active (running) since Tue 2021-02-23 18:17:33 PST; 16min ago
Main PID: 18676 (mono)
Tasks: 15 (limit: 4915)
Memory: 480.8M
CGroup: /system.slice/duplicati.service
├─18676 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe --web
└─18680 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe –

“I don’t generally run either a service or Duplicati on Linux”
I guess I don’t really know what this means. I want Duplicati to run… but are you saying I want it running AS a service? Maybe this is just terminology I am thrown off by. Sorry! I just want Duplicati to run automatically at system start (which it does seem to be doing now that I’ve went from 8300 to 8200) and a tray icon to visually confirm this.

I took the password off. My /etc/default/duplicati looks like this:

# Defaults for duplicati initscript
# sourced by /etc/init.d/duplicati
# installed at /etc/default/duplicati by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Additional options that are passed to the Daemon.
DAEMON_OPTS="--webservice-interface=any --webservice-port=8200 --portable-mode"

I copied this from the Linux install tutorial on the Duplicati site. If I need to change it to get tray icon, let me know.

By login, I mean giving a password to something to be logged in (or refused). A service doesn’t have that.
The line you cited is just noting that the Duplicati GUI in the browser can have a login, and so can Debian.
Tray Icon has an internal login to the Duplicati server, and the time you want that is upon the Debian login.
We’re not yet up to automating that part (I think), still trying for good manual launch after the Debian login.

Now I’m confused. You cited a picture with that, and said:

The intent here is to add Duplicati to the collection. But is there a collection or not?

That sounds like the standard no-options launch without --no-hosted-server. This is the unwanted one.

The reason you have such a small view is probably because I forgot to say do that one as root or sudo.
Running as you doesn’t see what root is doing. Root PID 18680 likely has the other end and a LISTEN.
Look at my example where firefox on the first line is the only one as me. Third line is root and reversed.

Just saying I don’t have much experience with your type of setup, not that it’s inadvisable. It should work, however there’s the huge question outstanding of whether you see any tray icons like shown in your link.

was somebody who couldn’t get it to work, and now I’m not sure you did either. If not, we’re stuck there…

EDIT:

There seem to be quite a few other articles on how to get tray icons in Debian. Here are some thoughts:

30 Things to Do After Installing Debian 10
Enable Tray icons in GNOME (Debian 10)

hey sorry I made you way more confused than needed, I think. I was just trying to determine what is a tray/tray icon in case I’ve just been wrong this whole time. I assume its the icons up where the clock and wifi are. Once I enabled that command that I previously linked to/you quoted me on, other icons appeared, but still no Duplicati icon.

Yes, intent is to add Duplicati to that collection, and there is a collection with icons up there for apps that are running.

Ok, I won’t click that app anymore that opens 8300.

Good news? Runing the listen on 8200 as sudo I did get matching PIDs!

Good to know at least something’s working as predicted.

If there was no Duplicati icon at the time when duplicati --no-hosted-server was up and seemingly running (sitting there on top of your shell prompt, not complaining), then it may take some more guessing.

libappindicator is (I think) needed, if you can see whether that’s installed. Maybe someone else has ideas.

$ dpkg -s libappindicator3-1
Package: libappindicator3-1
Status: install ok installed

might be a good thing to check for.

ugh now this is happening:
duplicati --no-hosted-server
bash: duplicati: command not found

This is not installed. Installing.

Wow! OK! So it’s working! Thank you so much. I did everything you said and when I typed
duplicati --no-hosted-server an icon appeared :slight_smile:

Then I added Duplicati to applications to run at startup and the Icon was there when I logged in. All looks good! Thank you!

1 Like