Ubuntu Error: Opening the Cache: Fix

So there I was. I had gained a strange icon on the task bar on my desktop on Ubuntu 20.04 LTS. It looked like a little red No Entry sign (sorry – I didn’t think to screenshot it). I had an error opening my cache apparently.

When I clicked the icon I got this.

Package manager error message about error on opening the cache on task bar
Package manager error message displayed when error icon clicked on taskbar

The package lists or status file could not be parsed or opened. So I thought I’d be a smart-arse and just do a manual package update, what more could be possibly wanted?

Doom!

Well no. Not Doom. Just irritating. I think the reason I had got into this state was that my machine had apparently locked up the day before. Like an impatient idiot I had forced it to turn off.

I now assume that this was probably while it was in mid flow doing an update. The result being that I managed to inadvertently wreck the status file or the package lists. So any new update failed before it had even started.

The actual error message from the package manager when I tried running it was this:

E: Read error - read (5: Input/output error)
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

So how to fix this?

There’s lots of stuff all over Google about getting an error on opening the cache. Some of it going back ten years or more. Some is unclear and some contradictory. Other bits out-of-date or just plain wrong. I found a couple of answers that I amalgamated and succeeded in salvaging my machine. So this is what I did and it appears to have worked a treat for me. BUT… Caveat Emptor and all that. (I got the guts of this fix from Here)

First the scary bit. You have to delete all the files under directory /var/lib/apt/lists. But DO NOT delete the lists directory itself. (I didn’t back mine up my broken copy first (because at times I’m an idiot) but if you can maybe you should. After you have (or you decide not to) open a terminal and issue this:

sudo rm /var/lib/apt/lists/* -vf

Here’s what I got back.

chalkie@chalkie-TP550LA:/var/lib/apt/lists$ cd
chalkie@chalkie-TP550LA:~$ sudo rm /var/lib/apt/lists/* -vf
[sudo] password for chalkie: 
rm: cannot remove '/var/lib/apt/lists/auxfiles': Is a directory
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_InRelease'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_binary-amd64_Packages'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_binary-i386_Packages'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_cnf_Commands-amd64'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_dep11_Components-amd64.yml.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_dep11_icons-48x48.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_dep11_icons-64x64%402.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_dep11_icons-64x64.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_main_i18n_Translation-en'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_multiverse_cnf_Commands-amd64'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_restricted_cnf_Commands-amd64'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_binary-amd64_Packages'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_binary-i386_Packages'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_cnf_Commands-amd64'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_dep11_Components-amd64.yml.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_dep11_icons-48x48.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_dep11_icons-64x64%402.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_dep11_icons-64x64.tar.gz'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal-backports_universe_i18n_Translation-en'
removed '/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_focal_InRelease'

Now you need to re-generate the files.

sudo apt clean
sudo apt update

Here’s what I got.

chalkie@chalkie-TP550LA:~$ sudo apt clean
chalkie@chalkie-TP550LA:~$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu focal InRelease [265 kB]       
Get:3 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [515 kB]
Get:6 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [3,065 B]
Get:7 http://gb.archive.ubuntu.com/ubuntu focal/main i386 Packages [718 kB]    
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,822 kB]
Get:9 https://packages.microsoft.com/ubuntu/20.04/prod focal/main all Packages [2,176 B]
Get:10 http://gb.archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB]  
Get:11 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [28.4 kB]
.
.
.
.
Get:112 http://gb.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64 Icons [22.6 kB]
Get:113 http://gb.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64@2 Icons [29 B]
Get:114 http://gb.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [864 B]
Get:115 http://gb.archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 53.2 MB in 26s (2,032 kB/s)                                            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
12 packages can be upgraded. Run 'apt list --upgradable' to see them.

Now finally you might as well do any upgrading to the file set (this does NOT upgrade you to a later version of Ubuntu – just to the latest version of the one your are on)

sudo apt dist-upgrade

Here’s what I got:

chalkie@chalkie-TP550LA:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libxmlb1
Use 'sudo apt autoremove' to remove it.
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
The following packages will be upgraded:
  aspnetcore-runtime-6.0 aspnetcore-targeting-pack-6.0 dotnet-apphost-pack-6.0
  dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-runtime-deps-6.0
  dotnet-sdk-6.0 dotnet-targeting-pack-6.0 libfprint-2-2 libfprint-2-tod1
  ubuntu-advantage-tools
12 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 124 MB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-advantage-tools amd64 27.11.3~20.04.1 [161 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 libfprint-2-2 amd64 1:1.90.2+tod1-0ubuntu1~20.04.9 [212 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 libfprint-2-tod1 amd64 1:1.90.2+tod1-0ubuntu1~20.04.9 [44.6 kB]
.
.
.
Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
chalkie@chalkie-TP550LA:~$ 

Notice the end bit “Configuring…” Personally I took the one minute with a pinch of salt, left it for ten minutes and had a cup of coffee. I just let it run.

And that’s it! The little no-entry sign has vanished and I can now do updates/changes again!

Click here for the rest of my posts on Linux/Ubuntu issues.

Permalink 404’s & Response is not a valid JSON response

I first came across this WordPress cum Apache2 Permalink 404 problem back in 2018 and described a fix here. Unfortunately I had forgotten all about it and even though the damn fix was sitting right there in front of me I had to re-endure all the grief and suffering again. However during this grief and suffering I came across another nasty little feature that seem associated with the new Block editor. (previously I was using the classic editor) Namely after changing the permalink I got “Updating failed. The response is not a valid JSON response.” whenever I tried changing a post.

I previously wrote up a fix for the 404 problem when you change permalink style here. While it is much the same as this it is here, it is four years old and pre-dates the Block editor. But it may be worth a look along with this in case it somehow explains thing differently and more usefully for you.

This problem (in total) probably only applies to situations where you are using your own Apache2 server. But it may apply in part if you’ve not got the .htaccess file properly configured on some hosted webspace. I would imaging that if you are using a hosting service then it would be highly unlikely you would need the bit below about a2enmod.

I must add that this problem (2nd time ) almost beat me to death. It appeared to be intractable. But that was only because I had failed to configure Apache properly. (or read my own f**king notes!). I didn’t think (until now) that the two issues in Permalink 404’s & Response is not a valid JSON response” were related. But I think they are. Either that or I fluked a fix to both.

Here’s What Happened

Basically I installed WordPress with no issues. I built a child theme, again with no issues. I could build pages and posts using both the Gutenberg and the Classic editor. BUT I could only use the “plain” default URL settings for both posts and pages. If I changed it under settings→permalinks to something a bit more useful I’d end up with a 404 not found.

In the Gutenberg editor I also noticed that I often (always?) got a red bar with the following error message in it..

“Updating failed. The response is not a valid JSON response.”

So if you are a getting this then maybe it is tied up with this permalink problem. Obviously before I started using the Block editor and before I fixed the permalink problem I didn’t get it. After I fixed the permalink problem in apache2 then the JSON invalid response issue I was getting in the Block Editor disappeared too.

So, What was I getting with the unconfigured Apache?

I changed the permalink setting away from the default. Then in the editor the new URL for the post/page looked correct. But it just did not work. It always returned 404 Not Found.

Here’s what I did to solve this (for me) They were not done in this order but I think that this is the best order to do them in. It may also be that not all these steps are needed.

Here’s the Fix

1. In etc/apache2/apache2.conf: change AllowAll=none to AllowAll=All. I did this for all four settings but I think that only the one related to /var/www is necessary. You change all 4 to get it working back out the ones you don’t need by trial and error. I’m pretty sure you only need /var/www

Doing this enables the .htaccess file (more in a minute). Without doing this .htaccess file is simply not read.

2. Turn on mod_rewrite

sudo a2enmod rewrite

(this was the missing bit that killed me for two days. This MUST be done if it’s your own server)

3. Ensure the .htaccess file exists and holds the following code (or similar. In my previous post I used a slightly different incantation but never mind – the standard wordpress version is fine)

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

I gather it is possible to completely dispense with the htaccess file and simply do everything in apache2.conf. But most people only host a site to develop it and then upload it to a host provider where use of a htaccess file is not optional. So you might as well do it in your prototype code too.

Make sure you htaccess file is writable by www-data as well as the owner.

Restart apache2 after the mods. with sudo service apache2 restart

(or whatever other incantation you like)

That’s it.

Hopefully the permlinks should now work and those hideous Permalink 404’s & Response is not a valid JSON response messages will be history too.

Lost Root Password to Mysql and Phpmyadmin

Yes. I committed the cardinal sin. I lost my root password to mysql and phpmyadmin. Consequently I could not log in as root in order to change the permissions for a user. Of course I hadn’t noticed I had lost the damn thing because normally I never-ever log in as root to anything.

It was only when I need to fiddle about with other users when I typed in what I thought it was – only to find my memory was crap. Of course, I had written it down somewhere safe. I always do. The problem was (crap memory again) I couldn’t find where.

I always obfuscate saved passwords – just in case some nasty person raids my desk and steals my documents. So it is probably staring me in the face. On the plus side I suppose it shows my obfuscation works pretty well. Hey Ho.

Check Your Mysql Version

Here’s what I did to reset the lost root password to mysql and phpmyadmin. This worked for me. I’m running mysql ver 8.0.30 Check this with:
mysql -V
Mine come back with this.
mysql Ver 8.0.30-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
This may not be compatible with all other versions but I expect it should be with this or later versions.


This method (after trying and failing with many others) is based largely around this post on devanswers.co. So major Hat Tip to them. There are a few extra steps here mainly surrounding clean up before actually changing the password. But if you are running mysql 5 you would probably be better off at devanswers as they deal with that earlier version as well as mysql 8. But you may still want to do the mysql killing and clean up as described here.


If, like me you got to this point after many failed attempts to fix this we need to check what sort of dismal state we are in.

We need to kill mysql. Make absolutely sure it really is dead. It’s worth checking that you haven’t got multiple versions running. This may (especially) happen if you’ve been faffing around with other failed attempts to crack in to mysql (like I had).

Cleanup: Kill all Mysqls

sudo ps -A | grep mysql – if this shows you one or more mysql or mysqld processes running then….
sudo pkill mysql
sudo pkill mysqld
sudo ps -A | grep mysql
– make sure this time nothing comes back.


Now we have to make sure the following directory (and associated user) exists. It may well not.

If you try and push ahead without having this directory properly set you will get something like this:
chalkie@chalkies-box:~$ mysql -u root mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
[1]+ Exit 1 sudo mysqld –skip-grant-tables

If you already have this error message START AGAIN. Go back and check ALL instances of mysql are dead THEN create the directory as below.


ls -l /var/run/mysqld
If it is not there and the owner is not mysqld:mysqld then…
sudo mkdir /var/run/mysqld
sudo chown mysql /var/run/mysqld

check it again with
ls -l /var/run/mysqld


Now restart mysql in safe mode like so..
sudo mysqld_safe –skip-grant-tables&
You’ll get something like this back..
[1] 100757
chalkie@chalkies-box:/var/run$ 2022-08-21T12:57:00.853461Z mysqld_safe Logging to ‘/var/log/mysql/error.log’.
2022-08-21T12:57:00.907704Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql


now we can login as root like so…
sudo mysql –user=root mysql

You now should be logged in as root the prompt should now be mysql>


Now you are logged in as Root

From here you can now do all sorts of damage. Or even change the lost password for root as so..

First remove the old password with this…(notice the trailing semi colons and ignore the mysql> prompt)
mysql>UPDATE mysql.user SET authentication_string=null WHERE User=’root’;

mysql>flush-privileges;

mysql>ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘a-new-pw-i-promise-never-to-forget’;
mysql>flush-privileges;

And that’s it. Log out and kill the safe mode mysql process

mysql>exit;
sudo killall -u mysql


Now restart it:
sudo /etc/init.d/mysql start
CHECK the new password for root works by logging into mysql and/or phpmyadmin with it!!!

I hope that helps. My other Ubuntu style fixes are listed HERE

Find Ubuntu Desktop Background image

I had an annoying issue in that I had forgotten where I had placed the image I was using for the background on my Ubuntu Gnome Desktop. For some God-forsaken reason I had set the image in a non standard place and simply couldn’t find it.

So here’s how to find the background image on Ubuntu, wherever that pesky image is.

Open a Terminal (ctrl+Alt+t)

Then at the prompt enter:

gsettings get org.gnome.desktop.background picture-uri

Usually the images are in either the main system repository of
/usr/share/backgrounds
or locally…
/home/username/.local/usr/share/backgrounds

But you can put them anywhere (not a good idea imho) But if you want to…

Open the image you want by double-clicking it. Then right click on the image and select “set as wallpaper”. This will set the image as wallpaper BUT will NOT copy it into a sensible location (see above). So, if you forget where it is you really need the gsettings command to find it as I found out the hard way.

The best way to change or find the background image on Ubuntu is by either right clicking on an unused part of the desktop and selecting “Change background” which takes you directly to the setting GUI,
or by using the system-tools GUI under under main Applications menu at: Applications->System Tools->Preferences->Background to access the same GUI.

Here you can change the image and/or add new ones. Crucially if you add a new one the image you add is copied to the /home/username/.local/usr/share/background directory and is safe from accidental deletion.

The rest of my Ubuntu How-to’s and Gotch’s are here

FreeCAD Snap Package Font Problems: Fix

I recently went over to using Ubuntu 20.04 from 18.04 and my new FreeCAD installation is now a snap package rather than an installation built using the traditional apt-get install route. I’ve done this for no particular reason other than that is the way thing seem to be going and frankly I just went with the flow. I wanted to get the thing working rather than fuss over how it was installed. But I ran into some Snap package font problems.

I’d used the FreeCAD snap package for a couple of small test projects and all seemed well. Then I decided I needed to make some Christmas lettering on my Trusty Creality Ender 3. To do this all I needed to do was use the ShapeString tool to get the letters from a font on my system. I’ve done this before on Ubuntu 18.04 with a traditionally installed FreeCAD package (See this post). But on Ubuntu 20.04 I hit a road block associated with the FreeCAD snap package.

One of the purposes of the snap packaging format is to limit access to system files. I assume it’s for security reasons and also so the package is not dependent upon a particular system file. This means (as well as enhanced security) that a snap package for Ubuntu should work without issue on any other flavour of Linux as well. That’s the theory anyway.

One problem with this is that Ubuntu/Linux font files are usually in either /usr/share/fonts or /usr/local/share/fonts.

So neither of these system directories are available to the FreeCAD snap package.

Consequently when you try and set up the path to the font of your choice in the ShapeSting tool you will find that the only directories that are available (the rest are greyed out) are those under your home directory. So, in essence you cannot set up the path to the font! While you can actually manually type in the path into the ShapeString tool, when you hit enter you get this:

Screen capture of FreeCAD ShapeScreen font problem setting error
Notice I’ve set the path to /usr/share/fonts. It doesn’t like it!
ShapreString Font problem dialog FreeCAD
Here’s what it actually says at the bottom of the above screen. Yours may be different.

So, how do you access fonts for the ShapeString tool? Well, this below works for me, but I’d be quite happy for anyone to show me a better way.

Basically you have to make the fonts you want to use available from within the bits of the file system that the snap package can see, i.e. anywhere under the user home directory. I’d suggest that it’s best not to copy them directly into the snap package location as you will probably be updating the package sometime and the fonts will be lost if you do that. Instead create (if you don’t have one already) a dot fonts directory (i.e. /home/<user-name>/.fonts) and then copy them in there.

Example:

cd ~
cp -r /usr/share/fonts/msttcorefonts/ ~/.fonts/

So far so good.

Now, go to the FreeCAD snap setup and go to directory:

/home/<user-name>/snap/freecad/current/

In here make soft link to the new fonts directory

ln -s ~/.fonts fonts

Restart FreeCAD

Then when you come to setting up the path to the font of your choice in the ShapeString tool you can now select from anything you have copied into /home/<user-name>/.fonts via the link you have in the freecad setup.

i.e example: either:

/home<user-name>/snap/freecad/current/fonts/mstcorefonts/Comic_Sans_MS_Bold.ttf (or whatever)

or by the other route that the dialog box reveals which is to the current active package version (in my case that is version 22)

/home/<user-name>/snap/freecad/22/fonts/msttcorefonts/Comic_Sans_MS_Bold.ttf

Both of these (actually the same thing!) can be selected using the dialog box associated with setting the font which is triggered by clicking on the three dots next to the font path text box.

After doing the setup you can actually set a default font for the ShapeString tool too. So if you only ever (or mostly) use one font you can set it to that. Otherwise the font path in the ShapeString tool will be blank and need setting up everytime you use it.

Do this by first selecting Draft mode first. If you don’t do this first you won’t be able to set the path for the ShapeString default font.

Now go edit->preferences. You should see a dialog box with “Draft” as the last entry on the left. Click it.

Then select the “Text and Dimensions” tab

Then in the displayed window at the bottom set the Shapestring path to your default font using the three dot navigation tool at the end of the line.

That’s it. Now when you start the ShapeString tool it will load the default font, but you can still replace with another if you want.

I have to say I’m not entirely happy with this as a solution, but it works for me. I hope (failing finding a better solution) it works for you too. If you know a better way to deal with these snap package font problems, I’d love to know what they are.

NOTE: Evidently there is/was a similar problem with the LibreOffice snap, so these Snap package font problems are not just confined to FreeCAD. A suggestion (relating to the LibreOffice problems) was that before copying the fonts to the ~/.fonts directory you run:

sudo fc-cache -fv

This refreshes the cached fonts.

I don’t think that is necessary. Although I doubt if it will do any harm.

Transfer files to Ubuntu with Bluetooth? Here’s How.

So, you want to transfer some files from your phone to your Ubuntu PC using Bluetooth? So did I. In fact I’ve done this setup twice. Both times the painful way.

Some years after I’d solved it with my Moto G5, I forgot it was in my shorts. I went swimming with it. Funnily enough it didn’t seem to work too well (or at all) after that. So I bought a new Moto G10. For my sins (which are many) AND because I’d not written it up, I had to go through the whole grief and suffering again. So from the top. Lets start at the default. Bluetooth is off. Go to Settings. Select Bluetooth. You’ll Get to this screen.

Ubuntu Settings Bluetooth Turned Off
NOTE the barely visible switch in the task bar between “Bluetooth” and the “-“

Fine the barely visible slider switch in the task bar of the setting window slide it to on (i.e. to the right)

You get this

Ubuntu Settings Bluetooth Discovery
A list of discoverable devices appears. Here’s my new G10

Click on the box with the device you want to connect to in it. This pops up:

Ubuntu Settings Bluetooth Connect

Slide the switch by “Connection” to the right. Then you get a code to compare and affirm that appears on both the PC and the phone. Like this:

Ubuntu Settings Blutooth Code match
You need to hit “Confirm”. As I remember a similar box also appears on the phone and you have to confirm that as well.

But.. I Still Can’t transfer Files to Ubuntu with Bluetooth! Arghhh!…

So Now you have ensured Bluetooth is on. You checked that your phone is registered with Ubuntu.

But still the damn thing won’t let you transfer files to your PC from your phone!

Moreover you get one of those really “useful” error messages on your phone like “transfer failed” . If you dig a little deeper on your phone you get a somewhat expanded error message like “ transfer forbidden by target device” Which at least tips you off that the issue is with your Ubuntu box rather than the android phone.

The problem is trivially simple to solve.

Basically Ubuntu will not allow inbound Bluetooth file transfer UNLESS the Bluetooth settings window is open. Like this one:

Ubuntu Settings Open Bluettoh Settings
If this window is not open on the PC then you won’t be able to transfer in files from your phone.

Yes I know. Somewhat bizarre. But there it is.

And that’s it! Now you can transfer files to Ubuntu with Bluetooth from a phone (or whatever). Note: You have to “push” them from the phone. (i.e.instigate the transfer from the phone after the connection is set-up)

Just to make matters worse, on the (Android) smartphone I have, the Bluetooth option to transfer files outbound from the smartphone is not immediately visible when you hit share – it’s on the next line of icons below (i.e. just off-screen) those that are visible at the bottom of the picture (or whatever) you are sharing. You need to flick up the icons to access the Bluetooth icon. Just be careful when you do this that you don’t accidentally close the window as the two gestures are virtually identical.

Then to round it all off the file transfer takes forever. Its far easier/quicker to stick a USB cable into your phone and take the images off that way.

Hope that helps.

I must say, (Bluetooth connectivity – which should be, by definition, simple) drives me to distraction. I don’t plan going swimming with this phone for a few years so I am hoping these notes make sense when I come to change my phone next time.

The rest of my Ubuntu fixs/gotcha’s/howto’s are HERE

Processor overload with YouTube Videos (Ubuntu 18.04)

After endless Googling on this problem I noticed that other people had had similar issues with processor overload with YouTube videos. It appears to be relatively rare. But not unknown. I <think> I’ve found a fix. Or more like – A work-round. So if this helps you then great! But this is strictly WYSIWYG.

Let me start off by saying that this is an unsatisfactory fix. I hate it. It appears to work, but I am unhappy with it as it “gets round” the problem rather than solving it. But beggars can’t be choosers…

Continue reading

Bluetooth File Transfer Problems From Phone to Ubuntu? A Quick Fix.

So, you want to transfer some files from your phone to your Ubuntu PC. But you are getting Bluetooth file Transfer Problems and nothing is getting downloaded to your PC. You have ensured Bluetooth is on. You checked that your phone is registered with Ubuntu. But still the damn thing won’t let you transfer files to your laptop from your phone.

Continue reading

Is RhythmBox Missing Music Files? Here’s a Simple Fix

Nothing drives you more mad than buying some new music and then having to struggle to get it to play. This hit me when Rhythmbox was missing new music files I had added to my Music folder on my Ubuntu 18.04 system. I checked the preferences in Rhythmbox and even though the “watch my library” box was ticked, I got no updates.

Continue reading

Linux: Mounting a USB Drive Manually

Here’s my notes on mounting a USB drive that for some reason fails to mount automatically on Ubuntu.

This would be the case if you plugged in the usb stick and it has not appeared in the “places” tag in the menu bar.

Open a terminal. If you are running in the Gnome GUI you can do this with crtl-alt-t but use whatever method you like.

Continue reading

Ubuntu: start or stop MySql and Apache2 on boot

These are my personal notes on enabling/disabling auto start of Mysql and Apache2 on boot (or other services for that matter). Also on how to start/stop these services after boot. The notes are as they are. I hope you find them useful.

All this is done through a terminal. Open one from the Gnome GUI with:

Ctrl-Alt-t

Continue reading

How to Convert video file format.

(** NOTE: avconv was discontinued after Ubuntu 16.04 so this may not be helpful if you are running a later version. New post soon)

Here are my notes on how to convert video files between mp4 and other file types on Ubuntu. Especially between mp4 and mpg but avi and wmv can be used too.

There are a number of GUI converters in Linux but I’ve always found the command line converters the best. In fact most of the GUI solutions are just front ends on these command line driven converters. GUI tool winff isn’t bad but using command line tools (either avconf and ffmpeg) give you more options.

Continue reading

Ubuntu: Wifi connection has gone missing?

Here’s my personal notes on restoring a Ubuntu (or other linux distro) wifi connection that has gone missing. Maybe they’ll be useful to you too.

Sometimes when Ubuntu comes out of suspend or even after booting from power-on the wifi connection disappears. Usually the little triangular wedge on the task bar is empty. Usually this is easy to fix.

Continue reading