Skip to content

cogctl communication to multiple instances does not work #474

Closed

Description

@ventosus

With two cog instances (built with system DBUS):

cog --gapplication-app-id=com.example.ONE uri
cog --gapplication-app-id=com.example.TWO uri

There is no way to talk to both of them with cogctl by using the object path: (only the first one loaded can be talked to)

cogctl --system --object-path=/com/example/ONE reload -> OK

cogctl --system --object-path=/com/example/TWO reload
GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path ?/com/example/TWO?

There is no way to talk to both of them with cogctl by using the appid:

cogctl --system --appid=com.example.ONE reload
GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "com.example.ONE" does not exist

cogctl --system --appid=com.example.TWO reload
GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "com.example.TWO" does not exist

How should I talk to different cog instances? Am I doing something wrong?

Activity

  1. ventosus commented on Aug 18, 2022

    @ventosus
    Author
    # cog --version
    0.12.4 (WPE WebKit 2.36.3)
    
  2. chrisvollorenew commented on Jan 23, 2023

    @chrisvollorenew

    Hello @ventosus - I also have been having trouble with cogctl and dbus.
    I wonder if theres something I am missing with my set up.
    I am running cog as root in an embedded environment.
    The system bus is at /run/dbus/...
    The environment variables for dbus are not getting set "automatically" in my case.
    Have you tried checking your environment variables (such as DBUS_SYSTEM_BUS_ADDRESS) for dbus?

    Please find my post here:
    #532

  3. ventosus commented on Jan 23, 2023

    @ventosus
    Author

    @chrisvollorenew dbus ist set up just fine on my side. my problem is addressing multiple instances of cog. addressing a single instance works just fine.

  4. aperezdc commented on Feb 28, 2023

    @aperezdc
    Member

    The same identifiers passed to cog --gapplication-app-id= must be passed to cogctl --appid=:

    # Start two instances with different application identifiers
    cog --gapplication-app-id=com.example.Cog1 wpewebkit.org
    cog --gapplication-app-id=com.example.Cog2 igalia.com
    # Load different pages on each using cogctl
    cogctl --appid=com.example.Cog1 open webkit.org
    cogctl --appid=com.example.Cog2 open apple.com

    You can see this in action in the screenshot below (note that -A is the same as --appid=):

    Screenshot of a labwc compositor session, with two Cog instances and a terminal in the background running cogctl to open different pages on them

  5. locked and limited conversation to collaborators on Feb 28, 2023
  6. converted this issue into a discussion #541 on Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions