fix(snap): allow portal override
cx
This commit is contained in:
1 parent
dd11e81a07
commit
de93411de0
2 files changed
+6
-3
No files matched your search
@@ -54,6 +54,7 @@ apps:
|
|||||||
# Prefer GNOME platform GL libs to avoid Mesa/driver mismatches on NVIDIA.
|
# Prefer GNOME platform GL libs to avoid Mesa/driver mismatches on NVIDIA.
|
||||||
LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu:$SNAP/gnome-platform/lib/x86_64-linux-gnu:$SNAP/gnome-platform/usr/lib:$SNAP/gnome-platform/lib:$LD_LIBRARY_PATH
|
LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu:$SNAP/gnome-platform/lib/x86_64-linux-gnu:$SNAP/gnome-platform/usr/lib:$SNAP/gnome-platform/lib:$LD_LIBRARY_PATH
|
||||||
WEBKIT_EXEC_PATH: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
|
WEBKIT_EXEC_PATH: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
|
||||||
|
GTK_USE_PORTAL: "0"
|
||||||
plugs:
|
plugs:
|
||||||
- network
|
- network
|
||||||
- audio-playback
|
- audio-playback
|
||||||
|
|||||||
@@ -32,10 +32,12 @@ fn main() {
|
|||||||
// This is set before any GTK initialization
|
// This is set before any GTK initialization
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use xdg-desktop-portal for file dialogs on Linux
|
// Use xdg-desktop-portal for file dialogs on Linux.
|
||||||
// This makes GTK apps use native file pickers (e.g., KDE's on Plasma)
|
// Honor explicit overrides (e.g., sandboxed environments).
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
std::env::set_var("GTK_USE_PORTAL", "1");
|
if std::env::var_os("GTK_USE_PORTAL").is_none() {
|
||||||
|
std::env::set_var("GTK_USE_PORTAL", "1");
|
||||||
|
}
|
||||||
|
|
||||||
// Prefer a writable TMPDIR to avoid GTK pixbuf cache crashes on some systems.
|
// Prefer a writable TMPDIR to avoid GTK pixbuf cache crashes on some systems.
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|||||||
Reference in new issue
Block a user