• Linux
  • February 2018
    M T W T F S S
    « Jan    
     1234
    567891011
    12131415161718
    19202122232425
    262728  
  • Meta

  • Follow me on Twitter

  • Advertisements

Another Conky update

While using the All-in-One System Rescue Toolkit to wipe a hard drive on an old laptop, I noticed its display of system information on the desktop which included the OS version. I wondered if I could do that in Conky. Well, it can be done.

I found what I needed in the Kubuntu Forums .  The pre_exec command did not work on my Mint 18.1 system but I found that by replacing it with execi 60 did the trick. It refreshes the release information every 60 seconds but I can live with that.

This worked in Mint 17.x:
${pre_exec lsb_release -d | cut -f 2| tr “[:upper:]” “[:lower:]”}

I had change the pre_exec command to execi xx in Mint 18:
${execi 60 lsb_release -d | cut -f 2| tr “[:upper:]” “[:lower:]”}

I added the lines in the SYSTEM section of my script just below the line that displays the kernel information. I commented out the line with the pre_exec command since I’m using Mint 18.x (Ubuntu 16.04). I didn’t test the execi 60 line in 17.x but it should work but both are available.

My downloadable script is available through my Conky Configuration page.

Advertisements

Penultimate Day – 2017

This past year was full of changes.

In January I dropped AT&T U-verse as my Internet provider and went back to cable. Because my wife wanted to keep our landline number, I had to go with my new provider’s gateway device and router. I wasn’t able to configure the house telephone wiring to accommodate the change so were using cordless phones which is working out alright. I had already gotten an Obihai device and set up a Google Voice number. I still have it connected but it doesn’t get much use.

In April, I reevaluated my need for a hosting provider. I’d been having some issues with my POP3 email accounts, particularly when using them with Thunderbird. I’d also had a few DNS issues when they retired some of their DNS servers which causes me some problems connecting with my blogs and web pages. Other than a few WordPress blogs on the site, the only really active Web pages were my genealogy pages.

I had been tossing the idea of dropping the host for a couple of months but when the bill for another year’s service showed up in my bank account at a time when I could not afford it, I decided to end it. I backed up everything down to my PC, updated email addresses, moved the blogs to my WordPress.com account, and ended my relationship with them. and let the domain names expire.

The other big change was upgrading my main PC. My HP 6005 had always been a little temperamental with Linux Mint but by November it began getting a lot more temperamental. I found a good deal at Micro-Center in Cincinnati on a refurbished Lenovo M91p. It was advertised with an i7 processor, 8 GB of memory, a 500 GB hard drive, and Windows 10.

After I got it home, I found that it had a 2 TB drive so I decided to keep the Windows 10 and dual boot it with Mint 18.1. (I still haven’t booted to the Windows partition and activated it. Since I’d previously set up an M91p for my wife with 24 GB of memory, I swapped some memory around to bring hers down to 16 GB and mine up to 16 GB. Once I was finished with the HP, I added its 16 GB to the M91. It’s been working well. I’m quite happy with it.

Throughout the year I’ve continued to improve my BASH scripting skills, developing a few new scripts and making some older scripts more robust. Most of my scripts are for routine tasks. I continued to tweak my conky script.

Recently I found HomeBank to manage and keep track of my financial accounts. It’s capable of downloading QIF files from financial institutions but I haven’t tried it yet. Quicken (on my Windows PC) has been prompting me to upgrade for a while now but once it’s no longer capable of downloading my transactions, I may not up upgrade and just use HomeBank exclusively, keeping my current version of Quicken to access past transactions. When that occurs, I’ll probably move my spreadsheets from the Windows PC to my Linux PC.

Tech goals for 2018? I plan to continue to reduce my dependence on Windows although, realistically, I’ll probably still need it for some tasks. I’ll probably look into running it on a VM but there are some things about VM I still need to figure out. I’ll continue to improve my scripting skills.

Time for an Upgrade

Linux Mint has always been a little temperamental on my HP 6005. It may been that some minor compatibility issues between the OS and the AMD architecture, I don’t know. But over the last few days, it had gotten flakier, locking up more often, and I’d see one or two of my CPU cores hitting 100 percent quite regularly. It was getting very frustrating to say the least and I’d already been flirting with the idea of upgrading my system.

Len-M91pI found a good deal at Micro Center for a refurbished Lenovo M91p with a 3.4GHz i7 processor, 8GB of RAM, and a 500GB hard drive with Windows 10 pre-installed. I reserved one the other day and today I drove down and picked it up.

I’d begun a back up of the HP this morning and it was still going when I returned so started getting the new PC set up. My wife’s PC is the same model and I’d already installed 24GB of RAM in it so I took her 8GB modules and put in the 4GB modules from the new computer taking her down to 16GB and raising mine to 16GB.

My original intention had been to wipe the drive clean and install Mint 18.1 Serena but while getting the system data I knew I’d need later, I discovered that I had a 2TB drive in it. With that knowledge, I figured that I had enough room for a dual boot system. I gave 1.5 terabytes to Linux and left the rest for Windows.

I installed Mint as well as some my must have applications and utilities. There are still a few that still need to be installed and the usual tweaking. I don’t know how much use I’ll get out of the Windows 10 partition since I’ve never really liked it much. But maybe I can learn to live with it and eventually eliminate having a separate Windows PC.

After my backup was completed, I decided to go ahead and take the 8GB modules out of the HP and put them into the Lenovo, bringing it to 32GB . Lenovo’s documentation says it will only support 16GB but I’d been running 24GB in my wife’s system for over a year without any problems.

A more powerful laptop would be nice but my Dell Latitude (with its Core 2 Duo, 4GB of RAM, and 160GB drive) still works well for what I do with it — a little web surfing, email, and some writing.

 

Scripting again

Often when I download images from my digital camera or my mobile phone, or other files from the Internet, I’ll often find that the file extensions will be in all caps and my preference is to have them lower case.

I came across the rename command a while back and found it quite useful but found the syntax a bit difficult to remember. I’d been thinking about creating a bash script to make using the command a little easier and realized that it would be good if I could apply it to several file extensions I’m likely to encounter. This morning a wrote a simple script taking the file extension I wished to rename as an argument and using case statements to select the appropriate rename syntax. I also included a function to be called if no argument or an incorrect argument was entered.

After successfully testing it on a series of test files, I ran it in some folders in my ~/Pictures directory that had files with the .JPG extension and all the extensions were changed to .jpg. The script works well and at a later time I’ll probably add checks to handle duplicate file names, should they occur. As it is the rename command won’t change the file name if a duplicate will result.

A little scripting

About a month ago I created a little bash script to copy an image file from a temporary folder to my journal folders on my PC and Dropbox. The original script worked well enough but it lacked error checking plus I knew I’d have to eventually make changes to use it with next years folders.

The original script took two arguments from the command line, the file to be copied and moved, and the month which designated the appropriate folder. I added a third argument, the four-digit year used in the parent folder. Since the year would be incorporated with in the folder names and the month at the end, I changed the method used to build the folder names using the += operator.

In creating the tests to check the validity of the file to be manipulated and the existence of the created folders, I found it useful to create a function that would print the proper syntax should any of the tests fail.

I also developed a test that after the copy and the move operations checks for the existence of the file in each of the destination folders and displays the operation’s success or failure.

This was a good scripting exercise for me and the first time I’ve used a function in a utility script. I’d like to improve my scripting skills but the tutorials I have have given an elementary understanding but provide little in the way of practical examples and the usage of functions. I’ll be looking for other tutorials to advance my knowledge.

 

MultiSystem for Linux

The other day, I found about MultiSystem, a utility that is used to create multi-boot USB drives in Linux using as many bootable distributions as will fit on the drive. I’d seen other multi-boot utilities run from Windows but I was looking for one to use in Linux. This seems to fit the bill.

A Bash script can be be downloaded from http://liveusb.info/multisystem/install-depot-multisystem.sh.tar.bz2. Once you extract it, run it with:

sudo ./install-depot-multisystem.sh

I installed it using their PPA repository.

sudo apt-add-repository ‘deb http://liveusb.info/multisystem/depot all main’
wget -q -O – http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add –
sudo apt-get update
sudo apt-get install multisystem

Once it’s installed it will automatically open. Just click the Close button to exit.

To use it, plug in a USB drive and launch MultiSystem. (It should be in the Menu under Accessories).

  • Select the USB drive and click Confirm.
  • If the drive doesn’t have a label you’ll get an error message. Click OK and the utility will give it one.
  • Unplug and reinsert the drive (if you got the error message) and launch the utility again. Select the drive and confirm.
  • Confirm the GRUB2 installation on the USB drive and click OK to continue.
  • Drag and drop the ISO files (one at a time) to the box at the bottom of the MultiSystem window. You can also click the CD icon and search for them.
  • The ISO files are select individually. It may take awhile for the utility to extract them and update GRUB.
  • You can add as many distributions as space on the drive will allow. You can go back later and add more.
  • As each distribution is added you’ll see them listed in the main window.
  • Once it’s done updating the last distribution, it’s ready to use.

There are extra options in the menus. You can also test the new drive using QEMU or VirtualBox.

The official documentation is in French but I found it simple to use. The first time I tried booting to it, I got a GRUB error but after booting again, it came up okay. I booted to it several times to each of the distributions I’d installed on the drive.

More information can be found at:

Bodhi Linux Revisited

I first came across Bodhi Linux five years ago. It looked interesting but after using it for  a while, decided it wasn’t for me. I recently downloaded the latest release, 4.1.0 and decided to take another look at it.

I like that a minimalist distribution, easy on resources, and it fits on a 700MB CD. One of the concepts behind Bodhi is to keep it lean and allow the end user to choose their applications rather than have a lot of pre-installed applications they don’t need. I totally get that and can see how some might be attracted to that level of customization. For the most part, I’m okay with what comes pre-installed with Ubuntu and Mint although I do sometimes install applications that I prefer to the defaults. Perhaps I need to delve into Bodhi a bit deeper and take a good look at what they have to offer.

I found the Bodhi menus a bit confusing but that’s because I’ve been using Mint for quite a while and I’ve gotten used to that. It’s a matter of letting go of expectations and accepting change. Bodhi is not a distribution you just install and run with it. You need to figure out what you want to do with and plan accordingly. I’ll probably be looking at Bodhi again.

%d bloggers like this: