diff -Nru budgie-extras-1.4.0/debian/changelog budgie-extras-1.4.0/debian/changelog --- budgie-extras-1.4.0/debian/changelog 2023-05-21 10:58:25.000000000 +0100 +++ budgie-extras-1.4.0/debian/changelog 2023-11-07 23:29:45.000000000 +0000 @@ -1,3 +1,65 @@ +budgie-extras (1.4.0-1ubuntu3.1) jammy-security; urgency=medium + + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for clockworks applet + (LP: #2044373) + - d/patches/clockwork-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations, + thanks to original author + d/patches/clockwork-tmpxdg-pep8.patch: resolve pep8 + package test failure, thanks to original author + - CVE-2023-49342 + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for dropby applet + (LP: #2044373) + - d/patches Don-t-hard-code-tmp-in-window-shuffler-422.patch cherry-pick + patch to allow the security patch to apply + - d/patches/dropby-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations + d/patches/dropby-tmpxdg-pep8.patch: resolve pep8 + package test failure, thanks to original author + - CVE-2023-49343 + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for shuffler app + (LP: #2044373) + - d/patches/shuffler-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations, + thanks to original author + - CVE-2023-49344 + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for takeabreak + applet (LP: #2044373) + - d/patches/Don-t-hard-code-tmp-in-takeabreak-422.patch cherry-pick patch + to allow the security patch to apply + - d/patches/takeabreak-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations, + thanks to original author + d/patches/takeabreak-tmpxdg-pep8.patch: resolve pep8 + package test failure, thanks to original author + d/patches/takeabreak-tmpxdg-pep8_part2.patch: resolve pep8 + package test failure, thanks to original author + - CVE-2023-49345 + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for weathershow + applet (LP: #2044373) + - d/patches/Don-t-hard-code-tmp-in-weathershow-422.patch cherry-pick patch + to allow the security patch to apply + - d/patches/weathershow-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations, + thanks to original author + - CVE-2023-49346 + * SECURITY UPDATE: Predictable /tmp path could lead to + denial-of-service/manipulation of data for window + previews applet (LP: #2044373) + - d/patches Don-t-hard-code-tmp-in-previews-422.patch cherry-pick patch to + allow the security patch to apply + - d/patches/wpreviews-tmpxdg.patch: change /tmp path + usage to use XDG_RUNTIME_DIR/HOME user-space locations, + thanks to original author + - CVE-2023-49347 + + -- David Mohammed Tue, 07 Nov 2023 23:29:45 +0000 + budgie-extras (1.4.0-1ubuntu3) jammy; urgency=medium [ Samuel Lane ] diff -Nru budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg.patch budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,25 @@ +Applied-Upstream: commit:d03083732569126d2f21c8810d5a69554ccc5900 +Author: Samuel Lane +Last-Update: 2023-10-19 +Description: [PATCH 5/8] Resolves clockworks - fallback will use the existing + applet-created clockwork path in .config - fallback does not handle deletion + of temp files - this is mitigated by all clockwork files being kept + together + +--- + budgie-clockworks/cwtools.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/budgie-clockworks/cwtools.py ++++ b/budgie-clockworks/cwtools.py +@@ -45,8 +45,8 @@ + hrs_path = os.path.join(settingsdir, "hrs") + mins_path = os.path.join(settingsdir, "mins") + misc_dir = os.path.join(settingsdir, "misc") +-user = os.environ["USER"] +-tmp = os.path.join("/tmp", user + "_clockworks") ++tmpdir = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else settingsdir ++tmp = os.path.join(tmpdir, ".clockworks") + clock_datafile = os.path.join(settingsdir, "clockdata") + key = "org.ubuntubudgie.plugins.budgie-clockworks" + subkeys = ["background", "hour", "minute"] diff -Nru budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg-pep8.patch budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg-pep8.patch --- budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg-pep8.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/clockwork-tmpxdg-pep8.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,21 @@ +Applied-Upstream: commit:5f0129923ea608deef3b48dc723b57b18e5e9e7f +Author: David Mohammed +Last-Update: 2023-11-07 +Description: [PATCH 3/4] resolve clockworks pep8 + +--- + budgie-clockworks/cwtools.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/budgie-clockworks/cwtools.py ++++ b/budgie-clockworks/cwtools.py +@@ -45,7 +45,8 @@ + hrs_path = os.path.join(settingsdir, "hrs") + mins_path = os.path.join(settingsdir, "mins") + misc_dir = os.path.join(settingsdir, "misc") +-tmpdir = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else settingsdir ++tmpdir = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else settingsdir + tmp = os.path.join(tmpdir, ".clockworks") + clock_datafile = os.path.join(settingsdir, "clockdata") + key = "org.ubuntubudgie.plugins.budgie-clockworks" diff -Nru budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-previews-422.patch budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-previews-422.patch --- budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-previews-422.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-previews-422.patch 2023-11-07 23:29:45.000000000 +0000 @@ -0,0 +1,110 @@ +Applied-Upstream: commit:a7a72c73bf4e6e5d1c54b7cc14313b47400a3a4c +Author: David Mohammed +Last-Update: 2022-05-25 +Description: [PATCH] Don't hard-code /tmp in previews #422 + +--- + budgie-wpreviews/src/previews_creator.vala | 3 ++- + budgie-wpreviews/src/previews_daemon.vala | 18 ++++++++++-------- + budgie-wpreviews/src/previews_triggers.vala | 13 +++++++------ + 3 files changed, 19 insertions(+), 15 deletions(-) + +diff --git a/budgie-wpreviews/src/previews_creator.vala b/budgie-wpreviews/src/previews_creator.vala +index d7cd086..f8e00fb 100644 +--- a/budgie-wpreviews/src/previews_creator.vala ++++ b/budgie-wpreviews/src/previews_creator.vala +@@ -47,7 +47,8 @@ namespace create_previews { + gdk_scr = Gdk.Screen.get_default(); + if (gdk_scr == null) return; // usually if there is no display + string user = Environment.get_user_name(); +- previewspath = "/tmp/".concat(user, "_window-previews"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ previewspath = tmp.concat(user, "_window-previews"); + update_winlist(); + wnck_scr.window_opened.connect(update_winlist); + wnck_scr.window_opened.connect(refresh_new); +diff --git a/budgie-wpreviews/src/previews_daemon.vala b/budgie-wpreviews/src/previews_daemon.vala +index 25cf82f..a93e032 100644 +--- a/budgie-wpreviews/src/previews_daemon.vala ++++ b/budgie-wpreviews/src/previews_daemon.vala +@@ -661,24 +661,25 @@ namespace NewPreviews { + allworkspaces = previews_settings.get_boolean("allworkspaces"); + showtooltips = previews_settings.get_boolean("showtooltips"); + }); +- triggerdir = File.new_for_path("/tmp"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ triggerdir = File.new_for_path(tmp); + allappstrigger = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_all") ++ tmp.concat(user, "_prvtrigger_all") + ); + allappstriggerhotc = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_all_hotcorner") ++ tmp.concat(user, "_prvtrigger_all_hotcorner") + ); + currapptriggerhotc = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_curr_hotcorner") ++ tmp.concat(user, "_prvtrigger_curr_hotcorner") + ); + nexttrigger = File.new_for_path( +- "/tmp/".concat(user, "_nexttrigger") ++ tmp.concat(user, "_nexttrigger") + ); + previoustrigger = File.new_for_path( +- "/tmp/".concat(user, "_previoustrigger") ++ tmp.concat(user, "_previoustrigger") + ); + triggercurrent = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_current") ++ tmp.concat(user, "_prvtrigger_current") + ); + // start with a clean plate please + cleanup(); +@@ -711,7 +712,8 @@ namespace NewPreviews { + + public static void main (string[] args) { + user = Environment.get_user_name(); +- previewspath = "/tmp/".concat(user, "_window-previews"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ previewspath = tmp.concat(user, "_window-previews"); + try { + File file = File.new_for_commandline_arg (previewspath); + file.make_directory (); +diff --git a/budgie-wpreviews/src/previews_triggers.vala b/budgie-wpreviews/src/previews_triggers.vala +index d242cee..cbe78a4 100644 +--- a/budgie-wpreviews/src/previews_triggers.vala ++++ b/budgie-wpreviews/src/previews_triggers.vala +@@ -40,23 +40,24 @@ namespace previews_triggers { + // user + string user = Environment.get_user_name(); + // files ++ var tmp = Environment.get_tmp_dir() + "/"; + File allappstrigger = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_all") ++ tmp.concat(user, "_prvtrigger_all") + ); + File nexttrigger = File.new_for_path( +- "/tmp/".concat(user, "_nexttrigger") ++ tmp.concat(user, "_nexttrigger") + ); + File previoustrigger = File.new_for_path( +- "/tmp/".concat(user, "_previoustrigger") ++ tmp.concat(user, "_previoustrigger") + ); + File triggercurrent = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_current") ++ tmp.concat(user, "_prvtrigger_current") + ); + File allappstriggerhotc = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_all_hotcorner") ++ tmp.concat(user, "_prvtrigger_all_hotcorner") + ); + File currapptriggerhotc = File.new_for_path( +- "/tmp/".concat(user, "_prvtrigger_curr_hotcorner") ++ tmp.concat(user, "_prvtrigger_curr_hotcorner") + ); + + File trg = nexttrigger; +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-takeabreak-422.patch budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-takeabreak-422.patch --- budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-takeabreak-422.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-takeabreak-422.patch 2023-11-07 23:29:45.000000000 +0000 @@ -0,0 +1,50 @@ +Applied-Upstream: commit:51258ac514c734fcf1cf832369277ff0794c38ca +Author: David Mohammed +Last-Update: 2022-05-25 +Description: [PATCH] Don't hard-code /tmp in takeabreak #422 + +--- + budgie-takeabreak/budgie_takeabreak.py | 3 ++- + budgie-takeabreak/takeabreak_run | 5 +++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/budgie-takeabreak/budgie_takeabreak.py b/budgie-takeabreak/budgie_takeabreak.py +index edd0104..827ff66 100644 +--- a/budgie-takeabreak/budgie_takeabreak.py ++++ b/budgie-takeabreak/budgie_takeabreak.py +@@ -24,7 +24,8 @@ program. If not, see . + + + user = os.environ["USER"] +-nextbreakfile = "/tmp/nextbreak_" + user ++tmp = GLib.get_tmp_dir() ++nextbreakfile = tmp + "/nextbreak_" + user + tab_settings = Gio.Settings.new("org.ubuntubudgie.plugins.takeabreak") + + +diff --git a/budgie-takeabreak/takeabreak_run b/budgie-takeabreak/takeabreak_run +index 60409d4..9abbedd 100755 +--- a/budgie-takeabreak/takeabreak_run ++++ b/budgie-takeabreak/takeabreak_run +@@ -1,7 +1,7 @@ + #!/usr/bin/env python3 + import gi.repository + gi.require_version("Gdk", "3.0") +-from gi.repository import Gio, Gdk ++from gi.repository import Gio, Gdk, GLib + import subprocess + import time + import os +@@ -76,7 +76,8 @@ def subprocess_tasks(task, command_list, fallbackval=None): + + def write_nextbreak(): + next_break = time.time() + awaketime +- open("/tmp/nextbreak_" + user, "wt").write(str(next_break)) ++ tmp = GLib.get_tmp_dir() ++ open(tmp + "/nextbreak_" + user, "wt").write(str(next_break)) + + + def sendmessage(title, message, icon=""): +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-weathershow-422.patch budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-weathershow-422.patch --- budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-weathershow-422.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-weathershow-422.patch 2023-11-07 23:29:45.000000000 +0000 @@ -0,0 +1,41 @@ +Applied-Upstream: commit:a114cda42674de9866ff1f34991550657149b2e7 +Author: David Mohammed +Last-Update: 2022-05-25 +Description: [PATCH] Don't hard-code /tmp in weathershow #422 + +--- + budgie-weathershow/src/desktop_weather/desktop_weather.vala | 3 ++- + budgie-weathershow/src/weathershow/WeatherShow.vala | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/budgie-weathershow/src/desktop_weather/desktop_weather.vala b/budgie-weathershow/src/desktop_weather/desktop_weather.vala +index e8564f9..60beb10 100644 +--- a/budgie-weathershow/src/desktop_weather/desktop_weather.vala ++++ b/budgie-weathershow/src/desktop_weather/desktop_weather.vala +@@ -135,7 +135,8 @@ public class DesktopWeather : Gtk.Window { + this.draw.connect(on_draw); + // monitored datafile + string username = Environment.get_user_name(); +- string src = "/tmp/".concat(username, "_weatherdata"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ string src = tmp.concat(username, "_weatherdata"); + datasrc = File.new_for_path(src); + // report + maingrid = new Gtk.Grid(); +diff --git a/budgie-weathershow/src/weathershow/WeatherShow.vala b/budgie-weathershow/src/weathershow/WeatherShow.vala +index aa14d47..f56d87c 100644 +--- a/budgie-weathershow/src/weathershow/WeatherShow.vala ++++ b/budgie-weathershow/src/weathershow/WeatherShow.vala +@@ -349,7 +349,8 @@ namespace WeatherShowApplet { + // write to file only for desktop show + if (show_ondesktop == true) { + string username = Environment.get_user_name(); +- string src = "/tmp/".concat(username, "_weatherdata"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ string src = tmp.concat(username, "_weatherdata"); + WeatherShowFunctions.write_tofile(src, result_current); + } + } +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-window-shuffler-422.patch budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-window-shuffler-422.patch --- budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-window-shuffler-422.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/Don-t-hard-code-tmp-in-window-shuffler-422.patch 2023-11-07 23:29:45.000000000 +0000 @@ -0,0 +1,216 @@ +Applied-Upstream: commit:90deed96a23a999df38426c2a1a3134d40f73e0f +Author: David Mohammed +Last-Update: 2022-05-25 +Description: [PATCH] Don't hard-code /tmp in window shuffler #422 + +--- + budgie-window-shuffler/applet/src/ShufflerApplet.vala | 3 ++- + budgie-window-shuffler/src/gridwindow.vala | 3 ++- + budgie-window-shuffler/src/layouts_popup.vala | 6 ++++-- + budgie-window-shuffler/src/run_layout.vala | 8 +++++--- + budgie-window-shuffler/src/shuffler_control.vala | 3 ++- + budgie-window-shuffler/src/sizeexceeds_warning.vala | 3 ++- + budgie-window-shuffler/src/toggle_layouts_popup.vala | 3 ++- + budgie-window-shuffler/src/togglegui.vala | 3 ++- + budgie-window-shuffler/src/togglelayoutspopup.vala | 3 ++- + budgie-window-shuffler/src/windowshufflerdaemon.vala | 8 +++++--- + 10 files changed, 28 insertions(+), 15 deletions(-) + +diff --git a/budgie-window-shuffler/applet/src/ShufflerApplet.vala b/budgie-window-shuffler/applet/src/ShufflerApplet.vala +index ea80aa6..8bbc770 100644 +--- a/budgie-window-shuffler/applet/src/ShufflerApplet.vala ++++ b/budgie-window-shuffler/applet/src/ShufflerApplet.vala +@@ -86,9 +86,10 @@ namespace ShufflerApplet { + private void open_shufflersettings() { + if (procruns(Config.SHUFFLER_DIR + "/shuffler_control")) { + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + try { + File showpage_trigger = File.new_for_path( +- @"/tmp/shufflerapplettrigger_$user" ++ tmp + @"shufflerapplettrigger_$user" + ); + showpage_trigger.create(FileCreateFlags.NONE); + } +diff --git a/budgie-window-shuffler/src/gridwindow.vala b/budgie-window-shuffler/src/gridwindow.vala +index f65ecf6..164fc8d 100644 +--- a/budgie-window-shuffler/src/gridwindow.vala ++++ b/budgie-window-shuffler/src/gridwindow.vala +@@ -629,8 +629,9 @@ namespace GridWindowSection { + // monitoring files / dirs + FileMonitor monitor; + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + gridtrigger = File.new_for_path( +- "/tmp/".concat(user, "_gridtrigger") ++ tmp.concat(user, "_gridtrigger") + ); + try { + monitor = gridtrigger.monitor(FileMonitorFlags.NONE, null); +diff --git a/budgie-window-shuffler/src/layouts_popup.vala b/budgie-window-shuffler/src/layouts_popup.vala +index ca68bee..f7f7894 100644 +--- a/budgie-window-shuffler/src/layouts_popup.vala ++++ b/budgie-window-shuffler/src/layouts_popup.vala +@@ -487,7 +487,8 @@ namespace LayoutsPopup { + targetfile = File.new_for_path(path); + } + else { +- string runfile = "/tmp/".concat(username, "_istestingtask"); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ string runfile = tmp.concat(username, "_istestingtask"); + targetfile = File.new_for_path(runfile); + } + if (targetfile.query_exists ()) { +@@ -1372,8 +1373,9 @@ namespace LayoutsPopup { + ".config/budgie-extras/shuffler/layouts", true + ); + username = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + string triggerpath = create_dirs_file( +- "/tmp/".concat(username, "_shufflertriggers") ++ tmp.concat(username, "_shufflertriggers") + ); + // watch triggerfile + // containing dir +diff --git a/budgie-window-shuffler/src/run_layout.vala b/budgie-window-shuffler/src/run_layout.vala +index 4c67809..da51e81 100644 +--- a/budgie-window-shuffler/src/run_layout.vala ++++ b/budgie-window-shuffler/src/run_layout.vala +@@ -199,7 +199,8 @@ namespace ShufflerLayouts { + private void create_busyfile (File busyfile) { + // create triggerfile to temporarily disable possibly set windowrules + string user = Environment.get_user_name(); +- File busy = File.new_for_path ("/tmp/".concat(user, "_running_layout")); ++ var tmp = Environment.get_tmp_dir() + "/"; ++ File busy = File.new_for_path (tmp.concat(user, "_running_layout")); + try { + if (!busy.query_exists()) { + busy.create(FileCreateFlags.REPLACE_DESTINATION); +@@ -374,8 +375,9 @@ namespace ShufflerLayouts { + xids_moved_windows = {}; + // define & create triggerfile (putting rules on hold) + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + File busyfile = File.new_for_path ( +- "/tmp/".concat(user, "_running_layout") ++ tmp.concat(user, "_running_layout") + ); + create_busyfile(busyfile); + // get windowlist (xid) of windows that existed on launch +@@ -402,7 +404,7 @@ namespace ShufflerLayouts { + } + else { + string username = Environment.get_user_name(); +- validpaths = {"/tmp/".concat(username, "_istestingtask")}; ++ validpaths = {tmp.concat(username, "_istestingtask")}; + } + } + else { +diff --git a/budgie-window-shuffler/src/shuffler_control.vala b/budgie-window-shuffler/src/shuffler_control.vala +index a4d37a7..6086341 100644 +--- a/budgie-window-shuffler/src/shuffler_control.vala ++++ b/budgie-window-shuffler/src/shuffler_control.vala +@@ -1690,8 +1690,9 @@ namespace ShufflerControl2 { + new ShufflerControlWindow(page); + // watch trigger to switch to applet settings + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir(); + File showpage_trigger = File.new_for_path( +- @"/tmp/shufflerapplettrigger_$user" ++ tmp + @"/shufflerapplettrigger_$user" + ); + delete_file(showpage_trigger); + FileMonitor monitor_showpage_trigger; +diff --git a/budgie-window-shuffler/src/sizeexceeds_warning.vala b/budgie-window-shuffler/src/sizeexceeds_warning.vala +index 2b34f65..4407022 100644 +--- a/budgie-window-shuffler/src/sizeexceeds_warning.vala ++++ b/budgie-window-shuffler/src/sizeexceeds_warning.vala +@@ -64,7 +64,8 @@ namespace ShufflerExceedsWarning { + sc.add_class ("header"); + label.xalign = (float)0.5; + this.add (maingrid); +- Gtk.Image img = new Gtk.Image.from_file ("/tmp/shuffler-warning.png"); ++ var tmp = Environment.get_tmp_dir(); ++ Gtk.Image img = new Gtk.Image.from_file (tmp + "/shuffler-warning.png"); + maingrid.attach (label, 0, 0, 1, 1); + maingrid.attach (img, 0, 0, 1, 1); + this.destroy.connect (Gtk.main_quit); +diff --git a/budgie-window-shuffler/src/toggle_layouts_popup.vala b/budgie-window-shuffler/src/toggle_layouts_popup.vala +index 3665dbd..e1a9d26 100644 +--- a/budgie-window-shuffler/src/toggle_layouts_popup.vala ++++ b/budgie-window-shuffler/src/toggle_layouts_popup.vala +@@ -58,8 +58,9 @@ namespace ToggleShufflerGUI { + + // make sure triggerdir exists + string username = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + string triggerpath = create_dirs_file( +- "/tmp/".concat(username, "_shufflertriggers") ++ tmp.concat(username, "_shufflertriggers") + ); + // then define trigger + File popuptrigger = File.new_for_path(triggerpath.concat("/layoutspopup")); +diff --git a/budgie-window-shuffler/src/togglegui.vala b/budgie-window-shuffler/src/togglegui.vala +index bd3ffe2..9f76e16 100644 +--- a/budgie-window-shuffler/src/togglegui.vala ++++ b/budgie-window-shuffler/src/togglegui.vala +@@ -29,8 +29,9 @@ namespace ToggleShufflerGUI { + + public static void main (string[] args) { + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + File gridtrigger = File.new_for_path( +- "/tmp/".concat(user, "_gridtrigger") ++ tmp.concat(user, "_gridtrigger") + ); + bool gridtriggerexists = gridtrigger.query_exists(); + if (!gridtriggerexists) { +diff --git a/budgie-window-shuffler/src/togglelayoutspopup.vala b/budgie-window-shuffler/src/togglelayoutspopup.vala +index 7b362b9..81efc59 100644 +--- a/budgie-window-shuffler/src/togglelayoutspopup.vala ++++ b/budgie-window-shuffler/src/togglelayoutspopup.vala +@@ -51,8 +51,9 @@ namespace ToggleShufflerGUI { + public static void main (string[] args) { + // make sure triggerdir exists + string username = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + string triggerpath = create_dirs_file( +- "/tmp/".concat(username, "_shufflertriggers") ++ tmp.concat(username, "_shufflertriggers") + ); + // then define trigger + File popuptrigger = File.new_for_path(triggerpath.concat("/layoutspopup")); +diff --git a/budgie-window-shuffler/src/windowshufflerdaemon.vala b/budgie-window-shuffler/src/windowshufflerdaemon.vala +index 98fcd37..44726c3 100755 +--- a/budgie-window-shuffler/src/windowshufflerdaemon.vala ++++ b/budgie-window-shuffler/src/windowshufflerdaemon.vala +@@ -984,7 +984,8 @@ namespace ShufflerEssentialInfo { + create_box (surface, context, {30, 30, 8, 8}, {1, 1, 1, 1}); + create_box (surface, context, {40, 20, 8, 8}, {1, 1, 1, 1}); + // Save the image: +- surface.write_to_png ("/tmp/shuffler-warning.png"); ++ var tmp = Environment.get_tmp_dir(); ++ surface.write_to_png (tmp + "/shuffler-warning.png"); + } + + private void create_box ( +@@ -1004,13 +1005,14 @@ namespace ShufflerEssentialInfo { + gridguiruns = false; + FileMonitor monitor; + string user = Environment.get_user_name(); ++ var tmp = Environment.get_tmp_dir() + "/"; + // layout_busy triggerfile for run_layout + layout_busy = File.new_for_path ( +- "/tmp/".concat(user, @"_running_layout") ++ tmp.concat(user, @"_running_layout") + ); + // and one for grid + File gridtrigger = File.new_for_path( +- "/tmp/".concat(user, "_gridtrigger") ++ tmp.concat(user, "_gridtrigger") + ); + try { + monitor = gridtrigger.monitor(FileMonitorFlags.NONE, null); +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/dropby-tmpxdg.patch budgie-extras-1.4.0/debian/patches/dropby-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/dropby-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/dropby-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,98 @@ +Applied-Upstream: commit:e75c94af249191bdbd33eebf7a62d4234a0d8be5 +Author: Samuel Lane +Last-Update: 2023-10-19 +Description: [PATCH 6/8] Resolves dropby + +--- + budgie-dropby/budgie_dropby.py | 7 +++---- + budgie-dropby/checkonwin | 4 ++-- + budgie-dropby/copy_flash | 4 ++-- + budgie-dropby/dropover | 9 ++++----- + 4 files changed, 11 insertions(+), 13 deletions(-) + +diff --git a/budgie-dropby/budgie_dropby.py b/budgie-dropby/budgie_dropby.py +index b634ae4..b766f6c 100644 +--- a/budgie-dropby/budgie_dropby.py ++++ b/budgie-dropby/budgie_dropby.py +@@ -108,8 +108,8 @@ class BudgieDropByApplet(Budgie.Applet): + self.uuid = uuid + self.connect("destroy", Gtk.main_quit) + app_path = os.path.dirname(os.path.abspath(__file__)) +- user = os.environ["USER"] +- self.copytrigger = "/tmp/" + user + "_dropby_icon_copy" ++ self.tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ self.copytrigger = os.path.join(self.tmp_path, ".dropby_icon_copy") + self.copying = False + self.winpath = os.path.join(app_path, "dropover") + self.box = Gtk.EventBox() +@@ -188,8 +188,7 @@ class BudgieDropByApplet(Budgie.Applet): + + def create_windowtrigger(self, *args): + if not self.check_winexists(): +- user = os.environ["USER"] +- open("/tmp/" + user + "_call_dropby", "wt").write("") ++ open(os.path.join(self.tmp_path, ".call_dropby"), "wt").write("") + + def start_dropover(self): + try: +diff --git a/budgie-dropby/checkonwin b/budgie-dropby/checkonwin +index 5c5f069..cc048d9 100755 +--- a/budgie-dropby/checkonwin ++++ b/budgie-dropby/checkonwin +@@ -19,8 +19,8 @@ should have received a copy of the GNU General Public License along with this + program. If not, see . + """ + +-dropby_user = os.environ["USER"] +-timer = "/tmp/" + dropby_user + "_keepdropbywin" ++tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++timer = os.path.join(tmp_path, ".keepdropbywin") + + + try: +diff --git a/budgie-dropby/copy_flash b/budgie-dropby/copy_flash +index 4632f05..920f49b 100755 +--- a/budgie-dropby/copy_flash ++++ b/budgie-dropby/copy_flash +@@ -87,8 +87,8 @@ def copy(source, targetdir): + + + # get targeted path +-user = os.environ["USER"] +-cptrigger = "/tmp/" + user + "_dropby_icon_copy" ++tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++cptrigger = os.path.join(tmp_path, ".dropby_icon_copy") + try: + target = subprocess.check_output([ + "/usr/bin/zenity", "--file-selection", "--directory", +diff --git a/budgie-dropby/dropover b/budgie-dropby/dropover +index 9263a09..e1b5f9a 100755 +--- a/budgie-dropby/dropover ++++ b/budgie-dropby/dropover +@@ -62,10 +62,10 @@ class WatchVolumes: + app_path = os.path.dirname(os.path.abspath(__file__)) + self.copyscript = os.path.join(app_path, "copy_flash") + self.start_timer = os.path.join(app_path, "checkonwin") +- user = os.environ["USER"] +- self.timer = "/tmp/" + user + "_keepdropbywin" ++ self.tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ self.timer = os.path.join(self.tmp_path, ".keepdropbywin") + # setup watching trigger (uncomment below lines if) +- infofile = Gio.File.new_for_path("/tmp") ++ infofile = Gio.File.new_for_path(self.tmp_path) + monitor = infofile.monitor(Gio.FileMonitorFlags.NONE, None) + monitor.connect("changed", self.actonfile) + # setup watching applet presence +@@ -100,8 +100,7 @@ class WatchVolumes: + + def actonfile(self, arg1, arg2, arg3, event): + # ok, let's replace once dbus is a fact +- user = os.environ["USER"] +- trigger = "/tmp/" + user + "_call_dropby" ++ trigger = os.path.join(self.tmp_path, ".call_dropby") + if all([ + event == Gio.FileMonitorEvent.CREATED, + os.path.exists(trigger) +-- +2.34.1 + diff -Nru budgie-extras-1.4.0/debian/patches/dropby-tmpxdg-pep8.patch budgie-extras-1.4.0/debian/patches/dropby-tmpxdg-pep8.patch --- budgie-extras-1.4.0/debian/patches/dropby-tmpxdg-pep8.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/dropby-tmpxdg-pep8.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,71 @@ +Applied-Upstream: commit:fa3525c06b213ab83423d2256972de066e30a78d +Author: David Mohammed +Last-Update: 20203-11-07 +Description: [PATCH 2/4] Resolve dropby pep8 + +--- + budgie-dropby/budgie_dropby.py | 3 ++- + budgie-dropby/checkonwin | 3 ++- + budgie-dropby/copy_flash | 3 ++- + budgie-dropby/dropover | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/budgie-dropby/budgie_dropby.py b/budgie-dropby/budgie_dropby.py +index b766f6c..b2eddeb 100644 +--- a/budgie-dropby/budgie_dropby.py ++++ b/budgie-dropby/budgie_dropby.py +@@ -108,7 +108,8 @@ class BudgieDropByApplet(Budgie.Applet): + self.uuid = uuid + self.connect("destroy", Gtk.main_quit) + app_path = os.path.dirname(os.path.abspath(__file__)) +- self.tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ self.tmp_path = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + self.copytrigger = os.path.join(self.tmp_path, ".dropby_icon_copy") + self.copying = False + self.winpath = os.path.join(app_path, "dropover") +diff --git a/budgie-dropby/checkonwin b/budgie-dropby/checkonwin +index cc048d9..36c0069 100755 +--- a/budgie-dropby/checkonwin ++++ b/budgie-dropby/checkonwin +@@ -19,7 +19,8 @@ should have received a copy of the GNU General Public License along with this + program. If not, see . + """ + +-tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++tmp_path = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + timer = os.path.join(tmp_path, ".keepdropbywin") + + +diff --git a/budgie-dropby/copy_flash b/budgie-dropby/copy_flash +index 920f49b..de215de 100755 +--- a/budgie-dropby/copy_flash ++++ b/budgie-dropby/copy_flash +@@ -87,7 +87,8 @@ def copy(source, targetdir): + + + # get targeted path +-tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++tmp_path = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + cptrigger = os.path.join(tmp_path, ".dropby_icon_copy") + try: + target = subprocess.check_output([ +diff --git a/budgie-dropby/dropover b/budgie-dropby/dropover +index e1b5f9a..40f8438 100755 +--- a/budgie-dropby/dropover ++++ b/budgie-dropby/dropover +@@ -62,7 +62,8 @@ class WatchVolumes: + app_path = os.path.dirname(os.path.abspath(__file__)) + self.copyscript = os.path.join(app_path, "copy_flash") + self.start_timer = os.path.join(app_path, "checkonwin") +- self.tmp_path = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ self.tmp_path = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + self.timer = os.path.join(self.tmp_path, ".keepdropbywin") + # setup watching trigger (uncomment below lines if) + infofile = Gio.File.new_for_path(self.tmp_path) +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/series budgie-extras-1.4.0/debian/patches/series --- budgie-extras-1.4.0/debian/patches/series 2023-05-21 10:58:19.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/series 2023-11-07 23:29:45.000000000 +0000 @@ -6,3 +6,17 @@ Use-Idle.add-to-spawn-Showtime-Desktop.patch Fixed-wallstreet-for-custom-dir-with-spaces.patch Removed-print-statement-for-testing.patch +clockwork-tmpxdg.patch +clockwork-tmpxdg-pep8.patch +dropby-tmpxdg.patch +dropby-tmpxdg-pep8.patch +Don-t-hard-code-tmp-in-window-shuffler-422.patch +shuffler-tmpxdg.patch +Don-t-hard-code-tmp-in-takeabreak-422.patch +takeabreak-tmpxdg.patch +takeabreak-tmpxdg-pep8.patch +takeabreak-tmpxdg-pep8_part2.patch +Don-t-hard-code-tmp-in-weathershow-422.patch +weathershow-tmpxdg.patch +Don-t-hard-code-tmp-in-previews-422.patch +wpreviews-tmpxdg.patch diff -Nru budgie-extras-1.4.0/debian/patches/shuffler-tmpxdg.patch budgie-extras-1.4.0/debian/patches/shuffler-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/shuffler-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/shuffler-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,224 @@ +Applied-Upstream: commit:11b02011ad2f6d46485b292713af09f7314843a5 +Author: Samuel Lane +Last-Update: 2023-10-20 +Description: [PATCH 8/8] Resolves 1 (1.1 - 1.6) - resolves 1.1 - resolves 1.2 - + resolves 1.3 - resolves 1.4 - resolves 1.5 - resolves 1.6 + +--- + .../applet/src/ShufflerApplet.vala | 5 ++--- + budgie-window-shuffler/src/gridwindow.vala | 5 ++--- + budgie-window-shuffler/src/layouts_popup.vala | 12 +++++------- + budgie-window-shuffler/src/run_layout.vala | 15 +++++---------- + budgie-window-shuffler/src/shuffler_control.vala | 5 ++--- + .../src/sizeexceeds_warning.vala | 6 ++++-- + .../src/toggle_layouts_popup.vala | 7 +++---- + budgie-window-shuffler/src/togglegui.vala | 5 ++--- + .../src/windowshufflerdaemon.vala | 11 +++++------ + 9 files changed, 30 insertions(+), 41 deletions(-) + +--- a/budgie-window-shuffler/applet/src/ShufflerApplet.vala ++++ b/budgie-window-shuffler/applet/src/ShufflerApplet.vala +@@ -85,11 +85,10 @@ + + private void open_shufflersettings() { + if (procruns(Config.SHUFFLER_DIR + "/shuffler_control")) { +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + try { + File showpage_trigger = File.new_for_path( +- tmp + @"shufflerapplettrigger_$user" ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shufflerapplettrigger") + ); + showpage_trigger.create(FileCreateFlags.NONE); + } +--- a/budgie-window-shuffler/src/gridwindow.vala ++++ b/budgie-window-shuffler/src/gridwindow.vala +@@ -628,10 +628,9 @@ + timestamp_window = new Gdk.X11.Window.foreign_for_display(display, xwindow); + // monitoring files / dirs + FileMonitor monitor; +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + gridtrigger = File.new_for_path( +- tmp.concat(user, "_gridtrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".gridtrigger") + ); + try { + monitor = gridtrigger.monitor(FileMonitorFlags.NONE, null); +--- a/budgie-window-shuffler/src/layouts_popup.vala ++++ b/budgie-window-shuffler/src/layouts_popup.vala +@@ -36,7 +36,6 @@ + Wnck.Screen wnck_scr; + Gtk.Dialog? get_task; + Gtk.Dialog? ask_confirmdialog; +- string username; + string homedir; + string triggerfpath; + +@@ -487,8 +486,8 @@ + targetfile = File.new_for_path(path); + } + else { +- var tmp = Environment.get_tmp_dir() + "/"; +- string runfile = tmp.concat(username, "_istestingtask"); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ string runfile = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".istestingtask"); + targetfile = File.new_for_path(runfile); + } + if (targetfile.query_exists ()) { +@@ -1372,16 +1371,15 @@ + searchpath = create_dirs_file( + ".config/budgie-extras/shuffler/layouts", true + ); +- username = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + string triggerpath = create_dirs_file( +- tmp.concat(username, "_shufflertriggers") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shufflertriggers") + ); + // watch triggerfile + // containing dir + File triggerdir = File.new_for_path(triggerpath); + // triggerfilepath +- triggerfpath = triggerpath.concat("/layoutspopup"); ++ triggerfpath = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, triggerpath, "layoutspopup"); + popuptrigger = File.new_for_path(triggerfpath); + FileMonitor? triggerpath_monitor = null; + try { +--- a/budgie-window-shuffler/src/run_layout.vala ++++ b/budgie-window-shuffler/src/run_layout.vala +@@ -198,9 +198,8 @@ + + private void create_busyfile (File busyfile) { + // create triggerfile to temporarily disable possibly set windowrules +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- File busy = File.new_for_path (tmp.concat(user, "_running_layout")); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ File busy = File.new_for_path (GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".running_layout")); + try { + if (!busy.query_exists()) { + busy.create(FileCreateFlags.REPLACE_DESTINATION); +@@ -374,11 +373,8 @@ + indices_done = {}; + xids_moved_windows = {}; + // define & create triggerfile (putting rules on hold) +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- File busyfile = File.new_for_path ( +- tmp.concat(user, "_running_layout") +- ); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ File busyfile = File.new_for_path (GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".running_layout")); + create_busyfile(busyfile); + // get windowlist (xid) of windows that existed on launch + Gtk.init(ref args); +@@ -403,8 +399,7 @@ + validpaths = {searchpath.concat("/", args[2])}; + } + else { +- string username = Environment.get_user_name(); +- validpaths = {tmp.concat(username, "_istestingtask")}; ++ validpaths = {GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".istestingtask")}; + } + } + else { +--- a/budgie-window-shuffler/src/shuffler_control.vala ++++ b/budgie-window-shuffler/src/shuffler_control.vala +@@ -1689,10 +1689,9 @@ + } + new ShufflerControlWindow(page); + // watch trigger to switch to applet settings +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir(); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + File showpage_trigger = File.new_for_path( +- tmp + @"/shufflerapplettrigger_$user" ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shufflerapplettrigger") + ); + delete_file(showpage_trigger); + FileMonitor monitor_showpage_trigger; +--- a/budgie-window-shuffler/src/sizeexceeds_warning.vala ++++ b/budgie-window-shuffler/src/sizeexceeds_warning.vala +@@ -64,8 +64,10 @@ + sc.add_class ("header"); + label.xalign = (float)0.5; + this.add (maingrid); +- var tmp = Environment.get_tmp_dir(); +- Gtk.Image img = new Gtk.Image.from_file (tmp + "/shuffler-warning.png"); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ Gtk.Image img = new Gtk.Image.from_file ( ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shuffler-warning.png") ++ ); + maingrid.attach (label, 0, 0, 1, 1); + maingrid.attach (img, 0, 0, 1, 1); + this.destroy.connect (Gtk.main_quit); +--- a/budgie-window-shuffler/src/toggle_layouts_popup.vala ++++ b/budgie-window-shuffler/src/toggle_layouts_popup.vala +@@ -57,13 +57,12 @@ + print(@"$fromcontrol\n"); + + // make sure triggerdir exists +- string username = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + string triggerpath = create_dirs_file( +- tmp.concat(username, "_shufflertriggers") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shufflertriggers") + ); + // then define trigger +- File popuptrigger = File.new_for_path(triggerpath.concat("/layoutspopup")); ++ File popuptrigger = File.new_for_path(GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, triggerpath, "layoutspopup")); + bool popuptriggerexists = popuptrigger.query_exists(); + if (!popuptriggerexists) { + create_trigger(popuptrigger, fromcontrol); +--- a/budgie-window-shuffler/src/togglegui.vala ++++ b/budgie-window-shuffler/src/togglegui.vala +@@ -28,10 +28,9 @@ + } + + public static void main (string[] args) { +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + File gridtrigger = File.new_for_path( +- tmp.concat(user, "_gridtrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".gridtrigger") + ); + bool gridtriggerexists = gridtrigger.query_exists(); + if (!gridtriggerexists) { +--- a/budgie-window-shuffler/src/windowshufflerdaemon.vala ++++ b/budgie-window-shuffler/src/windowshufflerdaemon.vala +@@ -984,8 +984,8 @@ + create_box (surface, context, {30, 30, 8, 8}, {1, 1, 1, 1}); + create_box (surface, context, {40, 20, 8, 8}, {1, 1, 1, 1}); + // Save the image: +- var tmp = Environment.get_tmp_dir(); +- surface.write_to_png (tmp + "/shuffler-warning.png"); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ surface.write_to_png (GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".shuffler-warning.png")); + } + + private void create_box ( +@@ -1004,15 +1004,14 @@ + // FileMonitor stuff, see if gui runs (disable jump & tileactive) + gridguiruns = false; + FileMonitor monitor; +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + // layout_busy triggerfile for run_layout + layout_busy = File.new_for_path ( +- tmp.concat(user, @"_running_layout") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".running_layout") + ); + // and one for grid + File gridtrigger = File.new_for_path( +- tmp.concat(user, "_gridtrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".gridtrigger") + ); + try { + monitor = gridtrigger.monitor(FileMonitorFlags.NONE, null); diff -Nru budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg.patch budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,53 @@ +Applied-Upstream: commit:ffa29d4bfe880217e28d99de99026760ae6fe1d4 +Author: Samuel Lane +Last-Update: 2023-10-18 +Description: [PATCH 4/8] Resolves 3 / 3.1 - resolves 3.1 (entirety of no. 3) + +--- + budgie-takeabreak/budgie_takeabreak.py | 6 +++--- + budgie-takeabreak/takeabreak_run | 5 +++-- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/budgie-takeabreak/budgie_takeabreak.py b/budgie-takeabreak/budgie_takeabreak.py +index 2bc25c7..495707c 100644 +--- a/budgie-takeabreak/budgie_takeabreak.py ++++ b/budgie-takeabreak/budgie_takeabreak.py +@@ -23,9 +23,8 @@ program. If not, see . + """ + + +-user = os.environ["USER"] +-tmp = GLib.get_tmp_dir() +-nextbreakfile = tmp + "/nextbreak_" + user ++tmp = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++nextbreakfile = os.path.join(tmp, ".nextbreak") + tab_settings = Gio.Settings.new("org.ubuntubudgie.plugins.takeabreak") + + +@@ -261,6 +260,7 @@ class BudgieTakeaBreakApplet(Budgie.Applet): + return False + + def kill_runner(self): ++ user = os.environ["USER"] + try: + # I know, old school, but it works well + pid = subprocess.check_output([ +diff --git a/budgie-takeabreak/takeabreak_run b/budgie-takeabreak/takeabreak_run +index 9abbedd..e2078ea 100755 +--- a/budgie-takeabreak/takeabreak_run ++++ b/budgie-takeabreak/takeabreak_run +@@ -76,8 +76,9 @@ def subprocess_tasks(task, command_list, fallbackval=None): + + def write_nextbreak(): + next_break = time.time() + awaketime +- tmp = GLib.get_tmp_dir() +- open(tmp + "/nextbreak_" + user, "wt").write(str(next_break)) ++ tmp = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ nextbreakfile = os.path.join(tmp, ".nextbreak") ++ open(nextbreakfile, "wt").write(str(next_break)) + + + def sendmessage(title, message, icon=""): +-- +2.34.1 + diff -Nru budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8_part2.patch budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8_part2.patch --- budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8_part2.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8_part2.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,26 @@ +Applied-Upstream: commit:45f1a54258aaaa27459b25f476d96ca5b1f2b25f +Author: David Mohammed +Last-Update: 2023-11-07 +Description: [PATCH 4/4] resolve takeabreak pep8 + +--- + budgie-takeabreak/budgie_takeabreak.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/budgie-takeabreak/budgie_takeabreak.py b/budgie-takeabreak/budgie_takeabreak.py +index 495707c..cbb53ef 100644 +--- a/budgie-takeabreak/budgie_takeabreak.py ++++ b/budgie-takeabreak/budgie_takeabreak.py +@@ -23,7 +23,8 @@ program. If not, see . + """ + + +-tmp = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++tmp = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + nextbreakfile = os.path.join(tmp, ".nextbreak") + tab_settings = Gio.Settings.new("org.ubuntubudgie.plugins.takeabreak") + +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8.patch budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8.patch --- budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/takeabreak-tmpxdg-pep8.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,26 @@ +Applied-Upstream: commit:c2889de3c02ce7e447bdf8efa569fe7b4fb641ca +Description: David Mohammed +Last-Update: 2023-11-07 +Description: [PATCH 1/4] takeabreak pep8 correction + +--- + budgie-takeabreak/takeabreak_run | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/budgie-takeabreak/takeabreak_run b/budgie-takeabreak/takeabreak_run +index e2078ea..62db505 100755 +--- a/budgie-takeabreak/takeabreak_run ++++ b/budgie-takeabreak/takeabreak_run +@@ -76,7 +76,8 @@ def subprocess_tasks(task, command_list, fallbackval=None): + + def write_nextbreak(): + next_break = time.time() + awaketime +- tmp = os.getenv("XDG_RUNTIME_DIR") if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") ++ tmp = os.getenv("XDG_RUNTIME_DIR") \ ++ if "XDG_RUNTIME_DIR" in os.environ else os.getenv("HOME") + nextbreakfile = os.path.join(tmp, ".nextbreak") + open(nextbreakfile, "wt").write(str(next_break)) + +-- +2.40.1 + diff -Nru budgie-extras-1.4.0/debian/patches/weathershow-tmpxdg.patch budgie-extras-1.4.0/debian/patches/weathershow-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/weathershow-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/weathershow-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,45 @@ +Applied-Upstream: commit:0092025ef25b48c287a75946c0ee797d3c142760 +Author: Samuel Lane +Last-Update: 2023-10-18 +Description: [PATCH 3/8] Resolves 4 / 4.1 - resolves 4.1 (entirety of No. 4) + +--- + budgie-weathershow/src/desktop_weather/desktop_weather.vala | 5 ++--- + budgie-weathershow/src/weathershow/WeatherShow.vala | 5 ++--- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/budgie-weathershow/src/desktop_weather/desktop_weather.vala b/budgie-weathershow/src/desktop_weather/desktop_weather.vala +index 7b85dc6..7a20798 100644 +--- a/budgie-weathershow/src/desktop_weather/desktop_weather.vala ++++ b/budgie-weathershow/src/desktop_weather/desktop_weather.vala +@@ -134,9 +134,8 @@ public class DesktopWeather : Gtk.Window { + this.set_visual(visual); + this.draw.connect(on_draw); + // monitored datafile +- string username = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- string src = tmp.concat(username, "_weatherdata"); ++ string tmpdir = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ string src = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmpdir, ".weatherdata"); + datasrc = File.new_for_path(src); + // report + maingrid = new Gtk.Grid(); +diff --git a/budgie-weathershow/src/weathershow/WeatherShow.vala b/budgie-weathershow/src/weathershow/WeatherShow.vala +index cfa71e2..ce1f30c 100644 +--- a/budgie-weathershow/src/weathershow/WeatherShow.vala ++++ b/budgie-weathershow/src/weathershow/WeatherShow.vala +@@ -348,9 +348,8 @@ namespace WeatherShowApplet { + string result_current = weather_obj.get_current(); + // write to file only for desktop show + if (show_ondesktop == true) { +- string username = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- string src = tmp.concat(username, "_weatherdata"); ++ string tmpdir = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ string src = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmpdir, ".weatherdata"); + WeatherShowFunctions.write_tofile(src, result_current); + } + } +-- +2.34.1 + diff -Nru budgie-extras-1.4.0/debian/patches/wpreviews-tmpxdg.patch budgie-extras-1.4.0/debian/patches/wpreviews-tmpxdg.patch --- budgie-extras-1.4.0/debian/patches/wpreviews-tmpxdg.patch 1970-01-01 01:00:00.000000000 +0100 +++ budgie-extras-1.4.0/debian/patches/wpreviews-tmpxdg.patch 2023-11-07 23:25:42.000000000 +0000 @@ -0,0 +1,119 @@ +Applied-Upstream: commit:588cbe6ffa72df904213d77728a3fd5bfae7195e +Author: Samuel Lane +Last-Update: 2023-10-20 +Description: [PATCH 7/8] Resolves 2 - 2.1 / 2.2 - resolves 2.1 - resolves 2.2 + +--- + budgie-wpreviews/src/previews_creator.vala | 5 ++--- + budgie-wpreviews/src/previews_daemon.vala | 20 +++++++++----------- + budgie-wpreviews/src/previews_triggers.vala | 17 ++++++++--------- + budgie-wpreviews/src/separate_shot.vala | 5 ++--- + 4 files changed, 21 insertions(+), 26 deletions(-) + +--- a/budgie-wpreviews/src/previews_creator.vala ++++ b/budgie-wpreviews/src/previews_creator.vala +@@ -46,9 +46,8 @@ + if (wnck_scr == null) return; // usually if not run on X11 + gdk_scr = Gdk.Screen.get_default(); + if (gdk_scr == null) return; // usually if there is no display +- string user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- previewspath = tmp.concat(user, "_window-previews"); ++ string tmpdir = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ previewspath = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmpdir, ".windows-previews"); + update_winlist(); + wnck_scr.window_opened.connect(update_winlist); + wnck_scr.window_opened.connect(refresh_new); +--- a/budgie-wpreviews/src/previews_daemon.vala ++++ b/budgie-wpreviews/src/previews_daemon.vala +@@ -31,7 +31,6 @@ + bool showtooltips; + bool allapps; + Gtk.Button[] currbuttons; +- string user; + File triggerdir; + File nexttrigger; + File allappstrigger; +@@ -661,25 +660,25 @@ + allworkspaces = previews_settings.get_boolean("allworkspaces"); + showtooltips = previews_settings.get_boolean("showtooltips"); + }); +- var tmp = Environment.get_tmp_dir() + "/"; ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + triggerdir = File.new_for_path(tmp); + allappstrigger = File.new_for_path( +- tmp.concat(user, "_prvtrigger_all") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_all") + ); + allappstriggerhotc = File.new_for_path( +- tmp.concat(user, "_prvtrigger_all_hotcorner") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_all_hotcorner") + ); + currapptriggerhotc = File.new_for_path( +- tmp.concat(user, "_prvtrigger_curr_hotcorner") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_curr_hotcorner") + ); + nexttrigger = File.new_for_path( +- tmp.concat(user, "_nexttrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".nexttrigger") + ); + previoustrigger = File.new_for_path( +- tmp.concat(user, "_previoustrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".previoustrigger") + ); + triggercurrent = File.new_for_path( +- tmp.concat(user, "_prvtrigger_current") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_current") + ); + // start with a clean plate please + cleanup(); +@@ -711,9 +710,8 @@ + } + + public static void main (string[] args) { +- user = Environment.get_user_name(); +- var tmp = Environment.get_tmp_dir() + "/"; +- previewspath = tmp.concat(user, "_window-previews"); ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); ++ previewspath = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".windows-previews"); + try { + File file = File.new_for_commandline_arg (previewspath); + file.make_directory (); +--- a/budgie-wpreviews/src/previews_triggers.vala ++++ b/budgie-wpreviews/src/previews_triggers.vala +@@ -37,27 +37,26 @@ + + public static void main (string[] args) { + +- // user +- string user = Environment.get_user_name(); ++ // user dir ++ string tmp = Environment.get_variable("XDG_RUNTIME_DIR") ?? Environment.get_variable("HOME"); + // files +- var tmp = Environment.get_tmp_dir() + "/"; + File allappstrigger = File.new_for_path( +- tmp.concat(user, "_prvtrigger_all") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_all") + ); + File nexttrigger = File.new_for_path( +- tmp.concat(user, "_nexttrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".nexttrigger") + ); + File previoustrigger = File.new_for_path( +- tmp.concat(user, "_previoustrigger") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".previoustrigger") + ); + File triggercurrent = File.new_for_path( +- tmp.concat(user, "_prvtrigger_current") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_current") + ); + File allappstriggerhotc = File.new_for_path( +- tmp.concat(user, "_prvtrigger_all_hotcorner") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_all_hotcorner") + ); + File currapptriggerhotc = File.new_for_path( +- tmp.concat(user, "_prvtrigger_curr_hotcorner") ++ GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, tmp, ".prvtrigger_curr_hotcorner") + ); + + File trg = nexttrigger;