Caspershire Meta

Aizan's Secondary Blog

VM Desktop Shortcut

Posted on 18 Apr 2021

It is rather challenging to live without a linux shell. My daily operations depend on them, and so I have a Fedora virtual machine (VM), which have my favorite CLI tools installed. Before this, I had to activate 3 programs to get to the point where I could use the xfce4-terminal application. I found a way to simplify the execution and that is by writing a small .bat script.

To get to the point where I could interact with the xfce4-terminal on my Fedora VM, the VM has to run first, and then an X-Server (I use VcXsrv) must also be running for GUI forwarding from the linux guest to windows 10 host, and then starting a terminal on windows 10 host (I use Git Bash) that can ssh into the Fedora VM to establish the GUI forwarding.

With a simple *.bat script, all these windows applications could be activated at once.

@ECHO off

:: Aizan's short batch script to automate first invocations of virtual machine services

cd C:\"Program Files"\Oracle\VirtualBox && START VBoxManage.exe startvm Fedora --type separate && cd %HOMEPATH%
START C:\"Program Files"\VcXsrv\xlaunch.exe
START C:\"Program Files"\Git\git-bash.exe --cd-to-home

I placed this *.bat script somewhere, and then created a shortcut with custom icon on my desktop.

It is definitely possible to not use GUI forwarding, but I enjoy using xfce4-terminal. Alternatively, I could install web-based terminal application for linux, or using Jupyter Lab interface which has built-in terminal support, or just use the terminal application within Fedora Cockpit. The reason why I do not use web-based terminal application is because I have muscle memory for certain keyboard shortcuts that simply do not work on browser-based terminal.