You are not logged in.


I am planning to use a MX-Linux USB-Live stick for both of my PC and my Microsoft Surface pro 6.
Because of the high DPI of the Surface display I need to adapt some settings of the XFCE4 desktop.
I want to use 2 shell scripts for switching back and forth to the respective settings of the devices.
From the 1. script scale-surface.sh I want to create a 2. script say default-scale.sh by replacing in "scale-surface.sh" the respective values necessary for switching back the settings for the PC.
scale-surface.sh
#!/bin/bash
# ------------------------------------------------------------------
# Xfce 4.20 HiDPI Scaling Configuration Script for Surface Pro 6
# Target Resolution: 2736 x 1824 (3:2 Aspect Ratio)
# ------------------------------------------------------------------
# 1. Enable 2x Window Scaling for GTK3/GTK4 Applications
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -n -t int -s 2
# 2. Prevent giant, unscaled font issues by dropping unscaled DPI to default
# This forces GTK to cleanly scale text alongside widgets.
xfconf-query -c xsettings -p /Gdk/UnscaledDPI -n -t int -s 96000
# 3. Increase Font DPI globally (144 provides great readability at 2x)
xfconf-query -c xsettings -p /Xft/DPI -n -t int -s 144
# 4. Switch Xfwm4 (Window Manager) to a sharp HiDPI theme variant
# This ensures window borders, titles, and minimize/maximize buttons scale.
xfconf-query -c xfwm4 -p /general/theme -s "Default-xhdpi"
# 5. Scale System Cursor (Mouse Pointer) to match the HiDPI density
xfconf-query -c pointers -p /Cursor/Size -n -t int -s 48
# 6. Adjust Xfce Panel icon & row dimensions so they aren't microscopic
xfconf-query -c xfce4-panel -p /panels/panel-1/size -n -t int -s 48
xfconf-query -c xfce4-panel -p /panels/panel-1/icon-size -n -t int -s 32
echo "Surface Pro 6 HiDPI profile applied for Xfce 4.20!"
echo "Please log out and log back in to finalize all structural changes."
# To handle HiDPI scaling seamlessly on Xfce 4.20 for the Surface Pro 6
# (which features a high-density 2736 × 1824 display), a single setting
# is rarely enough. Because Xfce utilizes independent components,
# an optimal look requires scaling the GTK interface, the Window Manager
# (xfwm4) borders, the system cursor, and font DPI all at once
# The following automated Bash script adjusts everything via xfconf-query.
# It defaults to a balanced 2x UI scale and automatically bumps the custom
# font DPI to 144 for pristine text readability.scale-surface.shI can get most of the necessary values to replace in scale-surface.sh with xconf-query.
A difficulty arises - among others - with the resetting of the cursor size which is special.
Querying its setting from the PC by:
xfconf-query -c pointers -p /Cursor/Size -n -t -presults in:
Property »/Cursor/Size« for the channel »pointers« is missing.
But then what has to be put into the default-scale.sh script to reverse the cursor size setting by "returning" to its "missing property" for the PC after having been set by scale-surface.sh:
xfconf-query -c pointers -p /Cursor/Size -n -t int -s 48Please help.
Last edited by cinclus (2026-09-17 00:22:17)
Offline


Hello and welcome.
I don't believe that /Cursor/Size is a valid xfconf setting in the pointers channel. Instead, try setting /Gtk/CursorThemeSize in the xsettings channel.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.016 seconds, 8 queries executed - Memory usage: 529.94 KiB (Peak: 531.35 KiB) ]