diff --git a/resources/linux/snap/electron-launch b/resources/linux/snap/electron-launch index cf2b931f3fe3c..fd18e11e443f4 100755 --- a/resources/linux/snap/electron-launch +++ b/resources/linux/snap/electron-launch @@ -162,20 +162,20 @@ function compile_giomodules { if [ -f "$1/glib-2.0/gio-querymodules" ]; then rm -rf "$GIO_MODULE_DIR" ensure_dir_exists "$GIO_MODULE_DIR" - ln -s "$1"/gio/modules/*.so "$GIO_MODULE_DIR" + ln -s "$SNAP"/usr/lib/"$ARCH"/gio/modules/*.so "$GIO_MODULE_DIR" "$1/glib-2.0/gio-querymodules" "$GIO_MODULE_DIR" fi } if [ "$needs_update" = true ]; then - async_exec compile_giomodules "$SNAP/usr/lib/$ARCH" + async_exec compile_giomodules "/snap/core20/current/usr/lib/$ARCH" fi # Setup compiled gsettings schema -GS_SCHEMA_DIR="$SNAP_USER_DATA/.local/share/glib-2.0/schemas" +export GSETTINGS_SCHEMA_DIR="$SNAP_USER_DATA/.local/share/glib-2.0/schemas" function compile_schemas { if [ -f "$1" ]; then - rm -rf "$GS_SCHEMA_DIR" - ensure_dir_exists "$GS_SCHEMA_DIR" + rm -rf "$GSETTINGS_SCHEMA_DIR" + ensure_dir_exists "$GSETTINGS_SCHEMA_DIR" for ((i = 0; i < ${#data_dirs_array[@]}; i++)); do schema_dir="${data_dirs_array[$i]}/glib-2.0/schemas" if [ -f "$schema_dir/gschemas.compiled" ]; then @@ -183,20 +183,20 @@ function compile_schemas { continue fi if [ -n "$(ls -A "$schema_dir"/*.xml 2>/dev/null)" ]; then - ln -s "$schema_dir"/*.xml "$GS_SCHEMA_DIR" + ln -s "$schema_dir"/*.xml "$GSETTINGS_SCHEMA_DIR" fi if [ -n "$(ls -A "$schema_dir"/*.override 2>/dev/null)" ]; then - ln -s "$schema_dir"/*.override "$GS_SCHEMA_DIR" + ln -s "$schema_dir"/*.override "$GSETTINGS_SCHEMA_DIR" fi done # Only compile schemas if we copied anything - if [ -n "$(ls -A "$GS_SCHEMA_DIR"/*.xml "$GS_SCHEMA_DIR"/*.override 2>/dev/null)" ]; then - "$1" "$GS_SCHEMA_DIR" + if [ -n "$(ls -A "$GSETTINGS_SCHEMA_DIR"/*.xml "$GSETTINGS_SCHEMA_DIR"/*.override 2>/dev/null)" ]; then + "$1" "$GSETTINGS_SCHEMA_DIR" fi fi } if [ "$needs_update" = true ]; then - async_exec compile_schemas "$SNAP/usr/lib/$ARCH/glib-2.0/glib-compile-schemas" + async_exec compile_schemas "/snap/core20/current/usr/lib/$ARCH/glib-2.0/glib-compile-schemas" fi # Gdk-pixbuf loaders diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts index f0ef1ea5c88db..9319fb4b48e13 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts @@ -453,12 +453,14 @@ export class NativeHostMainService extends Disposable implements INativeHostMain const gdkBackend = process.env['GDK_BACKEND']; const gioModuleDir = process.env['GIO_MODULE_DIR']; const gtkExePrefix = process.env['GTK_EXE_PREFIX']; + const gsettingsSchemaDir = process.env['GSETTINGS_SCHEMA_DIR']; delete process.env['GDK_PIXBUF_MODULE_FILE']; delete process.env['GDK_PIXBUF_MODULEDIR']; delete process.env['GTK_IM_MODULE_FILE']; delete process.env['GDK_BACKEND']; delete process.env['GIO_MODULE_DIR']; delete process.env['GTK_EXE_PREFIX']; + delete process.env['GSETTINGS_SCHEMA_DIR']; shell.openExternal(url); @@ -469,6 +471,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain process.env['GDK_BACKEND'] = gdkBackend; process.env['GIO_MODULE_DIR'] = gioModuleDir; process.env['GTK_EXE_PREFIX'] = gtkExePrefix; + process.env['GSETTINGS_SCHEMA_DIR'] = gsettingsSchemaDir; } moveItemToTrash(windowId: number | undefined, fullPath: string): Promise {