At work, we run a VMware Horizon View (or whatever the correct name is right now) infrastructure. All clients are virtual machines, each user has a zero client at his workplace and we provide remote access to the virtual clients.

VMware provides two mechanisms to access your virtual client from remote: Either you install their native client or you use your HTML5 web browser. Option #1 is not available if you run OpenBSD as OS on your home machine because VMware does provide a native client for Linux that is not open source.

I do work from home once a week, using my laptop that runs OpenBSD. So far, I have always used Firefox to access my virtual clients at work. To maximize the available workspace I’ve moved a window of Firefox to a separate group in cwm(1) and let it fill the screen by pressing ctrl-alt-f. Now the virtual desktop gets the full 1920×1080 resolution of my laptop screen.

This works fine, until I move the mouse cursor to close to the upper edge of the screen. Now the combination of two features hits me: Firefox reduces the size of the displayed web page to display its address and tab bars. Moreover, the VMware client adapts the resolution of the virtual desktop to the new size of the display area in the browser. This operation interrupts my workflow on the virtual client, because it gets unresponsive for about two seconds. AAARRRRGGGHH!!!

I started looking for options to disable either behavior. Guess what, there is none. You cannot disable the automatic adaption of the resolution and you cannot disable the automatic display of the bars in Firefox. This sucks!

Therefore, what do I do if I work with tools that suck? I visit and check for an alternative. I found it in surf. This browser displays the content of a web page. That’s it. There are no menu bar, no tab bar, no address bar, nothing. One simple command gives me surf in fullscreen with the login page of the VMware remote access. Exactly what I was looking for.

$ doas pkg_add surf
$ surf -F &

Great! Nevertheless, I’m sure I can move this window automatically to its own group in cwm (in other window managers you would call that “move to its own virtual desktop”). In addition, I can save some typing by putting this into a shell script. So I check cwmrc(5) and add the following line to my ~/.cwmrc:

autogroup 2 "surf","Surf"

Then I fire up my preferred editor and type in this tiny script:

xdotool ctrl+alt+1
xdotool ctrl+alt+2
surf -F &

The xdotool sends the key combination to cwm that hides the windows of group 1. I save this as ~/bin/ and chmod it to 750. Now I can start the my remote connection to work by simply running