Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions cinnamon-session/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,23 @@ require_dbus_session (int argc,
GError **error)
{
char **new_argv;
char *address;
int i;

if (g_getenv ("DBUS_SESSION_BUS_ADDRESS"))
return TRUE;

/* Use the bus the user session already has (GDBus looks for the
* well-known socket at $XDG_RUNTIME_DIR/bus), rather than starting a
* second one that activated services and portals would be split
* across. Exporting the address keeps all our children on it. */
address = g_dbus_address_get_for_bus_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (address != NULL) {
g_setenv ("DBUS_SESSION_BUS_ADDRESS", address, TRUE);
g_free (address);
return TRUE;
}

/* Just a sanity check to prevent infinite recursion if
* dbus-launch fails to set DBUS_SESSION_BUS_ADDRESS
*/
Expand All @@ -183,17 +195,15 @@ require_dbus_session (int argc,
}
new_argv[i + 2] = NULL;

if (!execvp ("dbus-launch", new_argv)) {
g_set_error (error,
G_SPAWN_ERROR,
G_SPAWN_ERROR_FAILED,
"No session bus and could not exec dbus-launch: %s",
g_strerror (errno));
return FALSE;
}

/* Should not be reached */
return TRUE;
/* execvp() only returns on failure */
execvp ("dbus-launch", new_argv);

g_set_error (error,
G_SPAWN_ERROR,
G_SPAWN_ERROR_FAILED,
"No session bus and could not exec dbus-launch: %s",
g_strerror (errno));
return FALSE;
}

/* Whether ~/.xinputrc (written by im-config / mintlocale-im) selects fcitx5.
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Build-Depends:
libcanberra-dev,
libcinnamon-desktop-dev (>= 6.0),
libgl-dev,
libglib2.0-dev (>= 2.37.3),
libglib2.0-dev (>= 2.50.0),
libgtk-3-dev (>= 3.0.0),
libice-dev,
libpango1.0-dev,
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
################################################################################
# Dependencies

gio = dependency('gio-2.0')
gio = dependency('gio-2.0', version: '>=2.50.0')
gtk3 = dependency('gtk+-3.0', version: '>=3.0.0')
glib = dependency('glib-2.0', version: '>=2.37.3')
glib = dependency('glib-2.0', version: '>=2.50.0')
libcanberra = dependency('libcanberra')
pango = dependency('pango')
pangoxft = dependency('pangoxft', required: false)
Expand Down Expand Up @@ -136,7 +136,7 @@
conf.set('ENABLE_IPV6', have_ipv6)

################################################################################
# Additionnal flags

Check failure on line 139 in meson.build

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22.3-amd64, Mint 22, true) / Mint 22

Additionnal ==> Additional

rootInclude = include_directories('.')

Expand Down
Loading