VMware Horizon Client on Wayland

Sometimes the field to input username and password on Vmware horizon client on Wayland is not visible. This is a known issue and the workaround is to use Xorg instead of Wayland. But I do not want to use Xorg, just to make this one appliaction work. So I found a workaround. Basically you need to set the username, password, rsa token and server address in the cli. Here is an example:

vmware-view -s <serveraddress> -t <username> -p <password> -n <desktopName> --singleAutoConnect -c <RSA token>

This is not a perfect solution, because it is a bit clunky.

Creating a smoother experience

To make it a bit smoother, I created a script that uses environment variables to set the username, password, server address, desktop name. And then prompts the user for a RSA token. I used zenity to have the prompt use a GUI. Here is the script:

#!/bin/bash

# Prompt for input
input=$(zenity --entry --title="VMware View Launcher" --text="Enter input:")

# Check if input is empty
if [ -z "$input" ]; then
    zenity --error --title="Error" --text="Input cannot be empty."
    exit 1
fi

# Run the vmware-view command with the environment variables and the input
vmware-view -s $VMWARE_SERVER -t $VMWARE_USERNAME -p $VMWARE_PASSWORD -n $VMWARE_DESKTOP_NAME --singleAutoConnect -c "$input"

You can save this script to the path: ~/.local/bin/vmware. Don't forget to chmod +x to make it executable.

You also need to set the environment variables in your .bashrc file. Here's an example:

## Setting vm-ware horizon variables:
export VMWARE_SERVER='desktop.serverlurl.com'
export VMWARE_USERNAME='username'
export VMWARE_PASSWORD='password'
export VMWARE_DESKTOP_NAME='desktop-name'

Make a Launcher

You can also create a launcher for this script. Heres an example.

Path: ~/.local/share/applications/vmware-custom-launcher.desktop

[Desktop Entry]
Type=Application
Name=VMware Custom Launcher
Comment=Launch VMware with custom input
Icon=vmware-view
Exec=/path/to/your/vmware-launcher.sh
Terminal=false
Categories=Network;

Remember to update the path for Exec. Desktop shortcuts doesn't support environment variables, so you need to use the full path.

protip, you can delete the original .desktop file, to de-clutter your launcher. sudo rm /usr/share/applications/vmware-view.desktop

Screenshot of the prompt

Buying a treadmill in 2023

Buying a Treadmill in Norway in 2023

From time to time, I get asked which treadmill to buy. I don't typically run much inside, but in 2022, we bought a treadmill to be able to run when our daughter was asleep and it was only one of us at home. Being a nerd, I used some time to learn about the different treadmill technologies.

Of course, everyone's needs and wallets are different. This text is for someone who wants to buy a treadmill to have at home for a long time, doesn't care about how big it is, don't like doing much maintenance and doesn't mind spending too much money on it.

Read more  ↩︎

Immich import machine

I have a Nikon Z 6 mirrorless camera. Im pretty happy with expect the lack of GPS. It really bugs me that I did not spend more money to remove the headache of manually having to tag my photos with GPS (or use the Nikon app on my phone).

It also bugs me that there is no good way to automate wifi upload from Nikon cameras to a sftp or smb share. So I have to use a memory card or cable.

To make the process simpler, I created some scripts to automatically import photos to Immich.

Read more  ↩︎