You are not logged in.

#1 2024-04-23 22:16:54

humanfish415
Member
Registered: 2024-03-26
Posts: 2

[Solved] Problem configuring dropbox on Wayland+sway+waybar

I'm running sway and waybar.

I've done my best to search around the forums and elsewhere online using a range of terms but haven't been able to find anything. I'm new here, but working to learn.

I've installed Dropbox from the AUR, and successfully set it up with launch on login using systemd. I can verify this using both systemctl and dropbox-cli commands (syncing is happening, etc.)

As described in the wiki article, starting Dropbox like this means that the Dropbox icon doesn't show up in waybar (although it does if I manually start Dropbox from the command line). I understand the instruction on the wiki to make a drop-in file for the systemd service, but the only listed example is for Xorg, and won't start unless an X session is launched.

Is there a Wayland equivalent to XAUTHORITY? Or is there another workaround that plays nice with the systemd service?

Have also asked in the Waybar GitHub repo, but no luck yet...

Update 2024-12-19:

It's very probable that I just never quite read far enough in the wiki article (like a dumbass) but I just went back through it and found exactly what I needed. When starting Dropbox with systemd at boot, these are the requisite lines to put in the appropriate file (including here for my own future reference):

/etc/systemd/system/dropbox@username.service.d/override.conf
[Service]
Environment=DISPLAY=:0
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

Last edited by humanfish415 (2024-12-20 03:07:00)

Offline

#2 2026-04-26 23:00:00

bananaboat
Member
Registered: 2026-04-26
Posts: 1

Re: [Solved] Problem configuring dropbox on Wayland+sway+waybar

I wonder what could have changed in two years, but this solution doesn't work anymore. I'm also running waybar and sway. Without the override, dropbox starts but doesn't show up in the tray. I know it starts because `dropbox-cli status` tells me so, as well as `ps aux | grep dropbox`. If I start dropbox on the terminal with `DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus dropbox` the icon shows up in the tray. But if I apply the override, then dropbox doesn't start properly. The service just keeps restarting. Look at the output of `systemctl status dropbox@myusername.service`. You can see I copied this output after dropbox had already restarted 24 times (on the penultimate line of output).

● dropbox@rafael.service - Dropbox
     Loaded: loaded (/usr/lib/systemd/system/dropbox@.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/dropbox@rafael.service.d
             └─override.conf
     Active: active (running) since Sun 2026-04-26 19:55:04 -03; 870ms ago
 Invocation: cba5ac5e3d4f4497967eb3892a896c71
   Main PID: 7540 (dropbox)
      Tasks: 7 (limit: 4546)
     Memory: 18.4M (peak: 18.4M)
        CPU: 845ms
     CGroup: /system.slice/system-dropbox.slice/dropbox@rafael.service
             └─7540 /usr/bin/dropbox

Apr 26 19:55:04 macbookair systemd[1]: dropbox@rafael.service: Consumed 16.213s CPU time over 22.862s wall clock time, 146.7M memory peak.
Apr 26 19:55:04 macbookair systemd[1]: dropbox@rafael.service: Scheduled restart job, restart counter is at 24.
Apr 26 19:55:04 macbookair systemd[1]: Started Dropbox.

Later, I managet to get it to work

Maybe because I had installed both dropbox and dropbox-cli from AUR, I ended up with two unit files. I'm not too knowledgeable about systemd, maybe. Anyways, before I was adding the overlay to dropbox@myusername.service, then I gave up and disabled this unit. However, upon reboot, dropbox was still being initialized. Then I found I had this other unit, which I added the overlay to using

systemctl --user edit dropbox.service

. Now it works and dropbox icon shows up in waybar's tray.

Last edited by bananaboat (2026-04-26 23:46:47)

Offline

Board footer

Powered by FluxBB