Wednesday, January 20, 2021

Driverless printing in Debian

I installed Debian Testing on my laptop recently, and had to reinstall my printer. Before heading to the Brother website to download the installation script they provide, I decided to check out the situation in Debian regarding printers. Previously I had tried an open source driver (which produced deformed text) before installing the proprietary drivers (via the installation script) from Brother.

I found the following on the Debian Wiki:

A proportion of the material on the Printing Portal pages is applicable to installing printer drivers (free and non-free) and PPDs and setting up a print queue for legacy printers. However, it is as well to be aware that drivers and PPDs are deprecated in CUPS and eventually they will not be catered for as they are now. This has been a long-term objective of the CUPS project for some time.

Users possessing a modern printer are urged to consider the following points and explore a driverless printing solution for their printing needs, whether or not the deprecation is a motivating factor.

  • Driverless printing was introduced to CUPS and cups-browsed in Debian 9 (stretch). 
  • Support for driverless printing with CUPS and cups-browsed is considerably extended in Debian 10 (buster) and Debian 11 (bullseye). 
  • Printers sold in the last 10 years or so are almost always AirPrint devices and therefore would support driverless printing when the device is connected by ethernet or wireless.

(CUPS is the standards-based, open source printing system developed by Apple Inc. for macOS® and other UNIX®-like operating systems. CUPS uses the Internet Printing Protocol (IPP) to support printing to local and network printers.)

Well, I have a modern printer, so I set off to explore a driverless printing solution.

Here's what I learnt: computers used to need a driver to tell the computer how to format a print job so that a printer could print the job. Driverless printers tell the computer (or today, phone tablet or other mobile device) what their printing capabilities and requirements are over the network, and the device then sends the job to the printer using a common language to printer and device.  Debian Wiki.

Which should make using multiple devices on multiple printers very easy.

There are two "common languages" which devices can use to talk to enabled printers: IPP and AirPrint.

"Modern IPP printers are printers capable of driverless printing", says the Debian Wiki.

The instructions are as follows:

Open the web interface and choose Administration. Select Add Printer. 

Your printer will be under the Discovered network Printers, probably with more than one entry. Choose the entry that contains the word driverless and move on to Continue. 

Debian Wiki

Unfortunately,I couldn't find an entry containing the word driverless.


Although my printer can talk to my computer (it has IPP), it doesn't seem to have the version of that language that allows a device to send a job to a printer without a driver (IPP Everywhere™).

It doesn't appear in the database of IPP Everywhere™ printers.

Printers sold in the last 10 years or so are almost always AirPrint devices and therefore would support driverless printing when the device is connected by ethernet or wireless, says the Debian Wiki.

I suspected mine wasn't, because a guest had tried to use their iPhone to print a document from my HL-1212W, and it wasn't possible.

It doesn't appear on this list of Apple AirPrint enabled printers.

I guess that my printer despite being "modern" (it was released in 2014, apparently) is a budget item based on previous items in the range which seem to date back quite a while. A Windows XP driver is available. Did Brother supply a driver for XP in the year of its end of life? Or is the printer a refresh of an old model that dates back to the beginning of the century?

Fortunately, for now, the drivers supplied by Brother work (very well) with CUPS for perfect printing, and hopefully it will be a while before CUPS stops supporting proprietary drivers.




Sunday, January 17, 2021

XFCE 4.16 in Debian Testing - making it look good

I have installed Debian Testing with XFCE on my laptop. One of the big changes in this version of XFCE is the switch to Gtk3, which means Debian Testing has ditched the ancient Gtk themes that used to come with XFCE. The ones that used to mimic Unix or Windows 3 or, the ones that were more up to date, Windows XP.

XFCE 4.16 on Debian Testing comes with the Adwaita and High Contrast themes - and that's it. For icons you get a choice between Adwaita and Tango, an icon set that doesn't have icons for special folders in the Home directory.

XFCE does not really concentrate on making its desktop look good - it leaves that to Linux distributions, many of which do a very good job of that. Debian does not make any effort to make desktops look good and you get what Gnome or KDE or XFCE or any other desktop ships, and it's up to you what you do with it.

Fortunately, it is very easy to customise XFCE, and there are some very good Gtk3 themes available. There are also some that have been left behind by the pace of Gtk3 development and perhaps don't work as well or look as good as they did.

Of course Adwaita is a very good theme, and XFCE with that theme actually looks pretty good as it comes, but I thought I would share one good Gtk3 theme that I have found. 

It's a contemporary flat theme that comes in light and dark versions with a Windows Manager theme and Firefox theme so the whole desktop integrates nicely.

Desktop with one of the proposed artwork desktops for Bullseye from the Debian Wiki.

Thunar file manager.

Themed Firefox.

Theme: Quogir by vinceliuice



Things that are broken in Debian Testing

I have installed Debian Testing on my laptop, and it's working very well. But there is one thing that is broken. That is Bluetooth, and it doesn't seem to be Debian's fault that it's broken.

I installed Blueman but it immediately crashed. I noticed the red error message in dmesg:

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

The problem seems to be with the chip vendor Qualcomm's habit of re-using identifiers from older chips for new ones, causing the kernel to load the wrong firmware, according to this bug report from 2018, this one from 2106,  and this post on GitHubGist. A similar bug was reported recently.

So, if you have installed firmware for an Atheros Rome bluetooth chip in Debian Testing, you may find that it does not work at the moment.

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!




Wednesday, January 6, 2021

Fake Royal Mail Text Message Scam

It's been a while since I wrote about a security issue on this blog, but here is one I came across yesterday: a text message scam.

My daughter came to me to ask about a text message she had received, purportedly from the Royal Mail. The message read:

[Royal Mail] We attempted to deliver your package at ...on... but no one was available.

Your parcel was returned to our depot and you need to reschedule your delivery.

Please reschedule your delivery at royalmail.com/reschedule-delivery/GB678285065GB

Now there are many good reasons to believe this is a scam.

Primarily, but with hindsight, the Royal Mail doesn't send text messages like this.

The reason I was suspicious at the time was because my daughter is too young to order online, and I had been standing at our front door that day when the postman arrived, and he didn't try to deliver anything, only a letter.

But I was still unsure because this text message doesn't show the normal tell-tale sins of a scam: the spelling is good and the link seems to be genuine.

Against my better judgement perhaps, I decided to check it out. This was not really a good idea, as links in scam messages (which I confirmed this was in due course) can lead to malware.

Clicking on the link opened a quite convincing looking page, asking for phone number and DOB.

The next page asked for a number of personal details. Although the page looks like a genuine Royal Mail page, there are sure signs that it isn't: the links on the page (for example: "Click here for more information on Coronavirus") do not work, and the address is not now royalmail.com but royalmail.schedule-redelivery.com. By this time I was very suspicious, so I entered some made-up, nonsense details. Despite the details being complete nonsense, the next screen was a screen asking for a card payment: a scam similar to others documented at (the real)  royalmail.com

An additional feature of this scam that makes it seem more convincing is that the the scam site uses a verified secure connection.

Abuse reported to CloudFlare.

Back to the main reason this scam text looks so convincing: the apparently real royalmail.com link in the SMS message. Unlike other scam texts documented on the Royal Mail website, the link is not a shortened (and obviously suspicious) link as used in previous scams.

So how have they done it? I suspect the link in the text message was to royaImail.com (that's a capital i), which in an Android message app looks exactly like an l.

I reported this scam to Royal Mail and here is their response:

This is a dedicated Royal Mail facility dealing solely with matters concerning Royal Mail or affecting Royal Mail. The information provided does not appear to be linked to Royal Mail in anyway. 

Not interested because it's a text message not an email, which is rather disappointing. I would have thought they would be interested in taking down a fake Royal Mail site stealing from their customers, but apparently not.




Friday, January 1, 2021

Firefox starts minimised and doesn't respond

If you have the same problem as me, try this:

1 - If you have used different instances of Firefox from the same account, in my case Firefox ESR and Firefox latest release, enter the following in the Firefox title bar and delete unused profiles. (DO NOT delete profiles that are in use, you will lose history, logins, cookies etc for that instance of Firefox). 

about:profiles.

The image below shows the page after deleting the unused profile.

 
 
2 - Close Firefox and delete xulstore.json, which you will find in a location similar to this (in Linux) 

/.mozilla/firefox/[random characters].default-[version]

The file stores Firefox's information about window positioning. Mozilla Support. It can become corrupted - Firefox will recreate it when it is started again.

As I say: this worked for me. I suspect the issue was caused because I ran a release version of Firefox from my /home directory (without possibly setting up profiles correctly, it has to be said) and this somehow corrupted Firefox's window positioning on opening.

The steps above corrected the issue on two separate Linux computers, so if you have the same issue, give it a go. Please don't delete profiles that are in use.

Deleting the xulstore.json file in a profile folder may actually be enough to fix the problem - I didn't test this, which might be a good first step to try. However, I wasn't using Firefox from my home directory any more, so deleting the profile wasn't an issue.




 


Defrag Linux and Speed Up Your Computer*

*Terms and conditions apply.

When I used to use Windows (XP), I used to spend a lot of time looking at little coloured blocks moving around the screen as I ran a defragmentation utility every week or so.

I recently came across an online article which mentioned tools to defragment the Linux Ext4 file system, used in many Linux distributions up to now (Fedora is moving to the Btrfs system, apparently). The article I read actually compared Btrfs to Ext4, and mentioned that Ext4 is "effective at preventing fragmentation over extended periods of time". Fedora Magazine.

I found a useful article on how to use the defragmentation tool in Linux, and gave it a go. I used the command to get a fragmentation report:

# e4defrag -c /

Result: I don't need to defragment, no moving coloured blocks, Linux is boring.

Quite possibly, so is Windows now. Does it still get fragmented? I don't know.

When can Ext4 become fragmented? When the HD is very full, seems to be the answer, according to How-To Geek, which also has a good simple explanation of why Ext4 doesn't usually get fragmented.

Checking in my notebook, I noticed that I'd made a note of this command previously, and forgotten about it, so I thought I would do a post on the subject.

I couldn't resist a click-bait title: obviously you are not going to speed up your computer doing this, unless, possibly, your HD is very full, in which case a better solution might be to declutter some data to an external drive.

File under: not really relevant.