Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - Keith

Pages: 1 2 [3] 4 5 ... 9
Programming / A "grep" problem
« on: May 25, 2018, 03:40:17 pm »

[email protected]:~$ q=$(ls | grep dEsktop)     (i.e. a non-existent file)
[email protected]:~$ echo $q

[email protected]:~$

I want to test the value of "q" for its null value here.  It's not " " or "", so what might it be? 
Can anyone help?

Linux Support / LibreOffice: reverting to V5 from V6 [SOLVED]
« on: May 15, 2018, 10:39:54 pm »
Lenovo Thinkpad T500 and Ubuntu 16.04

After thoroughly screwing up LibreOffice (don’t ask!) I decided to remove it and re-install.  The new version that installed turned out to be Version and is a real pain.  It takes ~30secs to load the application then ~20secs to load any file into Writer or Calc – indeed all actions like saving a file take an age to complete.  Worse still, the general functionality is much reduced, especially in Calc. 
At one point I noticed that the path shown at the top of the “file/open” window included a directory “59” which I knew wasn’t one of mine and further investigation revealed that this Version 6 is based on Snap. 

The snap/libreoffice directory contains the following sub-directories:  59, 63, common and current.  Directories 59, 63 and current all have identical contents (links to Desktop, Documents, etc.).   A web search informs me that snap offers developers great convenience, especially when it comes to updating code (I think), but it offers the user great inconvenience and I yearn for those halcyon days with Version 5. 

I’ve found I can download Version 5.4.6 from  and I would like to remove every trace of Version 6 from my PC to ensure that no files are “borrowed” for use in Version 5.  In view of my propensity for screwing up I would be very grateful for advice on how to achieve all this. 

Many thanks.

Programming / rsync a list of files
« on: May 08, 2018, 08:57:18 pm »
I've been using rsync in a script one directory at a time, which is fine, but it would be more compact if I can get rsync to read the necessary directories/files from a file and the man pages offer the --files-from=FILE option.  Unfortunately I can't get this to work and the response is:
rsync error: syntax or usage error (code 1) at options.c(2308) [client=3.1.1]

My statement might be something like:  rsync -a  --files-from=dir-list.txt  /media/keith/BACKUP_USB

I would be very grateful for advice.

Thank you

Linux Support / LibreOffice not starting [possibly SOLVED]
« on: April 29, 2018, 06:58:14 pm »
Lenovo Thinkpad T500 laptop with Ubuntu 16.04 64 bit.

I've been playing about with scripts and crontab to start LibreOffice in order to display a message then close it after a while.  This worked fine all day but now LibreOffice won't work at all, even from the applications menu.  I have tried updating and re-installing LO and the menu items are displayed, but none of the LO facilities will start.  The appropriate tab in the task bar appears for a few seconds then disappears.

Assistance would be very much appreciated.

I have:
  • removed LibreOffice via the terminal (but is still listed in the Software Centre as installed and shown in the Applications menu)
  • un-installed all the LO packages from the Software centre
  • re-installed LO via the terminal (still marked as unistalled in the Software Centre)
  • re-installed the Writer package in the Software Centre
But still none of the LO software will start. 

Partial success.  My machine has two software sources:
  • SystemTools/Administration/Ubuntu Software Centre
  • System Tools/Software
I've been using the first one but after finding the second one I was able to install LibreOffice 6 and remove the original links from the Applications menu. 
So I now have a working Office suite although this doesn't explain how I screwed up the original installation by just playing with cron.

So: fixed for now, though I doubt that this post has helped anyone else and I am still keen to hear of any opinions/ideas. 

Programming / Automating backups for old people
« on: April 29, 2018, 11:54:29 am »
I look after the computing needs of five elderly people scattered around the country – we are all on Linux (Ubuntu & Peppermint), of course.  A major problem I have is persuading them to backup and update regularly, if at all, despite my providing a script to back up everything automatically – providing they bother to run it!  (So not very automatic!)

My thoughts turned naturally to crontab which is wonderfully easy to use and will execute a file of commands but does present a difficulty. 

My script checks for obvious errors like the wrong or absent backup-USB-stick and then offers the user optional actions, but crontab scripts execute in the background (of course) so the user cannot interact.  For desktop users, having a dedicated, separate HDD would do the trick (except when the PC is stolen) but laptop users have to use a removable USB stick. 

An ideal solution would be to get crontab to open a terminal to display error messages and get responses, but although I can get crontab to open a terminal I haven’t found a way of directing output to it or receiving input. 

I understand that crontab is designed for stand-alone, background operation and might not be an appropriate solution anyway, but I do need some kind of solution to deal with my recalcitrant friends.  Any ideas, anyone?

Hardware Compatibility / BlueTooth receiver woes [SOLVED]
« on: April 11, 2018, 11:02:20 am »
Having become addicted to playing audio from my laptop to my HiFi via a Bluetooth receiver, I am devastated that the system is no longer working following a few weeks of intermittent un-pairing.  The device that I've been using is the Esinkin Bluetooth receiver which cost ~£25 and has been working flawlessly until recently. 

Perusing the interweb for a more reliable device I am astonished to find examples costing up to £150.  I guess you "get what you pay for" in this world, but at these prices I would seek advice from experienced users of such technology before buttering up my bank manager. 

So;  I would be very grateful if any of my esteemed readers can recommend a reliable Bluetooth receiver of good sound-quality, without paying over the odds.

Thank you

Linux Support / Buetooth Manager won't display [SOLVED itself]
« on: April 04, 2018, 05:19:52 pm »
My problems began when I installed (so I thought!) text-to-speech s/w from that offers several s/w options. 
I chose:  sudo apt-get install gnustep-gui-runtime
This worked a treat, allowing me to write scripts that spoke script from a file - just for fun.  But it worked only via the PC's speakers not via my Bluetooth-connected device and Pulse Audio failed to show the bluetooth receiver (Erskin BT Adapter) on my hi-fi. 
When trying to start the Blueman Bluetooth Manager, the BT tab at the bottom of the screen appears (showing "Starting Blue...") but disappeared after a few seconds.   So I uninstalled/re-installed Blueman bluetooth manager but this had no effect.
 So I did...
  • sudo apt-get remove gnustep-gui-runtime
  • sudo apt-get install pulseaudio-module-bluetooth
  • sudo /etc/init.d/bluetooth restart
The Bluetooth device then connected and is now shown on PulseAudio but BT Manager still won't start, which I shall need to connect devices in future. 
I would be grateful for advice on:
  • how to get BT manager to display
  • suitable text-2-speech s/w that won't crash anything
Many thanks.

Linux Support / Unexpected link in /media
« on: March 30, 2018, 06:37:38 pm »
I've been messing about with the system.  So no change there, then.  But reading a book on the Linux Command Line is bound to have that effect. 
In particular I played about with creating soft links and now I find the following:

[email protected]:~$ ls -l /media
total 8
drwxr-x---+ 2 root root 4096 Mar 30 18:17 keith
drwxr-xr-x  2 root root 4096 Mar  3 14:52 usb
[email protected]:~$ ls -l /media/keith
total 0
lrwxrwxrwx 1 root root 12 Mar  1 14:33 keith -> /media/keith
[email protected]:~$ ls -l /media/usb
total 0
[email protected]:~$

I wasn't expecting to find that (blue) link and am reluctant to delete it without confirmation from the experts.
Similarly, I wasn't expecting to see usb listed, although it does change to a USB's name when one is inserted. 

Advice would be welcome on what I am seeing.
Thank you

Having found a very old laptop (Dell 505, 32 bit, 2GB RAM) with Peppermint 3 on it, I thought I would upgrade it and donate it to a friend who has need of one.

I downloaded the Peppermint 8, 32 bit ISO and checked the md5sum - OK. 
Then I used UNETBOOTIN to create a live USB. 
I have tried it on both my Lenovo T500 (64 bit) and the Dell 505 with the boot orders set to boot from the USB first, but it always boots into the installed OS on both machines. 
The Lenovo boots successfully into an 64 bit Ubuntu live USB and the Dell tries but naturally tells me politely that it's the wrong architecture. 

I would be grateful for any advice.
Thank you.

Programming / IF statement problem
« on: March 02, 2018, 09:02:06 pm »
Well, I know this must be a trivial problem but it's got me stumped!

As part of a mini project I want to detect whether or not a USB stick is inserted.  Part of the script is as follows:
With USB stick inserted:

[email protected]:~/.bin$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              966912        0    966912   0% /dev
tmpfs             197460     6484    190976   4% /run
……. lots of lines……..
mpfs             197460       68    197392   1% /run/user/1000
/dev/sdb1       30286416  4064832  26221584  14% /media/keith/AUDIO

[email protected]:~/.bin$ if [ -d /media ]; then echo media present; fi
media present
[email protected]:~/.bin$

then remove USB stick:

[email protected]:~/.bin$ umount /dev/sdb1
[email protected]:~/.bin$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              966912        0    966912   0% /dev
tmpfs             197460     6484    190976   4% /run
……. lots of lines……..
mpfs             197460       68    197392   1% /run/user/1000
……… /media shown…………...

[email protected]:~/.bin$ if [ -d /media ]; then echo media present; fi
media present
[email protected]:~/.bin$ if [ ! -d /media ]; then echo media present; fi
[email protected]:~/.bin$

The IF statement appears to be working the wrong way round.  What am I doing incorrectly?  It's driving me mad!
Advice would be welcome.

Hardware Compatibility / DVD not playing in Ubuntu 16.04 [SOLVED!]
« on: February 24, 2018, 09:09:03 pm »
Once upon a time I could display DVDs on my laptop – perhaps that was on Ubuntu 12 – but no longer.  As my DVD collection grows so has my desire to actually view them so I beg assistance. 

The symptoms are that often the first screen is displayed inviting a choice of viewing but no videos are displayed.  Browsing the web revealed very many other disgruntled Ubuntu users and the proposed solution in each case was the same, as found here:
I have implemented all the suggestions given there and although the system attempts to play videos, the screen is grossly, and patchily, pixellated for a few seconds before freezing.  I used “regionset” to define region 2 although I had no reason to doubt it. 
I have no objection to buying an external USB DVD reader but it would be nice to fix the problem if possible.   I show below some system info and would be very grateful for advice.

Laptop:   Lenovo T500

lshw -c disk
       description: DVD reader
       product: RW/DVD MU10N
       vendor: HL-DT-ST
       capabilities: removable audio cd-r cd-rw dvd
       configuration: ansiversion=5 status=nodisc

[email protected]:~$ dpkg -l |grep dvd
ii  libdvd-pkg                 1.4.0-1-1      all              DVD-Video playing library - installer
ii  libdvdcss2:i386         1.2.13-0        i386          library designed for accessing DVDs
ii  libdvdnav4:amd64     5.0.3-1        amd64        DVD navigation library
ii  libdvdread4:amd64    5.0.3-1        amd64        library for reading DVDs
ii  lsdvd                           0.17-1         amd64        read the content info of a DVD    (which does indeed list the contents
[email protected]:~$   

Thank you.

Linux Support / Image(not so)Magick [SOLVED]
« on: February 08, 2018, 06:45:41 pm »
I used to use ImageMagick quite a lot for changing image file type but now it fails.  Example output is:

[email protected]:~/Desktop/SRP_paper$ convert figure_A.odt figure_A.pdf
mv: cannot stat '/tmp/magick-6157IzrgszU4QNdt.pdf': No such file or directory
convert: delegate failed `"soffice" --headless --convert-to pdf --outdir `dirname "%i"` "%i" 2> "%Z"; mv "%i.pdf" "%o"' @ error/delegate.c/InvokeDelegate/1310.
convert: unable to open image `/tmp/magick-6157HjVpYQjHjWsc': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open file `/tmp/magick-6157HjVpYQjHjWsc': No such file or directory @ error/constitute.c/ReadImage/540.
convert: no images defined `figure_A.pdf' @ error/convert.c/ConvertImageCommand/3210.
[email protected]:~/Desktop/SRP_paper$ ls /tmp
config-err-4iNf6I          mozilla_keith0
dropbox-antifreeze-oKTxn3  OSL_PIPE_1000_SingleOfficeIPC_f9becb49e6949950453a99477647d7c
gnome-software-CAQ5DZ      qt-trayicon-FW2296.png
gnome-software-DLEXDZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-colord.service-S3xhgA
gnome-software-VQH4DZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-rtkit-daemon.service-6OiJCh
gnome-software-YLWNDZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-systemd-timesyncd.service-C6BKcD
gnome-software-ZTW3DZ      thunderbird_keith
[email protected]:~/Desktop/SRP_paper$

Another weird thing is that there are two instances of ImageMagick in the Applications menu and in the Software Installer.  When I un-installed (via the software installer), the listings in the applications menu disappeared but there were still two in the s/w installer each with two buttons: Remove and Launch.  Re-installing one of them put two instances back into the applications menu - and it still doesn't work. 

Any ideas? 

I've just heard on Radio 4, no less, about a vulnerability on Intel chips.  This article explains it in detail, although Intel is playing down the likely impact. 

Apparently, the major players (ARM, Microsoft, Linux, et al) have known about this for a while and are about to go public with patches.  The upshot seems to be that the patches will result in a noticeable reduction in speed.  Just as well I have an SSD, then. 

I don't understand the technicalities so I hope some of our expert Forum members will be able to keep us up-to-date, as the situation unfolds, on what it all means for us.  If anything. 

[EDIT] Ought to have been under "News & Events" - sorry.

Hardware Compatibility / Dead Ubuntu desktop - [RESOLVED]
« on: November 21, 2017, 03:21:26 pm »
Earlier this year I had a desktop built up by a local computer emporium for a friend.  In particular I specified an SSD primary drive and HDD secondary (to be used for backups), and I installed Ubuntu 16.04.  It worked very well and my friend was very pleased with the speed. 

Recently she complained that the PC was ailing and then became dead, as in no lights or fan – nothing – so I have just picked up the PC from Oxford and brought it back to Yorkshire.  I guessed a dead power supply so opened up the PC and discovered a batch of wires had come adrift; specifically those that run from the front panel to one end of the motherboard.  They were:
Start button, LED, HDLED, USB – which explained why the start button didn’t operate.  My guess is that my lady friend got someone to “have a look at it”, but I’m too  much of a gentleman to enquire! 
I connected them all up (thankfully they were labelled!) and pressed Go:  Lights on, fans whirring, POST then error:

error no such device: ec20bf64-f0e4-41ac-b17c-c52eed11994e
entering rescue mode …
grub rescue>

...and I couldn’t think of any likely commands except “start”, “quit”, etc., which weren’t recognised, so I checked the EUFI setup from which I extracted this:

UEFI Set up utility
i3-2120 cpu

SATA2_0   Toshiba THNSNF 128GCSS   (SSD)
SATA2_2   -not installed
SATA2_3   ST500DM002 – 1BD142   (HDD I guess)

Boot options
#1   PM:   Toshiba….   (SSD)
#2   SM:   TSST….   (DVD)

Boot BBS Priorities
Boot option 1   PM: SSD
Boot option 2   SM: ST500 (HDD)

I can't see anything obviously wrong, and at least the reference to "grub" is encouraging as it's found the right drive, but the "no such device" is worrying.   The "boot options" and "Boot BBS priorities" don't match, either. 
I would be very grateful for advice on how to find the cause of the problem - and then solve it, of course.
Thank you.

Bugs / Code Select not working?
« on: September 20, 2017, 09:17:51 pm »
The useful Code Select feature isn't working, at least for me, although I've seen one other member mentioning it. 
It's not a problem - just thought I'd mention it.


Pages: 1 2 [3] 4 5 ... 9

SimplePortal 2.3.3 © 2008-2010, SimplePortal