{
{ "system", 'y', 0, G_OPTION_ARG_NONE, &opt_connection_system, N_("Connect to the system bus"), NULL},
{ "session", 'e', 0, G_OPTION_ARG_NONE, &opt_connection_session, N_("Connect to the session bus"), NULL},
- { "user", 'u', 0, G_OPTION_ARG_NONE, &opt_connection_user, N_("Connect to the system bus"), NULL},
- { "machine", 'm', 0, G_OPTION_ARG_NONE, &opt_connection_machine, N_("Connect to the session bus"), NULL},
+ { "machine", 'm', 0, G_OPTION_ARG_NONE, &opt_connection_machine, N_("Connect to the machine bus"), NULL},
+ { "user", 'u', 0, G_OPTION_ARG_NONE, &opt_connection_user, N_("Connect to the user bus"), NULL},
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_connection_address, N_("Connect to given D-Bus address"), NULL},
{ NULL }
};
count = !!opt_connection_system +
!!opt_connection_session +
+ !!opt_connection_machine +
+ !!opt_connection_user +
!!opt_connection_address;
/* First, ensure we have exactly one connect */
{
c = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
}
+ else if (opt_connection_machine)
+ {
+ c = g_bus_get_sync (G_BUS_TYPE_MACHINE, NULL, error);
+ }
+ else if (opt_connection_user)
+ {
+ c = g_bus_get_sync (G_BUS_TYPE_USER, NULL, error);
+ }
else if (opt_connection_address != NULL)
{
c = g_dbus_connection_new_for_address_sync (opt_connection_address,
}
else
{
- g_print ("--system \n--session \n--address \n");
+ g_print ("--system \n--session \n--machine \n--user \n--address \n");
}
}
else
}
else
{
- g_print ("--system \n--session \n--address \n");
+ g_print ("--system \n--session \n--machine \n--user \n--address \n");
}
}
else
}
else
{
- g_print ("--system \n--session \n--address \n");
+ g_print ("--system \n--session \n--machine \n--user \n--address \n");
}
}
else
}
else
{
- g_print ("--system \n--session \n--address \n");
+ g_print ("--system \n--session \n--machine \n--user \n--address \n");
}
}
else