samschott/maestral

macOS starting Maestral on login always results in 2 menu bar items

chrisridd opened this issue · 7 comments

Describe the bug
I have Maestral configured to "Start at Login". When my Macs boot up and log me in, I always get two Maestral menu bar items.

Choosing Quit from one of them will Quit both.

Starting Maestral again from Finder results in one menu bar item.

To Reproduce
Enable "Start Maestral on login". (I've also toggled this off and then on again, but it made no difference.)

System Settings/Login items shows Maestral in the "Open at Login" list, and "Maestral" is also enabled in the "Allow in Background" list.

~/Library/Launch Agents/com.samschott.maestral.maestral.plist contains:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.samschott.maestral.maestral</string>
	<key>ProcessType</key>
	<string>Interactive</string>
	<key>RunAtLoad</key>
	<true/>
	<key>ProgramArguments</key>
	<array>
		<string>/Applications/Maestral.app/Contents/MacOS/Maestral</string>
		<string>--config-name</string>
		<string>maestral</string>
	</array>
	<key>EnvironmentVariables</key>
	<dict>
		<key>PYTHONOPTIMIZE</key>
		<string>2</string>
		<key>LC_CTYPE</key>
		<string>UTF-8</string>
	</dict>
	<key>AssociatedBundleIdentifiers</key>
	<string>com.samschott.maestral</string>
</dict>
</plist>

Restart your Mac and get logged in.

Expected behaviour
I would expect a single menu bar item when I login.

System:

  • Maestral version: v1.8.0
  • Python version: 3.9.6 (/usr/bin/python3) and 3.11.5 (/opt/local/bin/python3 ie MacPorts)
  • OS: [e.g. Ubuntu] MacOS Ventura 13.6
  • Desktop environment: [e.g. Gnome 3.32]
  • PyQt version (for Linux GUI):

Additional context
I have python3 from MacPorts installed in /opt/local, but it does not overwrite or otherwise touch Apple's python3. My .zshrc PATH setting does put /opt/local/bin in front of /usr/bin, but I'd be surprised if zsh's PATH affected a GUI app.

I see this problem on 3 separate M1 MacBook Pros, all running 13.5.2 or later and the same version of Maestral. If I'm doing something wrong, I'm doing it wrong very consistently :-)

Me too.

macOS 14.2 23C64 arm64
maestral: 1.8.0 via homebrew

Same.
macOS Sonoma Version 14.2.1 (23C71)
About Maestral: GUI v1.8.0, daemon v1.8.0

Two questions to debug:

  1. Does one of the two GUI instances say "Quit Maestral GUI" instead of just "Quit Maestral" in the dropdown menu?
  2. In macOS Settings > General > Login Items, does Maestral appear multiple times? For example in both the "Open at Login" and "Allow in the Background" sections?

Hi, I am also experiencing this issue. Answering your debugging questions. @samschott, in my system we have that

  1. Both GUI instances say "Quit Maestral" in the dropdown menu, and
  2. Maestral appears once in the "Open at Login" section and once in the "Allow in the Background" section.

macOS Sonoma Version 14.2.1
Maestral: GUI v1.8.0, daemon v1.8.0

Thanks for the info! The "Open at login" item appears to be the superfluous one. IIRC, only the item in "Allow in the Background" is created by Maestral through the checkbox in it's settings. If you go ahead and delete the first item, you should only have one instance running at startup.

Thank you @samschott! this seems to have fixed the problem for me.

This has also resolved the issue for me. Removing the item from "Open at Login" and leaving the Background on fixed it after a restart.
@chrisridd suggest you try this and close the issue if it works for you :)