Sunday, December 18, 2022

Customising the GUI in DeaDBeeF Music Player

A video of the GUI customisation process in the DeadBeeF music player in XFCE with the Arc Darker theme. (Speed is x2). Just to show what can be done.

Plugins used were:

Playback Status Widget

Musical Spectrum

File Browser

Spectrogram

Waveform Seekbar

 



Saturday, December 17, 2022

Build your own music player with DeaDBeeF

I've been playing with DeaDBeeF. (No, that's not as horrible as it sounds.) I wondered if I could come up with a an elegant, minimalistic design for the customisable music player, inspired by the screenshot at the website. I think I did.

Inspiration was the Audacious GUI of course, for anyone au fait with that excellent music player. It took me quite a while to wok out how to customise the player to my liking, and I'm thinking recording a screencast of the whole process might be fun.


Tuesday, December 13, 2022

File transfer - Android to Debian

I plugged my most recent Android phone into my most recent installation of Debian with the intention of transferring some files and... nothing happened. In the past, connecting the phone via a USB cable resulted in the phone asking me if I wanted to charge it or transfer various files in various ways. I assumed Android had removed the feature, as it has done with other useful features, such as the ability to keep apps on external memory, rather than have them move to internal memory every time they update.

But later on I tried plugging my phone into and old laptop with a Debian install from about five years ago, and it recognised the phone. However, after updating the installation to Bullseye, it didn't. After a bit of investigation, I found there were two issues on the new phone and new installs.

I am not sure if I installed something on the old Debian install to allow connection to an Android phone and then forgot about it, but it is definitely necessary to install something to enable connection in Bullseye. As I was using XFCE, I installed gMTP, and that allowed me to connect the phone. Debian Wiki.

The second issue is that the connection menu in Android is hidden. I am pretty sure that previously there was a message saying "computer connected, click for options" or something similar. Now there is just an arrow to indicate that there are more options.

Tapping the notification brings up the file transfer options.




Debian Bookworm Gets New Artwork

After an update to Debian Bookworm Base files today, login artwork had changed, and a new wallpaper was available.


It seems to be the Emerald theme by Juliette Taka. The inspiration seems to be folded sheets of paper. Juliette has always gone for the abstract rather than literal interpretation of the toy story character that inspires the artwork for each release.

wiki.debian.org

I didn't notice  a competition this year. I expect the people at Debian have just decided that as Juliette's design is always the best, they might as well just ask her to submit a design. I have used all four of her previous wallpapers, even Buster, when she didn't win the competition, her abstract moon losing out to a jigsaw dog.


Sunday, December 11, 2022

Share Over Wifi in Linux

I sometimes need to transfer a photo from my Android phone to my Linux computer. Bluetooth works, but is slow. I found Send via Wifi in Total Commander on my Android phone, which transfers files very quickly. It provides an http address which I put into Firefox, where the files I have chosen to send as download links.

It is also possible to send files from Linux to Total Commander. The Receive via Wifi plugin says it requires either Total Commander (which is a Windows PC app only), or an app with a share button and a send via wifi feature, which I don't have.

As Total Commander seems to set up an http server to transfer files, I wondered if it was possible to start an http server in Linux so that Android can view and download files on the computer. Indeed it is. There is a simple Python command that will set up an http sever. This can then be accessed from a web browser in Android, and files viewed, played or downloaded, just by entering the IP address.

This of course is over a local network behind a firewall. 

As entering an IP address, is a bit tedious, I then wondered if there was a way of getting a QR code to pop up with the IP address for Firefox to read in Android. Well, yes there is.

Scan the QR code in Android, and Firefox asks if you want to open the link. (If you don't have Firefox for Android, you may need another QR reading app.) From the page that opens, you can browse the file system.

To do this you'll need the qrencode and imagemagick packages. The script I wrote to start the server and pop up the QR code is below. The exact Python command to start the http server may vary according to distro and version - this one works in Debian Bookworm. The port used must be open on the hosting computer.

#!/bin/bash
ip=$(hostname -I)
echo http://${ip/ /}:8000/ > url.txt
qrencode -s 8 -r url.txt -o qrcode.png
display qrcode.png &
python3 -m http.server

Mostly for my benefit, as I hacked together the script from bits and pieces I found on the internet, here's some information about what the code does. (I always forget after a while and wonder why I did what I did.)

1. Find the IP address of the host computer.

2. Trim the output because the command adds a space to the end of the variable for some reason and write the output to a text file because qrencode only accepts text strings.

3. Read the text file and turn it into a QR code with block width 8 pixels.

4. Display the QR code and start the server in parallel (&).

To stop the sever, do Ctrl + C.



Saturday, December 10, 2022

Lenovo All-in-One C20 Fan Gets a Clean

 

Computer fans collect dust and fluff and need cleaning every six months to a year to work efficiently, and if left to collect dirt can cause excessive noise and even computer shutdown due to overheating.

So why don't computer manufactures make them an easily accessible maintenance item? Why do they make the task difficult for even somebody with experience of computer maintenance? Why (in the case of my Lenovo C20 fan above) do they make the task so difficult that the vast majority of computer owners could not do it without damaging cabling and components, and probably rendering the computer inoperable, even though this is a piece of routine maintenance that will need doing regularly?

A cynic would say that they expect you to ditch the computer in a couple of years, so aren't bothered what happens when the fan gets dusty, because you'll probably just go and buy a new one.

Opening the case of this computer was difficult enough, involving removing hidden screws and popping the screen from the body with a screwdriver. Having done that, I expected the fan to be accessible for cleaning, but no, no sign of it. I had to remove connections from the motherboard, unscrew it, lift it to the side and remove a metal screen before I could get to it.

I'm not going to give detailed instructions because if you are experienced at computer repairs, you can probably figure it out, and if you aren't, this is not a task you should carry out. I was doubtful myself that the computer would work when I put it back together, but fortunately it did.

This is not a task I will be repeating anytime soon. The computer only has a very low powered netbook CPU, and is not used for demanding tasks, so the fan rarely spins hard, and I have not noticed any excessive noise or overheating in the seven years I've had it, so maybe in another seven years I will risk cleaning the fan again.

But really, why couldn't there be a hatch behind the fan as it lies against the back of the case? This would allow regular dusting. Sadly the computer seems to have been designed as a throw away item. Next time I think I will buy a tower that is designed to be serviceable and upgradeable.

Here are some photos of the procedure for anybody brave enough to try it.






Now why couldn't there just be a hole in the back to get at this???

Lenovo C20 Gets a Memory Upgrade

The good thing about "old" computers is that memory gets cheaper, and adding memory gives the computer a new lease of life. I have added 500MB, 1GB, and 4GB memory to my old laptops for a very reasonable price after about 6-8 years. As I recall, I paid about £10-15 each time, for memory that was originally perhaps 4-5 times that price. I have also upgraded the memory on an old tower PC for less than a couple of pounds, but in that case, the computer was more like 10-12 years old, and the memory card a salvage item from eBay.

Extra memory will make a computer run much better if it is using a high percentage of that memory, because the computer starts to use swap (Linux) or virtual memory (Windows), writing memory to hard disk to free RAM space. This makes switching applications or browser tabs or opening menus slow, as these things have been swapped from RAM to HD as RAM becomes full. (I don't know if the same thing applies to SSDs, because I don't have one.) It won't make a computer faster at gaming or video editing, but with web pages and web browsers using more and more memory, it will make using the internet (especially with multiple tabs open) a much better experience.

Indeed, I upgraded the memory on my newest laptop for just this reason. It would work perfectly well with 4GB of RAM - without a web browser open! With 8GB, web browsing is perfectly fluid, even with dozens of tabs open, as I documented here.

I had not upgraded this machine, a Lenovo all-in-one C20 previously because it only has one memory slot, which would have meant buying a expensive 8GB memory card, rather than, as with my laptop, adding a cheaper 4GB card to a spare slot. 

Recently though, the Lenovo has been having issues, with the HD churning when switching applications (a good sign that the computer is having to move memory between swap and RAM), and the main menu taking 15 seconds to appear.

Investigating memory usage showed 86% of RAM in use, with 1.7GB of swap memory in use.

A previous screenshot of memory usage from a few weeks ago did not show the same high usage of swap, so I'm wondering if this could be a result of a memory leak in the latest version of Firefox (I'm using 107).

Whatever the cause, I found a refurbished 8GB card from a well-known memory supplier for £14.94 with a lifetime guarantee, and couldn't resist. This was not a dusty old card from a salvage machine, but as sellers of refurbished hardware like to say "cosmetically indistinguishable from new". An unwanted return? Anyway, a bargain, and here is memory usage after fitting.

This is with multiple active tabs open in Firefox. Switching between tabs is instant, the main menu appears in a fraction of a second again, and there is still room to open other applications. Result! 

With a browser open, 8GB of memory seems to be the minimum for a usable system these days, as was the case with my laptop. For older machines, a memory upgrade becomes an affordable option, but how was the actual procedure? Pretty awful, it has to be said. This machine is not designed to be easily opened.

The key is to pull back the rubber feet on the legs to remove two screws. I would never have noticed these without finding a guide on the internet. There is another screw under a removable panel behind the stand hinge. After removing these, insert a blunt screwdriver in to the legs and start cracking off the screen. Slide the screwdriver along the gap until resistance is felt, then twist to pop the next catch along. Level of difficulty: high. Chance of damaging case or screen: high. Do I wish I'd bought a tower? Yes.



When the screen is detached, the card slot is easily accessible on the mother board. Don't forget to earth yourself before touching memory cards.


If you are wondering why I'm in the process of removing the motherboard, it's because I thought I would clean the fan while I had the case open, but the only way to access the fan is to take out the motherboard. Yes, worst design ever, but that's another story...