Showing posts with label Debian Bullseye. Show all posts
Showing posts with label Debian Bullseye. Show all posts

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.




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.

Monday, September 27, 2021

Installing Brother HL-1212 W-Fi Mono Laser Printer in Debian Bookworm/Bullseye (Gnome)

[Update 2: The latest version of printer-driver-brlaser works without issue now in Bookworm post release and Trixie (Testing), which both at version 6.3 at the time of writing. Bullseye still has 6.1, so the issue may remain.]

[Update: Unfortunately printer-driver-brlaser is affected by a bug that means documents with images sometimes fail to print with no error message at all. Gnome says the document has printed successfully, CUPS says the document has printed successfully, but nothing appears from the printer, not even blank pages, and the printer records no error.

Back to the driver from the Brother web site then.

See Google Groups, and Github. The driver is patched on Github but it seems there is no Debian maintainer for the package, so no hope for the moment that the Debian package affected (6.2) will be fixed any time soon.]


The Brother HL-1212 WiFi printer does not do driverless printing. See previous post. "Modern" printers don't need drivers, but budget printers like this one (still on sale at the time of writing) seem to date back a decade or two and need drivers.

Previously, I downloaded a driver installation tool from Brother (which worked very well). I am now using Debian Bookworm (Testing), and found today that Debian has included a driver for this printer it its repositories in Bullseye, namely in:

printer-driver-brlaser

Adding the printer was a very easy process. In the printer dialogue click "Add". The printer dialogue found the printer without adding the network address, although there is an option to search by IP address. Three options came up - the printer name, the printer name with some sort of address I didn't recognise appended to it, and a CUPS reference. I chose the first one and the printer entry that came up printed a test page straight away. (Gnome Software said it needed to look for additional things to install, went away and did so, and came back to say it couldn't find anything, but the printer worked anyway.) 

The printer entry contained fields for driver and address, so I selected/entered those, even though the printer seemed to work OK already.

The HL-1212W is available in the UK from Argos with four additional toner cartridges for £159.99, which is quite a good deal if you do a lot of printing.



Tuesday, June 15, 2021

Things that are broken in Debian Bullseye - Thunderbird

An update of Thunderbird (1:78.10.0-1) to 1:78.11.0-1 yesterday seems to have broken it. It says:

Authentication failure while connecting to server imap.gmail.com

I though maybe that Google's strict security didn't recognise the new version so I tried resetting third party app access, but that just got me an error message:

NS-ERROR-NET-INADEQUATE-SECURITY

Thunderbird seems to have had this issue before and a previous fix worked for me.

There are bug reports already here and here and here. The same fix has been noted here.

I am not sure if the fix:

network.http.spdy.enabled.http2 = false

introduces any security risk.

Monday, April 12, 2021

An update on Debian updates

I recently wrote several posts on updates in Debian, on XFCE and Gnome, Bullseye and Buster.

The default, I wrote, was no notifications of updates by default on XFCE in Bullseye, and no automatic updates, and notification of updates and automatic installation of security updates in Gnome on Buster.

However, after applying the same default to XFCE, I noticed that I was actually getting automatic updates to all packages.

Sure enough, Gnome on Buster was also getting more than security updates.

It turns out that unattended-upgrades (the package which installs automatic updates in Debian,  actually updates all packages by default in Debian Buster and later. (The default in previous version of Debian was security updates only.)

I discovered this in a post on the Debian User Forum, which linked to the Debian Buster release information page. I found the NEWS.Debian file thanks to Debian documentation. 

It reads: 

Unattended-upgrades in previous versions defaulted to install security updates only on Debian by using the label=Debian-Security origin pattern. Now it is changed to allow updates with label=Debian, which allows applying stable updates in stable releases and following all package updates in testing and unstable. 

In stable releases this unlocks installation of security updates depending on package versions present only in stable updates. 

Note that testing and unstable can often contain packages for which installation or upgrade performed by unattended-upgrades fails and requires the administrator to fix the system later.

My fault then for not reading the release information when I upgraded from Stretch.

The Debian Wiki page says:

The purpose of unattended-upgrades is to keep the computer current with the latest security (and other) updates automatically.

Which to me implies that other updates are optional, but obviously not.

I have updated the post on automatic updates in XFCE.  As I am currently using XFCE on Debian Testing, I have disabled updates to all packages by commenting out the line:

//      "origin=Debian,codename=${distro_codename},label=Debian";

I have checked my Gnome installation on Debian Buster, and it also contains the line above, which means that "stable updates" are applied automatically. I've also updated my post on automatic updates in Gnome.

Interestingly, the Gnome Blog states that Gnome will not install updates automatically. unattended-upgrades is a system package and overrides Gnome in Debian, which explains why Gnome notifies me of available updates, but they often disappear before I can install them, with the exception of Chrome, whose repository is not included in unattended-upgrades. NB unattended-upgrades is triggered to run within a randomised period, so the time that update notifications, whether those displayed by default in Gnome, or by the options I described in XFCE (Conky, Genmon), may appear for a few minutes or a few hours before disappearing if you have unattended-upgrades installed.

I hope this post helps anybody struggling, like me, to work out how automatic updates happen in Debian. Apologies for any confusion caused previously.


 


 



Monday, March 8, 2021

Things that are fixed in Debian Bullseye

A kernel and lots of firmware updates and Bluetooth is working!

This fixes the issue of the kernel not recognising the Bluetooth adapter because the vendor had reused the chip identifier, with the following message in dmesg.

Bluetooth: hci0: don't support firmware rome 0x31010100

Sunday, March 7, 2021

Toshiba laptop gets a memory upgrade

Previously on this blog I described how my laptop was using 93% of its available RAM and 69% of available swap memory after a few hours use, largely due to having a dozen or more browser tabs open. Not an ideal situation. That doesn't leave any memory available to open up a word processing application or an image editor without the computer slowing down as Firefox is forced to cache tab content to disk. I have noticed that with several memory-intensive programs running, background programs are very slow to reopen, presumable because they have cached content to the disk. And of course with both RAM and swap (virtual memory) almost full, it leaves the computer likely to experience thrashing and crashing, if a program uses too much memory, whether due to me asking it to work on a large file, or some sort of bug causing excessive memory use.

So, time for some new memory. I found an identical card to the existing 4GB card in the laptop on eBay and popped it in the empty slot.

I didn't take a picture, but I have one from when I cleaned the fan (hence the very dusty fan in the corner). The procedure is very simple. Pull out the metal cover between the two sockets, put in the new card pins into socket at a 45 degree angle, push it down till it clicks, and replace the metal cover. Be careful because it has a lug on one side that goes into a hole in the board. Don't forget to earth yourself. I put my naked toe on the copper radiator pipe - only issue in the winter, it's hot, ouch!

A useful command to check memory is:

dmidecode --type memory | less

Which tells you about the cards installed, including manufacturer, part number and specification, all of which matched for my eBay card, although the label was different - something I will have to investigate later.

Here is a comparison shot of Task Manager with 43(!) tabs open in Firefox.

Swap memory has also increased since my previous post, when the laptop had 975MB of swap. The default installation of Debian Bullseye created this much swap. Supposedly this is done automatically according to memory and hard disk space available, but my other computer has the same amount of memory and the same hard disk size, and yet it has four times as much swap.

There are a lot of different recommendations for swap size on the internet, but 975MB certainly seems too small a size - it certainly isn't big enough to hibernate the computer because that involves writing the entire memory to disk, and 4GB won't fit in 975MB. Swap memory was at 69% as mentioned before, which doesn't allow much room for manoeuvrer. 

Increasing the size of swap memory was actually fairly easy, but it does involve booting into a GParted live CD or USB. Once I had done so I could shrink the main partition to make room for the swap partition to expand. The swap partition is found inside an extended partition, at the "end" of the main partition, so it's necessary to move the extended partition to the left before expanding the swap partition.

Grab the arrows at the ends of the partition to resize because the buttons take forever.

I gave the extended swap partition 9542MB, a fairly arbitrary figure, but as I actually did this before adding the extra RAM, it meant I had over twice as much swap as RAM. Surely enough to hibernate?

I tried hibernating the computer, but unfortunately ran into a video driver bug that means the screen remains blank after coming out of hibernation.

kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* displayport link status failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* clock recovery failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* displayport link status failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* clock recovery failed
Oh, well. On a 500GB disk, I'm not really missing 9.5GB. The computer hasn't touched available swap space since I installed the new memory, but maybe the video bug will get fixed and allow hibernation at some point.




 



Thursday, February 18, 2021

Update notifications in Debian XFCE Part 2

XFCE in Debian does not notify the user of available updates. In this post I'm going to show two methods of getting update notifications. Before using either of these methods, it's necessary to configure Debian's package manager APT to check for available updates, as described in my previous post.

It's also necessary to install aptitude, which is a text-based terminal front end for APT.

Method 1: using Conky

Conky is a system monitor which can be used to output the result of a terminal command to the desktop. Here, it is writing the output of the following command to the desktop:

aptitude search "~U" | wc -l

Which tells aptitude to search APT for updatable packages, count and list them. (Found on the bunsenlabs forum.)

The line in my Conky config file is:

${color grey}Available updates:$color ${execi 3600 aptitude search "~U" | wc -l}

Which tells Conky to execute the command every hour. Add Conky to Application Autostart in XFCE. The command conky -d -p 12 runs Conky as a daemon with a 12 second delay - Conky can get buried if a non-system wallpaper is applied after the desktop starts.

The full Conky script is at the bottom of the post for reference.

Method 2: using Genom in the XFCE panel

The disadvantage of the first method is that many people don't see their desktop very often. With the second method, the notification is in the panel, so it's easy to notice.

Genmon is an XFCE plugin that monitors terminal commands and outputs the result to the XFCE panel. So in this case, Genmon is monitoring the output of the same command we used in Conky but showing the result in the panel, alongside an icon which only appears when updates are available.

Genmon can also use the XFCE tooltip to display a list of available updates from the output of this command:

aptitude -F%p search '~U'

Which returns the names of updatable packages.

The panel icon is also clickable and can be configured to update the system.

Credit for the Genmon script goes to alkusin.net, where an XFCE update script is mentioned, although I had to use waybackmachine to find it. 

I modified the script to work with Debian, and added the <iconclick> command, which was added to Genmon recently and allows the script to use system icons. Most icon themes have a software update icon in the Status folder somewhere, although the name may vary.

Here is the Genmon script:

#!/bin/bash
updates=$(aptitude search '~U' | wc -l)
details=$(aptitude -F%p search '~U')

PANEL="<icon>software-update-available</icon>"
PANEL+="<iconclick>./update-script.sh</iconclick>"
PANEL+="<txt><span size='6000' rise='8000'>$updates</span></txt>"

TOOLTIP="<tool>"
TOOLTIP+="<span weight='bold'>Available updates: $updates</span>\n"
TOOLTIP+="$details\n"
TOOLTIP+="<span weight='bold'>Click icon to update</span>"
TOOLTIP+="</tool>"

if [ $updates -gt 0 ]; then
  echo -e "${PANEL}"
  echo -e "${TOOLTIP}"
else
  echo ""
fi

The script has to be saved as a text file with the .sh suffix and made executable (Properties > Permissions in Thunar). Then enter the path to the script in Genmon properties:

Command: /path/to/your/genmon-script.sh

Label: unticked

Period (s): update interval in seconds - eg 3600 (1 hour)

I have put the <iconclick> actions in a separate script, so I could get the terminal to update the system and refresh Genmon so the icon disappears after updating - I don't think it's possible for an XML <click> command to do this.

So, if you want to update with a click, put something similar in an .sh executable file:

#!/bin/bash
xterm -e "pkcon update && sleep 5s && xfce4-panel --plugin-event=genmon-7:refresh:bool:true"

[Edit: You will need to change genmon-7 to the Genmon ID number in your panel. Go to Panel>Panel Preferences>Items and hover over the Genmon instance in the list - you will see the ID number for your panel.]

exo-open --launch TerminalEmulator works too, but I like the cute Xterm terminal.

I hope these methods are useful to somebody. If I have left out any necessary information, please let me know in the comments!

Here are the modifications to the Conky script. Get the default Conky script from etc/conky/conky.conf and copy to  ~/.config/conky/conky.conf and edit. 

gap_x = edit to suit
gap_y = your monitor
own_window_transparent = true,
own_window_argb_visual = true,

 
conky.text = [[
${execi 86400 lsb_release -sd}
$kernel${time %A %d %B %Y}
${color grey}Uptime:$color $uptime

${color grey}Available updates:$color ${execi 3600 aptitude search "~U" | wc -l}
]]

[Update: amended Conky script so it checks for Debian release information daily and not every second.]

Wednesday, February 17, 2021

Update notifications in Debian XFCE Part 1

I've been using XFCE in Debian Testing for a few weeks, so of course there have been a lot of updates - mostly bug fixes at this stage of the cycle. I've been updating manually every day to keep up to date and watch for fixes for any issues I have.

But when Bullseye becomes Stable, how will I know if updates are available? Updates in Stable are less frequent, so it's good to get a notification if they are available.

Unlike in Gnome, update notifications don't seem to happen in XFCE in Debian. However, there are ways to be notified of updates. One way is to install package-update-indicator, which basically installs the Gnome update system, with, it's own pop-up indicator.

However, there is a way to get notifications without installing the Gnome system, if we simply want to be notified of updates. (The Gnome system can install updates, automatically in the background if so configured.)

Here's how.

The first step is to enable the system to update its list of available packages so it knows if there are newer packages available. Manually, this would be done by this command:

#apt-get update

Fortunately in Bullseye, there is a way to get APT to update itself automatically. Systemd runs a system scheduler which contains a timer called (with admirable succinctness):

apt-daily.timer

This timer runs by default, but the default APT setting is to do nothing. We need to configure Apt to update its packages daily when its script is run by the timer.

This is done by creating a configuration file and adding some variables. The configuration file needs to be:

/etc/apt/apt.conf.d/10periodic

And the variable we need to add is:

APT::Periodic::Update-Package-Lists "1";

There is a package in the Debian repository which will do this automatically. It's called apt-config-auto-update and it will configure APT for automatic cache updates. Its default settings in /etc/apt/apt.conf.d/10periodic are:

APT::Periodic::Update-Package-Lists "1";

APT::Periodic::Download-Upgradeable-Packages "1";

APT::Periodic::AutocleanInterval "0";

These settings will check for updates and download upgradeable packages, if that's what you want. "1" means once a day apparently, so once a week would be "7". Autoclean can also be enabled.

To check up on automatic package list updates run:

# journalctl --since yesterday -u apt-daily.service

To check on Systemd's update schedule for APT (by default the time is randomised), run:

# systemctl edit apt-daily.timer

 # systemctl status apt-daily.timer                  
Debian Wiki.

If you would like to automatically install security updates, it is possible with unattended-upgrades, which creates a similar configuration file in the same location.

Now APT is doing a daily package list update, we just need a way of being notified of those available updates. But that will have to wait till the next post.

To be continued...

References:

Unix & Linux

Laurence's Blog

Ask Ubuntu

Ask Ubuntu

Debian Handbook

 

Edited to correct command to check update schedule, 28-12-2022.

 

 

 

 

 




Tuesday, February 9, 2021

Things that are broken but getting fixed in Bullseye

Bluetooth is currently broken for some adapters in Debian, but it looks like there is a fix coming in the 5.11 kernel.

Another bug report at kernel.org.This time the message is:

kernel: Bluetooth: hci0: don't support firmware rome 0x1020200

Technical details are here.

Patched kernel for testing at Canonical is 5.11.0.

Final release of 5.11 is expected sometime in mid-February, according to 9to5Linux.


Sunday, January 17, 2021

Can't acces USB Drive over wireless network

So, you have a USB drive plugged into your wireless router, but you can't access it in your file manager over the network.

It may be that your router is using a networking protocol that is now deprecated, and no longer supported by your computer.

It may also be that the manufacturer of your router has not issued a firmware update so the router can use an up-to-date version of the protocol.

If you still want to use your router to access a USB drive, the security risk over a home network seems to be minimal, and there is a way to get your computer to use the old protocol.

If you are using Windows 10, which has dropped support for the old protocol, you should have a look at this guide.

I'm going to be looking at the issue in Thunar on XFCE in Debian Testing (Bullseye). 

I was trying to access the USB drive plugged into my router on a new installation of Debian Bullseye. (Having installed the necessary packages. And this one too, which didn't help, but may be necessary.)

I could do so using the ftp address supplied by the router, but not by using the "Browse Network" option in Thunar, where I could see an icon for the drive but not open it.

I put in the smb address for a folder on the drive and got this error message.

Failed to mount windows share. Software caused connection abort.

After much searching, I found that the reason was the deprecated protocol mentioned above.

The issue is discussed at the Manjaro Linux Forum, and at askubuntu.com, as indeed is the solution, so thanks to users at both of those places.

The solution can be implemented in Thunar by creating the following folder and file:

/etc/samba/smb.conf

And adding the line:

client min protocol = NT1

(Although Thunar uses Samba to access network folders, it does not need Samba to be installed - it's part of the gvfs-smb backend - so unless you have Samba already installed, you have to create the samba folder, which doesn't involve installing Samba and its many dependencies. I can't remember where I read this advice in all the links I looked at, but thanks go to whoever it was that mentioned it - I can't take any credit.)

After logging out and back in, you will be able to open your network drive and access folders and files on it.

Yay!








Sunday, January 10, 2021

Debian Bullseye Artwork

Entries are in for the Debian Bullseye artwork, with the winner due to be announced soon, I think. See them at the Debian Wiki page.

These are my favourites:

Homeworld, by Juliette Taka

Change, by Wilton Gorske

Horse Grazing Freely, by Carlos Donizete Froes

Juliette Taka's artwork was chosen for Jessie and Stretch, and was my favourite for Buster. In fact it's the wallpaper I've been using on this laptop since I installed Buster while it was still in testing.

It must be time to try Bullseye!