Skip to content

Conversation

@gonX
Copy link
Member

@gonX gonX commented Apr 22, 2025

This PR changes the exported environment variables on Linux.

Removed environment variables on Linux diagnostics:

  • TEMP
  • TMP
  • TMPDIR

These were usually always empty and does not hold any special meaning on Linux.

Added environment variables on Linux diagnostics:

  • XDG_CURRENT_DESKTOP
    • Will be almost always be useful in determining which desktop environment is used by the user
  • XDG_RUNTIME_DIR
    • Will occasionally be useful in determining misconfiguration

Example trimmed output:

  "Environment Variables": {
    "USER": "gonx",
    "DISPLAY": ":1",
    "WAYLAND_DISPLAY": "wayland-1",
    "PWD": "/home/gonx/prog/_opentabletdriver/opentabletdriver/OpenTabletDriver.UX.Gtk/bin/Debug/net8.0",
    "PATH": "/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/usr/lib/rustup/bin:/home/gonx/nodejs/bin",
    "XDG_CURRENT_DESKTOP": "sway",
    "XDG_RUNTIME_DIR": "/run/user/8000"
  },

gonX added 2 commits April 22, 2025 16:45
These are always empty (or useless) on Linux reports, and as such does not need to be included
This allows us to diagnose the specific desktop environment used by the user
@gonX gonX added enhancement New feature or request daemon Affects the driver itself labels Apr 22, 2025
@gonX gonX added this to the v0.6.6 milestone Apr 22, 2025
@gonX gonX added the needs-forward-port PR or its features needs to be ported to development branch label Apr 22, 2025
Copy link
Member

@Kuuuube Kuuuube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, probably fine to just merge this without a forward port at the moment.

@Kuuuube Kuuuube merged commit 04bc068 into OpenTabletDriver:0.6.x Jul 22, 2025
9 checks passed
@gonX gonX modified the milestones: v0.6.7, v0.6.6 Sep 22, 2025
@gonX gonX deleted the 06x-envvar-improvements branch September 22, 2025 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

daemon Affects the driver itself enhancement New feature or request needs-forward-port PR or its features needs to be ported to development branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants