FastNetMon

Friday, 27 August 2021

Easy way to control sound input and output in Ubuntu

 I have an external sound card Focusrite for my microphone and headphones but I use USB soundbar for output and all the time I need to switch between them.

And I'm happy to share this nice widget for Gnome shell. 



Saturday, 7 August 2021

asciinema cast to SVG

Yay! We've got tool for it: svg-term-cli

How to convert asciinema screen casts into video mp4?

We have got great tool to save us: asciicast2movie.

I'll use Ubuntu 20.04 for my tests.

Install dependencies: 

pip install moviepy pyte 

Install fonts:

sudo apt-get install -y fonts-symbola fonts-droid-fallback fonts-dejavu

Start conversion:

python3 asciicast2movie.py ~/Downloads/community_installation.cast  ~/Downloads/community_installation.mp4

Unfortunately, it produced quite low res video :( 

Wednesday, 4 August 2021

How to associate .exe files with wine on Ubuntu 20.04?

 To do it you will need to install:

sudo apt install -y wine-binfmt

And then you can add wine as option in "open with" dialog:

sudo cp /usr/share/doc/wine/examples/wine.desktop /usr/share/applications

In addition to that you can call exe apps normal way after setting executable bit:

~/Documents/winbox64.exe  

Monday, 2 August 2021

How to improve wine applications appearance on hidpi / 4k displays

I've used this guide, it's very simple and you just need to run wine-cfg and select DPI value which works for you.



And then I've got following pretty look of Mikrotik's WinBox:


How to deploy Mikrotik in Google Cloud / GCE

You can use Mikrotik's official guide for start. To use all gsutil commands from VM in GCE you will need to set following permissions for it:


Also, you may experience issues during attempt to create bucket:
gsutil mb gs://cloud-hosted-router-images
Creating gs://cloud-hosted-router-images/...
ServiceException: 409 A Cloud Storage bucket named 'cloud-hosted-router-images' already exists. Try another name. Bucket names must be globally unique across all Google Cloud projects, including those outside of your organization.
It happens because all bucket names must be unique and you need to change default name of bucket from official guide.

In addition that I can recommend using bigger instance type:
gcloud compute instances create "chr-1" --zone "europe-north1-a" --machine-type "e2-medium" --image-family=cloud-hosted-router

To debug issues with image itself you can use serial output:

And example output output will look this way:

In addition to that I can recommend enabling "connecting to serial ports" to simplify debugging and keep access to serial console directly from Google Compute Console:
And you will be able to control Mikrotik CHR using local console (default login: admin, password: empty):