Ricky Linden logo

New song

[linkstandalone]

skuggon

Mostly I'm trying to prioritize writing on the upcoming Linux book and learning more about software.

But I have occassionally written a few songs, recorded some, mixed a bit. I'm stuck inbetween an EP idea (I will probably shelf), some electronic material (which I should release eventually, need to consider a few things) as well as some acoustic songs.

''Skuggon'' (The Shadow) is one of the acoustic songs. Quickly written, quickly recorded. Going for the mood so to say. More and more I find it silly to sing in english so I seattle for my swedish dialect, an interesting progression compared to my opinions ten years ago to say the least...

You'll find the new song here. I hope it will fit on a lonely autumn evening for somebody.

05 Oct 2021, 22:15

How to encrypt and decrypt files using GPG

[linkstandalone]

This is basically as short as I possibly can write about how to set up and use GPG for encrypting and decrypting files with your friends. For those times when you are using unsecure normie chat apps this is the way to go for sending a file. If you'd like a more in depth tutorial, check this one for instance.

If you are using Linux you are probably good to go. If not just install GPG from your package manager. If you are using some other OS you might need to download GPG before installing.

Getting started is a bit annoying, but once setup, only two commands are needed - one for encrypting, the other for decrypting (after importing your recipient's public key).

First setup

1. Create a key pair if you don't have one, give it your@mail.xyz email address.

gpg --full-gen-key

2. Export your public key to send to your friend so (s)he can encrypt files for you.

gpg --output yourpub.key --armor --export your@mail.xyz

Encryption

When you'd like to encrypt a file that only your friend can open, you need to ask them to send their public key to you. Then you import it. This only needs to be done once for each friend.

gpg --import theirpub.key

After importing their public key you'll encrypt the file using their e-mail address which they have associated with their public key you just imported.

gpg -e -r friends-email-address@mail.xyz file-to-encrypt.txt

Decryption

If your friend has send you a file they encrypted using your public key (step 2), you decrypt it like this:

gpg -o decrypted-output-file-name.txt -d file-that-was-encrypted.txt.gpg



And that's the main stuffs you need to know to get started! Of course there's more to it if you want, like how to integrate it into email directly or revocation certificates and all that stuffs, but you can go deeper for that if you need it.

"nice to have's"

List both your own and imported keys

gpg --list-keys

See fingerprint of your recipients key that they just send you

gpg --fingerprint theirpub.key

And finally, to speed stuff up you can sign a imported key that you will send stuff to

gpg --sign-key their@mail.xyz

14 Aug 2021, 13:40

How to disable your OmaPosti account

[linkstandalone]

If you live in Finland Posti might have signed you up for getting (not yet all, but a lot of) your mail scanned and available online. What could possibly go wrong?

To get rid of this ''feature'' you did not ask for, here's how:

1. Go to: https://oma.posti.fi

2. Log in with your bank credentials if you've never used the service (which you probably haven't), otherwise you can also log in with your created credentials.

3. Go to the upper right corner, press the little circle with the first letters of your first and last name. From the menu that pops up, choose Käyttäjäasetukset.

(At the same time, in the middle of the same page, you probably want to disable all Markkinointi­luvat.)

4. Scroll down to Omat tiedot. From there you can click the link to disable all digital services. (I already did this, so I do not remember the exact term here, but I'm sure you'll figure it out, it's one of the last ones).

5. Then back in OmaPosti, on the left side click Lähettäjäasetukset and change from Kaikki lähettäjät to Valitut lähettäjät. Press OK. If Valitut lähettäjät does not show 0 (but a number like 1 or bigger) press muokkaa lähettäjiä and delete all the providers.

Done. In 14 days OmaPosti is gone.

14 Aug 2021, 09:09

Get a good quality small sized video quickly

[linkstandalone]

Here's a nice little ffmpeg command I found over at lbry that compresses a video file into a good quality small sized video.

All you need to do is have ffmpeg installed, change input.avi to your video input file and output.mp4 to your desired output filename/format.

ffmpeg -i input.avi -c:v libx264 -crf 21 -preset faster -pix_fmt yuv420p -maxrate 5000K -bufsize 5000K -vf 'scale=if(gte(iw\,ih)\,min(1920\,iw)\,-2):if(lt(iw\,ih)\,min(1920\,ih)\,-2)' -movflags +faststart -c:a aac -b:a 160k output.mp4

Quick and easy like it should be. 😁

If you wish to take it one step further in convenience using the command as a script is neat (in this case just the same one command, but you can specify the file directly from the command line).

12 Jun 2021, 17:24

Fixing Bisq's micro font size on IPS screens

[linkstandalone]

Bisq is a comparably nice decentralized bitcoin exchange using Tor to increase odds of anonymity. (Now, bitcoin wallets are still easy to trace and there has been some news regarding malicious Tor exit nodes in regards to crypto transactions. I haven't heard it affecting Bisq - they did have an internal messup causing one quite large hack a few years ago, but do your own research as always before using.)

Besides being bloated software, using bitcoin instead of an actually anonymous coin like monero, Bisq has one big annoyance. On IPS screens the font size is tiny. This can be fixed as mentioned here. Personally I fix it by adding an alias to my ~/.bash_aliases:

alias bisq='JAVA_TOOL_OPTIONS="-Dglass.gtk.uiScale=1.4 -XX:MaxRAM=4g" /opt/Bisq/Bisq'

After adding that line you will now have a sane font size when launching Bisq from your terminal.

23 May 2021, 11:05

VNC server setup on Debian 10

[linkstandalone]

As much as I find Windows cumbersome to use in most use cases, I will give the devil his due and admit that setting up RDP on Windows is a breeze compared to setting up VNC on Linux. (If there are distros out there that has a well working VNC server setup out of the box one enable check away, I take back what I said, but my experience with Debian and CentOS has been it needs to be setup from scratch practically.)

Personally I had issues with TigerVNC, which seems to be the default option in many tutorials. But this is Linux and there are many other alternatives, I found tightvncserver worked well. This guide also includes setting up a local ssh tunnel to your server and connecting with Remmina as VNC client.

The following instructions are mostly based on this tutorial by TechRepublic with some slight changes.



On the server side

1. After having updated your Debian 10 server you need to install a desktop environment. (If you don't got one already.) I will go with good ol' xfce:

sudo apt install xfce4 xfce4-goodies

2. Then we'll install the vnc server. Please pay attention to the output when the server starts:

sudo apt install tightvncserver

3. Kill the VNC-server. We need to change some settings. :1 might change depending on your setup, check the output when you installed the server:

vncserver -kill :1

4. In your text editor of choice, open up (or create) ~/.vnc/xstartup so it looks like this:

#!/bin/sh
xrdb $HOME/.Xresourcces
unset SESSION_MANAGER
startxfce4 &

5. Make the config executable:

chmod +x ~/.vnc/xstartup

6. Start the vncserver in a resolution of your choice (or go with running only ''vncserver'' command without the geometry flag and resolution). Pro tip: Save this command as a script or bashalias:

vncserver -geometry 1850x1000


On the client side

1. On your own local computer you need a VNC client. I am assuming you are using a Debian/Ubuntu-based distribution, so let's install Remmina:

sudo apt install remmina

2. Before connecting to your vnc server, we need to secure the connection because vnc is out of the box unencrypted. This can be done with a local ssh tunnel for instance.
Change SERVER-USERNAME-HERE with the user on your server and SERVER-IP-HERE with the ip of your server. In case you are already running something on port 5901 you need to change that accordingly, most probably though that port is free to use.
Pro tip: Make this command a bash alias or save it as a script or add it to your openssh config:

ssh -v -L 5901:127.0.0.1:5901 -C -N -l SERVER-USERNAME-HERE SERVER-IP-HERE

3. Open up Remmina. Create a new VNC connection where you enter your server's username and password and as server IP enter your local tunnel:

localhost:5901

If the resolution is wrong, close the Remmina client connection and on the server side kill the vnc server and when starting it again change the resolution before reconnecting through Remmina again.

13 May 2021, 09:17

Based cooking

[linkstandalone]

There's this neat little project started by Luke Smith called Based Cooking. It's a minimal recipe site that does not track you and is not filled with ads and junk.

Here is the first and second video to why this project was started.

It fits me well because I've been pissed at the same thing. I started saving my recipes in markdown and pushing them to my git-server to save some frustration. But, now there's actually a nice website to get some recipes from.

I also added two of my own recipes to Based Cooking. So far Instant Tom Yam Kung noodle soup and Marinated pork steaks. We'll see, maybe I'll add some more.

The only irony is that when I mentioned this on Mastodon I was shown to a recipe site called GrimGrains, and incredibly enough it's a quick neat little recipe site without trackers and excessive javascript madness. It even has RSS, wow!

I think they are both focused on a bit different food though. GrimGrains being a bit more modern, Based Cooking a bit more traditional, and well, based. Either way, more minimal functional sites in general are desperately needed, happy to have done a small contribution to Based Cooking. Will be interesting to see the development of the project.

12 Mar 2021, 22:07

Added some good stuff

[linkstandalone]

I have been getting more and more fascinated by the idea of a decentralized web in 2021.

Meaning, instead of visiting a few tech giants site, we can have a web with many smaller sites. Of course, this is nothing new. These kinds of sites have existed since the birth of the web, but I feel many websites are more like a redirect to people's social media sites etc.

What I want is unique sites. Interesting sites. Sites you actually want to visit and spend some time on.

One tiny way I can contribute to this is to add some awesome things I've discovered over the years.

So, if you head over to this part of my website you'll find lists of different good stuff. Still a work in progress. So far I've added my top 100 films I've seen, some books I feel left an impression after I had finished them, in some cases they changed my life. And finally some links to some websites I think are useful/neat. I will add more good stuff as I go.

Hope you find something you like, that would make me happy.

11 Mar 2021, 21:47

How to fix Gnome's virtual desktops on Ubuntu 20.04

[linkstandalone]

When it comes to using Gnome as a desktop environment on Linux it has a very specific workflow in mind. You can still make some changes, but sometimes simply changing keyboard shortcuts through GUI does not work for certain key combinations. One such situation in the Gnome version that ships with Ubuntu 20.04 is switching workspace (or virtual desktop as Gnome calls them).

If you do not like adding workspaces as you go, but prefer the tiling window manager way of dealing with workspaces (having nine fixed workspaces for specific programs/use cases), read on.

This has worked for me, without breaking anything, but obviously your mileage may vary, so please take a backup first with for instance Timeshift or rsync.

The solution is based on user jabirali's comment on an open issue on Pop_OS! GitHub-page. So, what you need to do:


1. Set a static number of workspaces to 9:

gsettings set org.gnome.mutter dynamic-workspaces false

gsettings set org.gnome.desktop.wm.preferences num-workspaces 9


2. Then unbind all the Gnome default keybindings for switching between applications:

gsettings set org.gnome.shell.keybindings switch-to-application-1 []

gsettings set org.gnome.shell.keybindings switch-to-application-2 []

gsettings set org.gnome.shell.keybindings switch-to-application-3 []

gsettings set org.gnome.shell.keybindings switch-to-application-4 []

gsettings set org.gnome.shell.keybindings switch-to-application-5 []

gsettings set org.gnome.shell.keybindings switch-to-application-6 []

gsettings set org.gnome.shell.keybindings switch-to-application-7 []

gsettings set org.gnome.shell.keybindings switch-to-application-8 []

gsettings set org.gnome.shell.keybindings switch-to-application-9 []


3. Rebind them to switch between workspaces on Super + number:

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['1']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['2']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['3']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['4']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['5']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['6']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['7']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['8']"

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9 "['9']"


4. In addition, it's convenient to have Super + Shift + number move a window between workspaces:

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['1']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['2']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['3']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['4']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['5']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['6']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['7']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['8']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['9']"

01 Feb 2021, 19:27