Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
4ef60d55ca
2 changed files with 14 additions and 0 deletions
|
|
@ -2,9 +2,18 @@
|
||||||
#
|
#
|
||||||
## Calculate DPI, update settings if necessary, then start desktop apps
|
## Calculate DPI, update settings if necessary, then start desktop apps
|
||||||
|
|
||||||
|
MONITOR=$(xrandr --listmonitors | grep -E '^\s+[0-9]' | head -1 | sed -r 's/^.*\s+(.*)$/\1/')
|
||||||
REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$'
|
REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$'
|
||||||
TEST_STATION_WALLPAPERS='/usr/share/wallpaper/test-stations'
|
TEST_STATION_WALLPAPERS='/usr/share/wallpaper/test-stations'
|
||||||
|
|
||||||
|
# Resize screen in VMs
|
||||||
|
if lsmod | grep -Eq 'qxl|virtio_gpu'; then
|
||||||
|
echo -n "Starting VM guest services..."
|
||||||
|
spice-vdagent
|
||||||
|
sleep 0.5
|
||||||
|
xrandr --output "${MONITOR}" --auto
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "Getting display details... "
|
echo -n "Getting display details... "
|
||||||
|
|
||||||
# Get screen data
|
# Get screen data
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
setterm -blank 0 -powerdown 0 2>/dev/null
|
setterm -blank 0 -powerdown 0 2>/dev/null
|
||||||
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
||||||
|
# VM guest init
|
||||||
|
if lsmod | grep -Eq 'qxl|virtio_gpu'; then
|
||||||
|
systemctl start spice-vdagentd.service
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up teststation details
|
# Set up teststation details
|
||||||
$HOME/.setup_teststation
|
$HOME/.setup_teststation
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue