shell - Wine desktop geometry change by shell script

Questions about Wine on Linux
Locked
User avatar
gbgustafson
Newbie
Newbie
Posts: 2
Joined: Fri Jun 04, 2021 8:23 am

shell - Wine desktop geometry change by shell script

Post by gbgustafson »

The standard "shell - Wine desktop" launch in Linux Mint 20.1 Wine 6 has a default geometry that places the window
at the top left on the window manager. The issue: how to launch the Wine desktop and then move the window?

It is a window manager issue, with Linux Mint having options for several managers, Marco was once the default window manager.
Other window managers like Metacity + compositing are set manually in the Linux control panel. There are old forum posts dating
back to 2008 citing the this same issue, fueled by larger monitors and organizing the screen real estate. See post "James McKenzie » Fri Apr 17, 2009 5:42 am".

One partial answer to the question: use Linux window manager utilities wmctrl and xdotool. Below are two shell scripts that correct the
screen position of WinEdt. Important: the window manager is Metacity+cmpositing. Other window managers may break the scripts.

$HOME/bin/moveWineDesktop.shell
=============
#!/bin/bash
sleep 10s && xdotool search "shell - Wine desktop" windowmove 10 360 windowsize 1980 1045

$HOME/bin/winedt.shell
=================
#!/bin/bash
WINEPREFIX="/home/grant/.wine" wine explorer.exe /desktop=shell,1980x1045 \
$HOME/".wine/drive_c/Program Files/WinEdt Team/WinEdt 8/WinEdt.exe" -V -C="Winedt .wine"
$HOME/bin/moveWineDesktop.shell
Locked