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...

Tuesday, November 1, 2022

Edit PDFs in Linux with Firefox 106

Did you ever receive a PDF form in Linux and wish there was an easy way to edit it with your information before returning it?

Well now you can with Firefox 106.

It is now possible to edit PDFs: including writing text, drawing, and adding signatures.

Firefox Release Notes



Sunday, June 5, 2022

A panel task switcher for XFCE on Debian

In Gnome of course you can see all your open windows and switch between tasks with Alt+Tab. In Windows you can do this with a panel button - something which I wondered a decade ago whether might be possible in Linux. Always prompt to find and answer to issues, I offer you, ten years later, Skippy-XD, full screen task switcher for X11.


Skippy-XD is not available from the Debian repositories. You can compile it from source, or cheat like me and get it from MX Linux as a Debian package. I tested the MX 19 package on Debian Testing. It works, but may not necessarily be as stable as something from the Debian repository.

To add Skippy to the XFCE panel, add a launcher to the panel with the command

skippy-xd –activate-window-picker

The screenshot above is not the default appearance. By default, the uppermost window on the desktop is tinted and the lower windows are slightly transparent,  windows are without icons, and windows appear on the screen as is when Skippy is activated, so if you have multiple windows visible on the desktop, Skippy will display the same windows on top of themselves, but transparent, which can be a bit difficult to view. I have edited the configuration file to remove transparency and tint, have an icon on the windows, and use the desktop wallpaper as a background.

To change settings, copy the configuration file from /etc/xdg/skippy-xd.rc to ~/.config/skippy-xd/skippy-xd.rc 

I edited these lines of the configuration file:

clientDisplayModes = thumbnail-icon icon filled none 

[Displays an image of open windows with the icon of the application superimposed, and falls back to just an icon when an image is not available - if the window is minimised or on another workspace.]

background = tile /home/<user>/homeworld.png 

[.svg wallpaper files don't work.]

[normal] 

# tint = black 

tintOpacity = 0 

opacity = 255 

[highlight] 

#tint = #101020 

tintOpacity = 0 

opacity = 255 

[No transparency, no tint.]

[tooltip]

border = #404040 

background = #404040

[No white border.]

For anyone curious, the dock in the screenshot and video above is the XFCE docklike plugin, also available for Debian from MX Linux.




Thursday, June 2, 2022

No internet connection in Debian Testing install

I installed Debian Testing on a separate partition on this computer recently and found I had no internet connection. I could connect to my router but not to any web sites. I had used the Debian Testing installer which does not contain non-free firmware, and selected not to configure wifi during install, as my wifi won't work without iwlwifi. However, I'd installed the package manually after the installation completed.

To cut a long story short, after a day of looking into it, I found that my /etc/resolv.conf file was a broken sim link. resolv.conf is used by Systemd and Network Manager to resolve IP addresses - hence no internet connections. I fixed it by editing /etc/resolv.conf  and adding the location of my access point, the router:

# Generated by NetworkManager
nameserver 192.168.2.1

I can't remember whether my internet connection started working right away, or I restarted Network Manager or rebooted. 

The file is apparently reset/overwritten by systemd-resolved/Network manager with an address from the DNS server, which in my case is the ISP via the router: the file now contains an entry for OpenDNS, which I'm guessing the ISP uses.

Anyway, I assume the problem occurred because I didn't configure the wireless connection during the install, but it might be a bug in the Debian testing installer.

LinuxHint 

Edit: added another link I used.

Red Hat Customer Portal

Edit: Corrected LinuxHint link and adding a link to a bug report I found at the time but forgot to add to this post.

resolv.conf symlink is broken








Borked my swap file

I installed Debian Testing on this computer to play with, but allowed the installation to use the swap partition. When I booted into the main installation (Debian Bullseye Gnome), I found it did not have swap memory available, which is not good because with only 4GB of RAM, it needs swap memory if I have a browser and other applications open. (Unfortunately it has one card slot, so upgrading the memory would involve purchasing an expensive 8GB card, unlike my laptop which had a free slot so I could drop in am extra 4GB card for not too much money).

The solution was to get the main installation to share the swap partition by updating the UUID.

# blkid /dev/sda3

Got me the UUID given to the swap partition on this computer by the new install.

I then replaced the old, now non-working UUID with the working UUID from the command above.

# nano /etc/fstab

askubuntu

Apparently it's OK for the two installations to share the swap partition, as long as it is not used for hibernation, which it is not.

askubuntu again.

Tuesday, May 31, 2022

Suspend won't work when screen locked in XFCE


If you set the screen to lock after a certain period in XFCE, and the computer to suspend after a further period, you may encounter the above message when you come back to the computer: the screen has blanked but the computer hasn't suspended. The message is (for search engines):

Authentication is required to suspend the sytem. Action: org.freedesktop.login1.suspend. Vendor: The systemd Project.

The XFCE settings for this are:

Power Manager > System > System Power Saving > Suspend / When inactive for 30 minutes.

and

Power Manager > Display > Display Power Management > Blank after 15 minutes

and

Power Manager > Security > Light Locker > Automatically lock the session / When the screensaver is activated

This does not happen if the screen is set to blank but not lock, and to lock when the system suspends, with the settings:

Power Manager > Security > Light Locker > Automatically lock the session / Never

and

Power Manager > Security > Light Locker > Lock screen when system is going to sleep

A solution (if you would like to lock the screen when it blanks and have the system suspend at a later time) is

Add a file 

/etc/polkit-1/rules.d/85-suspend.rules

(NB this involves creating a directory and a file in it - read to the end if you need instructions for this.)

with: 

polkit.addRule(function(action, subject) { 

 if (action.id == "org.freedesktop.login1.suspend" && 

 subject.isInGroup("<your user name>")) { 

 return polkit.Result.YES; 

}); 

And in Terminal, type: 

# chmod 755 /etc/polkit-1/rules.d 

# chmod 644 /etc/polkit-1/rules.d/85-suspend.rules 

Then reboot.

This is a slightly modified version of a solution posted by mja at askubuntu.com. Why? Because the solution there uses:

subject.isInGroup("users")) {

But the group "users" does not exist by default, and its use in not recommended according to the Arch Wiki. Using my user name (which is also a group by default) worked for me.

So if your user name is fred, use

subject.isInGroup("fred")) {

Note that mja also points out that the first solution on the Ask Ubuntu site involving the 

org.freedesktop.login1.policy

file is not recommended according to the Arch Wiki site because the file could be overwritten at a later date.

The Debian Wiki has a solution to the same problem which involves the rules file and the policy file, but does not mention the need to create the group users.

For me, using the rules file was enough to solve the issues.

The Debian Wiki does give instructions for creating the rules.d directory:

# mkdir /etc/polkit-1/rules.d

so check it out if the process is unclear.



Friday, May 6, 2022

(M)utter Madness - application is not responding

I am running Gnome on Debian Testing, and after a recent update to Gnome 42, I started getting the

Application is not responding

dialogue box every few seconds with any application that carries out any processing operations, forcing me to click the "Wait" button to continue. The main culprit was Synaptic, which has to update and check package lists to identify updates: a process which quite normally takes a few seconds. I was getting the "not responding message three times during this process.

I don't know what changed recently to cause this annoyance, but here is how to fix it.

Open dconf Editor and go to /org/gnome/mutter.

Look for check-alive-timeout and edit the period if necessary. Mine was set to 5000 which is 5 seconds in milliseconds. I changed to to 60000, which is 1 minute in milliseconds - a more reasonable period.

Update:

I did a bit more research and found that it may actually be the application at fault,and the issue may be limited to Wayland.

The check-alive feature is there for the user to be able to terminate frozen applications more easily. However, sometimes applications are implemented in a way where they fail to be reply to ping requests in a timely manner, resulting in that, to the compositor, they are indistinguishable from clients that have frozen indefinitely. 

When using an application that has these issues, the GUI showed in response to the failure to respond to ping requests can become annoying, as it disrupts the visual presentation of the application. 

To allow users to work-around these issues, add a setting allowing them to configure the timeout waited until an application is considered frozen, or disabling the check completely.

Gnome has added this setting, which is good.

 gitlab.nome.org

Wayland compositors can send a ping to apps that they are supposed to respond to with a pong. However, if an app caught itself in an infinite loop or other computation that takes a long time, it might not send that pong.

reddit.com

Requests provided by wl_shell_surface 

wl_shell_surface::pong - respond to a ping event 

serial 

uint - serial number of the ping event 

A client must respond to a ping event with a pong request or the client may be deemed unresponsive. 

wayland.freedesktop.org










Saturday, March 5, 2022

Firefox on Wayland

I'm using the Firefox release version from Ubuntuzilla on Debian Testing running Gnome, which uses Wayland by default now, so I wondered, does Firefox use Wayland by default? The answer is no, but it is fairly easy to enable it and it seems to work well, with a claimed significant improvement in rendering performance.

To enable Wayland mode in Firefox, edit

/usr/share/applications/firefox-mozilla-build.desktop

to

Exec=env MOZ_ENABLE_WAYLAND=1 firefox %u

(This will also work with other builds of Firefox and executable paths. See StackExchange.)

To get the performance increase in rendering, set

gfx.webrender.compositor.force-enabled 

to true in about:config. (Arch Wiki)

There is a bug which results in the window icon and title not displaying.

To correct this I had to change the line

StartupWMClass=Firefox

in the desktop file above to

StartupWMClass=firefox

(StartupWMClass must match the executable name exactly.)

I found the solution in this bug report, of which the previous bug is a duplicate, although more descriptive of this issue.


Monday, February 14, 2022

XFCE Docklike Plugin on Debian Bullseye Live

Traditionally on XFCE you would have a menu button and window buttons in the panel. You could create a launcher for an application in the form of an icon, and have window buttons in the form of icons for running applications. With the obvious disadvantage that you would have two application icons on the panel, where really you only need one (taskbars can contain a pinned launcher which, when the application is running, can also be used to switch to the application).

There is now such a taskbar available for XFCE, called xfce-docklike-plugin. It's not in the Debian Bullseye repository, so it's necessary to download, build and install it.

Unless you cheat and use the MX Linux repository based on Debian Bullseye. MX Linux XFCE edition is using the plugin as it's default window switcher. The repository is here. Tested on Debian Live XFCE non-free. You will need to install

xfce-dev-tools

Wednesday, January 5, 2022

Debian Security does not have a release file

If you are updating from Debian Buster to Debian Bullseye, you may notice the message in the title when editing you sources.list file. This is because the repository has changed.

In buster it was:

deb http://security.debian.org/ buster/updates main contrib non-free

deb http://deb.debian.org/debian buster/security main

In bullseye it is

deb http://deb.debian.org/debian-security/ bullseye-security main 

or  

deb http://security.debian.org/debian-security bullseye-security main

depending on where you look. (Debian Security Information or Debian SourcesList.)

Simply replacing Buster with Bullseye gives the error in the title.

Edit: changed the Buster repository because I think I misremembered the address. I changed to one I blogged about before as working after a similar issue.

Debian seems to be trying to make the security repository address as confusing as possible, and succeeding.