Parse `DISPLAY` variables that include a screen number The `DISPLAY` environment variable may optionally also include a screen number after the display number: `:0.0`. This change makes sure the display number is correctly extracted even in this case.
1 files changed, 1 insertions(+), 1 deletions(-) M nix-bwrap.tcl
M nix-bwrap.tcl => nix-bwrap.tcl +1 -1
@@ 62,7 62,7 @@ set bwrap_options [list --unshare-all --clearenv --setenv HOME $env(HOME)] lappend bwrap_options {*}[requisites_binds $exe] if {$params(x11) == 1} { set display [string trimleft $env(DISPLAY) ":"] regexp {:([0-9]+)(\.[0-9]+)?} $env(DISPLAY) _ display lappend bwrap_options \ --ro-bind "$env(HOME)/.Xauthority" "$env(HOME)/.Xauthority" \ --ro-bind "/tmp/.X11-unix/X$display" "/tmp/.X11-unix/X$display" \