Linux and OpenVPN, how to save the password

I recently purchased a VPN subscription from Fastest VPN, with the purpose of using it on Linux, via SSH, command line only. They don’t offer anything special about Linux and the command line, they just use OpenVPN.

How it works: simply install OpenVPN (for example with sudo apt install openvpn), then download the configuration files (for example, these are the files for Fastest VPN) and just write sudo openvpn nomeserver.ovpn to connect.

But there is a big problem: each time you have to write the password by hand! Intolerable, especially with a complex password. Luckily there is a shortcut.

You can create a file with credentials. In a directory accessible only to you, create a file called login.conf and enter, on two lines, username and password, like this:

Username
Password

At this point we modify the *.ovpn files of the configuration. For example, open Luxembourg-UDP.ovpn and see the auth-user-pass entry. We replace it with auth-user-pass login.conf, so when we load the configuration with openvpn, our credentials are auto-filled. Now though, here are 50 files, one for each server. Do we open the files one by one and edit them by hand? No way! sed was invented on purpose.

Just write it down:

sed -i 's/auth-user-pass/auth-user-pass login.conf/g' *.ovpn

and automatically all lines with auth-user-pass will be changed with auth-user-pass login.conf. So, when we download the updated server configurations, they will continue to work perfectly!

How does the Nintendo DS know when you change the time?

Summer time is back in effect from today, so I changed the time on the few devices that can’t adjust on their own via the Internet.

This includes the Nintendo DS, and seeing it sitting there on the shelf gathering dust reminded me of an episode that happened years ago: Pokémon Diamond could tell when you changed the time, even if the cartridge wasn’t inserted and there was no Internet connection! But how did he do that?

The solution they found is very simple: the internal clock remains at the same time, set in the factory, and when you set the time it is not actually changed, but simply the system takes note to add the difference. For example, “add 34599 seconds to the system time”.

So, games with time rewards like Pokémon or Animal Crossing just need to write somewhere in save file the difference between the “fake” and the “real” time: if it only changes by one second, it means that the user has changed it!

If you have a 3DS you can hack the system to always use the real date. After enabling homebrew (a bit complicated and laborious, if interested ask in the forum or in the comments, I leave here this guide), you can run ctr-no-timeoffset to set the difference between the two clocks to zero, and then set the internal time to the “correct” one via GodMode9.

Visualize the spread of viruses and bacteria

I found two very useful videos to visualize the spread of viruses and bacteria.

The first one, produced by Bauhaus-Universität Weimar, shows the airflow that is moved when coughing, and what is the difference between coughing in the hand, elbow, or in a mask, normal or surgical. There’s a big difference!

The other is from Mark Rober, again, a Youtuber who, if you read my other posts, I suggested many times. In the video he scatters a dust, visible only with an ultraviolet lamp, on the hands of three children, during a lesson at a primary school. At the end of the lesson he shows the spread of “bacteria” (actually only this harmless powder), and how it spreads with handshakes!

During the shutdown, Florence is empty

Due to the COVID.19 outbreak, Italy is under shutdown, everyone is forced at home.

I had to go to downtown for work, and I was shocked to see the Duomo area, a tourist spot that is usually swarming with people, totally empty:

Someone far away just got some prescription from the Pharmacy, one of the few stores allowed to be open
Go straight for the train station, nobody in sight.
The Cascine park is also deserted. (And now police completely sealed up the area)

How much to fix a dent on a Tesla?

In an article on CleanTechnica, the author tells the story of the arrival of his new Tesla Model 3. Excited, unfortunately, he bumps into a pole during parking, making this dent:

https://cleantechnica.com/files/2018/05/IMG_3075-closeup.jpg

That’s too bad. It happens… How much will it take to fix it? 100 euros? 300 euros?

Well… despite the spare part costing 250 dollars, for the replace it you need to disassemble the entire front of the car, even the back of the car to disconnect the battery (for safety), then you need to recalibrate the proximity sensors for autonomous driving. For a total of THIRTY hours of work.

Then the piece must be repainted, but the metallic paint used is special and requires 3 coats, for other THIRTEEN hours of work.

With all this time needed for the repair so it was made a quote of $250 for spare parts and $6500 for labor.

Ouch! He was lucky because he had a total cover insurance, so he didn’t need to shell out all that money.

Stop Vivaldi browser to start automatically on macOS

I installed the latest version of the Vivaldi browser on macOS and after a reboot I found this on my dock:

Normal? No, I did not put it as default browser, I did not stick it in the dock and especially I did not leave it open (the white dot indicates that it is running)

So, somewhere, there’s some setting that launches it automatically every time you start the computer.

But my main browser is Firefox, I use Vivaldi only in limited cases, where the site works well only with Chrome. (I try to use Google products as little as possible, Vivaldi is like Chrome but without Google user tracking).

I’m looking everywhere for this setting, but I can’t find it.

Finally, I found it in “System Preferences” -> “Users & Groups” -> “Login Elements”.

You must press the “-” button to remove it from automatic start. Not on “hide”.

I bought a Wii U

Thanks to a GameStop clearance sale, I bought a Wii U, 32gb version.

Technically, it’s used, but, and I didn’t expect that, GameStop did a good job of refurbishing it. The GamePad was absolutely perfect, without a single scratch, and a transparent skin was applied to the console itself, probably to hide any scratches. In the end it was as if it had been new, except for the manual, replaced with 2 photocopied sheets.

One thing immediately caught my eye… or rather, my ear: surround sound. Thanks to the many speakers on the gamepad, that are combined with the already existing audio, the sound effects of the menu are exceptional! Yes, not many games use three-dimensional sound, but the background music in the menu is exceptionally engaging!

Although aesthetically it looks like a “Wii HD”, it’s actually very different. Here, Nintendo’s marketing has been a match: I’ve always snubbed it “because 350 euros for playing the Wii in HD is too much”. In fact there are many innovations, although not very well implemented. (For example, the pad is switched on to consume battery power even when you don’t need it, like when you watch a movie on Netflix… what’s the point?)

In particular, Nintendo has decided to close all the bugs in the Wii by removing all possible entry routes for hackers.

Compared to the old model:

  • the possibility of making a backup copy of game saves on an SD card has been removed. If the console breaks down, all your saves are lost forever. This is to prevent the console from being hacked with a corrupt save. But at what price…
  • The photo channel and audio player has been removed. The old Wii photo channel was made very well, ideal for a “slide show event”, with background music. But, perhaps, hackers could have found some exploits in libJPEG and then “better take it all out, for security”.
  • The possibility to transfer Mii from and to Wiimote has been removed. Even here, maybe they were afraid of some exploits, but I transferred my Mii between two Wii and also in Dolphin thanks to this feature and now there is an easy way to bring them on the new console …
  • Almost all channels with content from the internet, such as “Rate my Mii”, weather, news, horoscope, polls, have been removed. Maybe everything was grouped together inside Miiverse, which I could never try because it was closed years ago.
  • the Bluray player remains “wasted”, to save 3 euros of patents MPEG and h264, you can not play DVD movies or Bluray “because everyone has a DVD player at home”. I don’t know about you, but I never had a DVD/Bluray player at home. If they put a player on the eShop for 20 euros it could have been interesting.

…and in the end everything was useless thanks to the presence of exploits in the browser (and that’s why there is no browser on the Switch) or in the DS emulator of the Virtual Console (also absent on the Switch)

Automatically generated humans

Who’s this asian girl? Nobody!

This picture has been automatically generated!

By visiting the site at ThisPersonDoesNotExist.com you will get a new random “human creation”, generated by an algorithm! Impressive!

Some results have very evident artefacts, but it’s still impressive!

The video below shows all the possible combinations, millions, and the possibility to adapt it with other kind of photos (after training of the model, with thousands and thousands of sample pics)