Skip to content

Fix DBus name case mismatch breaking Linux single-instance file passing - #11826

Merged
lanewei120 merged 1 commit into
bambulab:masterfrom
mindrunner:fix/linux-single-instance-dbus-name-case
Aug 7, 2026
Merged

Fix DBus name case mismatch breaking Linux single-instance file passing#11826
lanewei120 merged 1 commit into
bambulab:masterfrom
mindrunner:fix/linux-single-instance-dbus-name-case

Conversation

@mindrunner

Copy link
Copy Markdown
Contributor

Problem

On Linux with single_instance enabled, opening a file in a second instance is supposed to forward the file path to the already-running instance via a DBus method call. This has been silently broken: the second instance just exits and nothing happens in the running instance.

The cause is a case mismatch in src/slic3r/GUI/InstanceCheck.cpp:

  • The sender (send_message) builds the destination/interface name as com.bambulab.BambuStudio.InstanceCheck.Object<hash> (lowercase bambulab).
  • The listener (OtherInstanceMessageHandler::listen / handle_dbus_object_message) registers and matches com.BambuLab.BambuStudio.InstanceCheck.Object<hash> (capital B, L).

DBus names are case-sensitive, so the method call targets a bus name nobody owns and is dropped.

Verified with dbus-monitor: the message is published to the lowercase name with no effect, while sending the identical message via dbus-send to the correctly-cased name is delivered and triggers the file load in the running instance.

Fix

Align the sender's interface name with the listener's spelling, and fix the same casing in the introspection XML for consistency. The object path (/com/BambuLab/...) already matched on both sides.

Affects both X11 and Wayland.

Testing

  1. Set "single_instance": "true" under app in <datadir>/BambuStudio.conf.
  2. Launch BambuStudio.
  3. Launch a second instance with an STL path on the command line.
  4. Before: nothing happens. After: the running instance comes forward and loads the file.

On Linux with single_instance enabled, a second instance sends the paths
of files to open to the running instance via a DBus method call. The
sender in send_message() built the destination/interface name as
"com.bambulab.BambuStudio.InstanceCheck.Object<hash>", while the
listener registers and matches
"com.BambuLab.BambuStudio.InstanceCheck.Object<hash>". DBus names are
case-sensitive, so the call went to a nonexistent destination: the
running instance never received the message and the second instance
silently exited without the file being loaded.

Align the sender's interface name (and the introspection XML) with the
listener's spelling. The object path already matched on both sides.

Affects both X11 and Wayland.
@tonghao-bbl

tonghao-bbl commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

LGTM @lanewei120

@lanewei120
lanewei120 merged commit a803118 into bambulab:master Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants