Ubuntu 22.04 and their snap love afair - or: how to get rid of snap - or: firefox without snap

Some years ago Ubuntu introduced snap and said it would be better.  In my experience it was slower. And then they started packaging chromium-browser as a SNAP only, this broke the kde-plasma and kde-connect (media and phone desktop integrations, and I resorted to installing chrome from Google.  This was quite easy because Chrome comes as a .deb package which also installs a apt-source so it's upgraded just like the rest of the system. This, by the way is the apt source for Chrome, you drop it in e.g.  /etc/apt/sources.list.d/google-chrome.list : deb [arch=amd64] stable main And then you install the google signing key:  wget -qO- | sudo tee /etc/apt/ trusted.gpg.d/google-linux-signing-key.asc Then you can do ' apt update ' and ' apt install google-chrome-stable '.  See also for further information Lately I've been using Chrome less

DLNA servers for our Samsung TV on Linux

We have a Samsung Smart TV, I like it. We also have a cable box, a BluRay player (because sometimes we borrow movies at the library and anyone in the family needs to be able to play them with no help from dad), and a Chromecast.  All three HDMI inputs on the TV are used. Samsung was pretty big on DLNA, a UPnP based protocol for media playback. Now it's not a feature they tout a lot: People want Netflix. Samsung also had very good codec support from the start which reduces the need for transcoding greatly.  They still have the DLNA client builtin in their TVs and the codec support is even better now.  So this solves the in-house streaming problem very neatly without needing a extra box by the TV to do it. The server in the basement ought to be enough when the TV had DLNA. I understand that DLNA is a bit low featured in 2021: no on screen movie/episode synopsis, not very slick navigation and on screen controls for everything. But it's enough. DLNA is right featured. The Samsung D

New Linux on old hardware

Since our family relies on the servers in our basement for email, music, movies, and so on it's been bothering me that we have no extra hardware in case something goes wrong. I've been given two old Dell machines, I want to use one for stuff and one as spares in case something breaks. Both needed reinstalling: I like Ubuntu and made myself a memory stick with Ubutnus usb-creator software.  The machines never managed to boot of those.  The Ubuntu server ISOs are too large to fit on a CD. Found ubuntus netboot ISOs for 18.04 which fits a CD ten times over.  Again they didn't boot from the memory stick nor off a CD with various error messages or just passing it by and booting off the old OS on the harddrive. After a while I recalled "unetbootin" - a old, but still updated - tool to make memory sticks from ISO images. It currently lives here: I had to repartition my memory stick ( cfdisk /dev/sdc in my case) and make a msdos filesystem

Bluray with menus on Linux - on Ubuntu

For the longest time it was impossible to play BluRay disks on Linux due to the lack of players that could do it.  VLC has been the most capable video player on Linux and some time ago they managed it. I run Ubuntu at home.  I can easily install VLC but some parts were missing to get it working. Be root:  sudo -i libaacs decodes Blurays: apt-get install lib aacs0 BluRays or at least VLC need Java 8:  apt-get install openjdk-8-jre Ubuntu and VLC does not agree on the right directory name:  cd /usr/lib/jvm/ Link the right one:  ln -s java-1.8.0-openjdk-amd64 java-8-openjdk This library implements BD-J menus  apt-get install libbluray-bdj Now insert a BluRay disk and play it: vlc bluray:// It should start up with menus. Use arrow keys to navigate and Enter to choose.

The most important thing about Apache

The most important thing you should know about Apache, the web-server, is that if you feel stupid after trying to get something working on it - this is perfectly normal - and does not mean you are stupid. Try NGiNX next time.  If it supports the thing you need.

git log -p splitting

At work we have two related code bases.  Recently one of them received a lot of loving, and the other needed the same treatment to work better with new Perl and modules. The one had gotten several hundred patches, and browsing that many and cherrypicking them got tiresome.  It was better for me to split the whole log into separate patches and review and apply one by one and then moving the "done" patches to a different directory. Here, the small hack to split "git log -p" into one patch pr. file: #!/bin/bash awk 'BEGIN { FN=0; }      /^commit / { FN++; }      { print $0 >> FN }' $1

Sorting videos

Some time ago I posted my picture sorting script. Everything can record videos these days (e.g. the camera, the phone, and the resolution isn't even a joke any more, it's full HD at good frame rates) so sorting images is far from enough. I have been suffering with manual sorting, but the time for that is over. There is a cool program called "mediainfo" that can decode the media information on everything I have tested it on. This made it quite easy to adapt the earlier program into a video sorter.  This one will sort the files arriving from all our different camera devices. If yours make files with a different name than .mp3 or .mov then change the "find" expression on the 10th line. #!/bin/bash ROOT=/space/roke/slidescan/bilder INTO=/space/roke/slidescan/video cd $ROOT/nye || exit $? echo "*** Working on" declare -a DATE find . -iname '*.mp4' -o -iname '*.mov' | while read f; do     # Adjust time of the file.     #