Last active
September 15, 2022 08:59
-
-
Save thwarted/160f7d05ae38d1bfc4eb to your computer and use it in GitHub Desktop.
resize-java-iKVM-viewer: find all supermicro Java iKVM Viewer windows and resize them to display all the content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# find all supermicro Java iKVM Viewer windows and resize | |
# them to display all the content | |
# | |
# for reasons that are beyond sanity, this shitty closed source program | |
# sets the min and max window sizes to the same values, making it unresizable | |
# through dragging. | |
# this wouldn't be so bad if it actually resized the window to display all | |
# the content. it constantly resizes based on the resolution of the | |
# remote display. | |
# | |
# bind this program to a hot key or create a panel icon or something | |
# to invoke when the iKVM viewer is the wrong size. it will loop | |
# over all iKVM windows and set their size based on the reported | |
# resolution | |
PATH=/bin:/usr/bin | |
for winid in $( wmctrl -l | grep -iE 'Java iKVM Viewer.+(Resolution.+FPS|No Signal)' | awk '{ print $1 }' ); do | |
read width x height < <( wmctrl -l | | |
grep $winid | | |
grep -iE 'Java iKVM Viewer.+Resolution' | | |
sed -e 's/^.\+Resolution //; s/ - F.\+$//;' | |
) | |
if [[ -z "$width" || -z "$height" ]]; then | |
width=643 | |
height=504 | |
fi | |
xprop -id $winid -remove WM_NORMAL_HINTS | |
wmctrl -i -r $winid -e 0,-1,-1,$(( width + 10 )),$(( height + 30 )) | |
done |
This script is great. Thank you for your work!
Sigh. Thank you so much! I too was beginning to tear out the little hair that's left. It's a shame this is even needed, but it think it represents the overall software quality at Supermicro. For example their Java SOL Viewer prints the user password to the console in clear text. m)
Options->Preference->Window->Untick Auto-resize Window
oh bless you for that nugget of information.
Options->Preference->Window->Untick Auto-resize Window
thank you @BtbN
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script ... saved some of my hair from getting pulled out ☂️
# for reasons that are beyond sanity, this shitty closed source program
Couldn't have been said better.
If you ever visit Crete, I will be very happy to buy you a ton of raki 🍷 Thank you!