From 52ecaba8e0a383185992f929162c99d0683f0729 Mon Sep 17 00:00:00 2001 From: tresf Date: Thu, 24 Sep 2020 10:22:42 -0400 Subject: [PATCH] Fix wrong L&F on Ubuntu Closes #716 --- src/qz/installer/LinuxInstaller.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qz/installer/LinuxInstaller.java b/src/qz/installer/LinuxInstaller.java index 1780ac643..3d849559b 100644 --- a/src/qz/installer/LinuxInstaller.java +++ b/src/qz/installer/LinuxInstaller.java @@ -186,6 +186,9 @@ public void spawn(List args) throws Exception { HashMap tempEnv = new HashMap<>(); ArrayList toExport = new ArrayList<>(Arrays.asList(SUDO_EXPORTS)); for(String pid : pids) { + if(pid.isEmpty()) { + continue; + } try { String[] vars; if(SystemUtilities.isSolaris()) { @@ -226,6 +229,13 @@ public void spawn(List args) throws Exception { } else { log.debug("Expected USER={} but got USER={}, skipping results for {}", whoami, tempEnv.get("USER"), pid); } + + // Use gtk theme + if(env.containsKey("XDG_CURRENT_DESKTOP") && !env.containsKey("GNOME_DESKTOP_SESSION_ID")) { + if(env.get("XDG_CURRENT_DESKTOP").toLowerCase().contains("gnome")) { + env.put("GNOME_DESKTOP_SESSION_ID", "this-is-deprecated"); + } + } } if(env.size() == 0) {