<div dir="ltr">Hi Michael:<div>Thanks for the input, it is very useful for me as I had no idea about wmctrl. As far as I can understand though, wmctrl would change the window size on the local side, so if I connect to a desktop session it would be just rescaled, which is not always what I want. I want to change the resolution on the remote side so it coincides with the native resolution on the local one. Then I need xrandr on the remote. The combination of the two can actually do what I want: remove some blurring due to interpolation etc.</div><div>Regards,</div><div>Andrey</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 13, 2023 at 8:44 PM Michael Ashley <<a href="mailto:m.ashley@unsw.edu.au">m.ashley@unsw.edu.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Andrey & Neal,<br>
<br>
Another command that might be helpful is wmctrl, from the man page:<br>
<br>
  wmctrl is a command that can be used to interact with an X Window manager that is compatible with the EWMH/NetWM specification.  wmctrl can query the window manager for information, and it can request that certain window management actions be taken.<br>
<br>
And here is something I use to resize and position an X2GO session on one monitor:<br>
<br>
  wmctrl -r X2GO -e 0,0,0,3768,2123<br>
<br>
Regards,<br>
Michael<br>
<br>
On Mon, Feb 13, 2023 at 02:11:37PM +0100, Andrey Malyshev wrote:<br>
> <br>
>    Hi Neal,<br>
>    Here how I do it:<br>
>    $cat  ~/bin/setdisplaymode<br>
>    #!/bin/bash<br>
>    #<br>
>    if [ -z $1 ]; then<br>
>            echo "Usage: $0 mode, e.g:"<br>
>            echo "$0 1920x1200"<br>
>            echo "$0 1680x1050"<br>
>            echo "$0 1280x1024"<br>
>            echo "$0 1280x960"<br>
>            exit -1<br>
>    fi<br>
>    MODE=$1<br>
>    # find a connected monitor<br>
>    #<br>
>    MONITOR="`xrandr --listmonitors | awk '/0:/ {print $4}'`"<br>
>    if [ ! -z $MONITOR ]; then<br>
>            echo "Setting $MODE mode on $MONITOR"<br>
>            # set the resolution<br>
>            xrandr --output $MONITOR --mode $MODE 2>&1 >/dev/null<br>
>    else<br>
>            # try to set the resolution using some standard monitor names<br>
>            echo "Trying to set $MODE mode..."<br>
>            xrandr --output DVI-I-1 --mode $MODE 2>&1 >/dev/null<br>
>            xrandr --output DVI-D-0 --mode $MODE 2>&1 >/dev/null<br>
>    fi<br>
>    On Mon, Feb 13, 2023 at 1:55 PM Neal Becker <[2]<a href="mailto:ndbecker2@gmail.com" target="_blank">ndbecker2@gmail.com</a>><br>
>    wrote:<br>
> <br>
>    Do you connect to a running x2go session using screens with different<br>
>    resolutions?<br>
>    Let's say I started an x2go session (xfce) from my laptop, which<br>
>    happens to be 1920x1600.  Later I connect to that same session, this<br>
>    time using a monitor with say 3840x2160.  Now I need to resize<br>
>    everything.  Going the other way is even worse.<br>
>    How do you handle this?<br>
>    Thanks,<br>
>    Neal<br>
-- <br>
Professor Michael Ashley                          School of Physics <br>
University of New South Wales     <a href="http://www.phys.unsw.edu.au/~mcba" rel="noreferrer" target="_blank">http://www.phys.unsw.edu.au/~mcba</a><br>
</blockquote></div>