Updating Bash On CentOS 6.5

Today I upgraded Bash on my Linux CentOS 6.5 machine to patch against the ‘ShellShock’ exploit CVE-2014-6271.

There’s a command to confirm the vulnerability (command below in bold, logged in as root). If the word ‘vulnerable’ is output, then the system is vulnerable. Mine returned:

[root@localhost ~]# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test

By issuing the ‘bash –version’ command I could see my system was running Bash 4.1.2(1):

[root@localhost ~]# bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Running the following ‘yum list bash’ command showed what Bash package I currently had installed, 4.1.2-15.el6_4:

[root@localhost ~]# yum list bash
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.bytemark.co.uk
 * extras: mirror.bytemark.co.uk
 * updates: mirror.sov.uk.goscomb.net
adobe-linux-i386 | 951 B 00:00 
adobe-linux-x86_64 | 951 B 00:00 
base | 3.7 kB 00:00 
extras | 3.3 kB 00:00 
updates | 3.4 kB 00:00 
updates/primary_db | 5.3 MB 00:02 
Installed Packages
bash.x86_64 4.1.2-15.el6_4 @anaconda-CentOS-201311272149.x86_64/6.5
Available Packages
bash.x86_64 4.1.2-15.el6_5.1 updates

and it also indicated that a newer package was available, el6_5.1.

The good CentOS developer folk released the updated package pretty quickly to patch this, so upgrading to it was very easy:

[root@localhost ~]# yum update bash

That completed successfully, and I didn’t need to reboot my system. Now when I run the vulnerability test, I get:

[root@localhost ~]# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

Notice I don’t get the ‘vulnerable’ string output anymore.

Running ‘yum list bash’ now shows I have the most recent el6_5.1 version installed:

[root@localhost ~]# yum list bash
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.bytemark.co.uk
 * extras: mirror.bytemark.co.uk
 * updates: mirror.sov.uk.goscomb.net
Installed Packages
bash.x86_64 4.1.2-15.el6_5.1 @updates

So that’s my system patched and up to date.

Curiously, when I do a ‘bash –version’, the version there hasn’t changed, it’s still  4.1.2(1), even after a system reboot:

[root@localhost ~]# bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

 

 

 

Posted in CentOS, Linux, Operating Systems | Leave a comment

Cockos Reaper Handy Tips, Tricks and Shortcuts

Just a quick post mainly for myself to keep track of all the handy tips, tricks and shortcuts I come across and find useful in the Cockos Reaper DAW.

Shift-F1 – brings up a page showing all the current shortcut key combinations. This includes any you’ve configured yourself..very handy.

Compress MIDI note velocity – select the notes you want to compress, ctrl-F2 to bring up the note properties dialogue, enter *.5 in the ‘velocity’ box for a .5 compression ratio (experiment with different values!)

In the MIDI editor:

Press the ‘insert’ key to quickly insert a note where the mouse cursor is, rather than clicking and dragging the mouse. Useful if you want to draw multiple notes at once..put your mouse where you want the first note, hold down ‘insert’, then move the mouse…it will draw notes under the mouse cursor.

 

Posted in Music, Reaper | Tagged | Leave a comment

Installing Java 7 (1.7) Runtime Environment On CentOS 6.5

So today I had a requirement to run Java web apps in Firefox. I discovered CentOS doesn’t include Java JRE out of the box – when I clicked on a URL to a Java app, I got a ‘you have chosen to open <filename>.jnlp file, what should Firefox do with this file?’ popup box.  So I had to install it.

I downloaded the latest x64 version to my /tmp folder from http://www.java.com/en/download/linux_manual.jsp?locale=en

The file was called jre-7u67-linux-x64.rpm. To install it from the command line I typed:

cd /tmp
rpm -Uvh jre-7u67-linux-x64.rpm

To confirm it was installed I typed:

java -version

which showed:

java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Now all I needed to do was create a link in the Firefox plugins folder to the Java plugin, so that Firefox could see it, by typing:

cd /usr/lib64/mozilla/plugins
ln -fs /usr/java/jre1.7.0_67/lib/amd64/libnpjp2.so libnpjp2.so

And now when I go to the ‘about:plugins’ link in Firefox, I see the Java plugin in the list.

I tested it by going to http://java.com/en/download/installed.jsp

When I tried my Java web application again, I still got the ‘you have downloaded a <filename>.jnlp file, what do you want Firefox to do’ popup. This was because I needed to associate the jnlp files with Java (or more specifically, the Java Web Start binary). To do that I just clicked the ‘browse’ button, and selected /usr/java/jre1.7.0_67/bin/javaws. Clicked the button to tell it to always use that program. My Java web apps now open automatically with Java.

 

 

Posted in CentOS, Linux, Operating Systems | Leave a comment

Installing Adobe Flash On CentOS 6.5

So today I decided to install CentOS 6.5 as a VM in VMWare Workstation on my home PC. CentOS is very similar to RedHat, and some RedHat Linux admin skills would be useful for me at work. I just did the bog standard install from the ISO (CentOS-6.5-x86_64-bin-DVD1.iso). The install was a breeze (just let the installer do it’s stuff..basic next next etc. was adequate for my purposes).

The first thing I tried was a bit of web browsing using the bundled Firefox browser. I noticed YouTube videos wouldn’t play in 720 or 1080 HD resolution, the max available was always 360. I was also getting a ‘additional plugins are required to display the media on this page’ warning at the top of the browser window. I suspected Youtube was using the HTML5 player rather than the Flash player. So I decided to try installing Flash.

A bit of Googling revealed the following commands were required to install 64bit Adobe Flash:

su -
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
yum check-update
yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

Typing ‘about:plugins’ into the Firefox URL showed that Flash was now installed, and hey presto, YouTube vids now run in full 1080 HD resolution. Success!

 

 

 

Posted in CentOS, Linux, Operating Systems | Leave a comment

Rapid clicking, thumping or popping in ear

I thought I’d post this here in case anyone else comes across it and may be able to offer any suggestions or advice.

A few months ago I started getting what were at first seemingly random bouts of rapid thumping, clicking or popping in my head around my ear (I’ll call them ‘clicks’).  The clicks happens about 4-5 times a second, and it can go on for hours. I first noticed it when on holiday, it started happening on the first day (after a flight – perhaps related?) and occurred every day of my holiday and for a few weeks afterwards. It’s horrible, and as a musician who depends on his ears, it’s quite scary. It’s so loud in my head that it blocks out other quiet sounds and it’s immensely distracting. It’s horrendous when I’m trying to sleep. Sometimes it’s a regular non stop rhythm of constant drumming, sometimes it comes in fits and starts and isn’t a constant rhythm.  It’s definitely physical rather than imaginary or psychological, I can feel something twitching in my ear.  It’s nothing like ‘normal’ tinnitus, which I sometimes get and have done for years, which I’d describe as a high pitch whining (like the sound of a very high-frequency sine wave).

I discovered it happens when I’ve been drinking alcohol or lots of caffeine. I’ve been to the doctor, and he didn’t know what it was but he suspected it was due to the copious amount of alcohol I was drinking on my all-inclusive holiday, teamed with a bit of stress, causing intermittent bouts of high blood pressure. (He did measure my blood pressure but that was OK, on the day, but on that particular day I hadn’t been drinking and hadn’t had any coffee).  I stopped drinking alcohol (well..almost) and caffeine, and now I can go weeks without having an attack.  If I have a cheeky JD and Coke, off it goes, within 20 minutes of finishing my drink, guaranteed.

I’ve done a bit of research. I don’t think it’s pulsatile tinnitus, which is the sound of your your pulse from blood flow in veins near the ear, as it’s too rapid and much faster than the rhythm of my heartbeat/pulse. I think it’s a form of tinnitus called ‘middle ear myoclonus’ or ‘tensor tympani myoclonus’. Here’s a link I found with some info – http://www.tinnitusjournal.com/detalhe_artigo.asp?id=146

I’ve been in bands and been producing music for years, often experiencing very loud volumes. Could that be related? It’s also worth mentioning that I also have a rather bad TMJ (tempero-mandibular joint, ie. jaw) disorder in my jaw on the same side of my head. I’ve had that for 20 years though, and this ear problem has only started recently, but I’m still wondering if that’s related. My TMJ causes my jaw to click constantly and sometimes get ‘stuck’. The ‘clicks’ from my TMJ don’t appear to be related to the clicks in my ear, they’re completely separate and one doesn’t have any bearing on the other, they occur separately, and one doesn’t trigger the other. I also grind my teeth at night and have a gum shield to guard against this. There are some webpages that suggest TMJ could be related.

Anyone have any advice how I might be able to cure this? (Apart from giving up alchohol and caffeine completely)?

Posted in Misc | Tagged | Leave a comment

Correcting For Soundcard Latency In Cockos Reaper

I came across two issues relating to audio card latency, both of which were easily resolvable with Reaper’s ‘use audio driver reported latency’ settings in Reaper’s preferences, under ‘audio’ then ‘recording’.

reaperprefs

Whilst I could hear no latency with incoming audio, when I recorded it to a track in perfect time to the Reaper metronome, the recorded audio would always record to the track slightly ‘late’ compared to the metronome. The waveform was offset to the right slightly. I fixed this by changing the ‘use audio driver reported latency’ ‘input manual offset’ setting. I experimented with a few values, and found 35.00ms made my recorded audio sit perfectly where it should be.

You may note I’ve also set ‘output manual offset’ to -25.00ms. This was to accommodate the latency I was getting from VST instruments when playing them with my MIDI keyboard. I found I was subconsciously playing my keyboard a fraction earlier than the metronome to accommodate the fact I was hearing the noise from the VST slightly later. As a result, my MIDI notes were recording into Reaper slightly earlier than the metronome and offset slightly to the right of where they should be. After experimenting with a few values, I found -25.00ms made my MIDI notes sit perfectly where they should be on the track.

 

Posted in Reaper, Virtual Instruments | Tagged , , , | Leave a comment

Notes At Start Of Looped MIDI Items Not Playing And Disappearing When Glueing In Cockos Reaper

I was coming across a reoccurring problem when copying/pasting MIDI items in Reaper. Sometimes when I copied/pasted or duplicated a MIDI item, the first notes in the copied MIDI item refused to play. I could still see them in the item in the arrange view, but they wouldn’t play, I couldn’t hear them. If I glued the previous MIDI item to my new item, the notes disappeared completely from view too.

This screen capture shows the problem. The track at the top consists of two MIDI items, the second one has been copied/pasted. The two notes at the start of the second item don’t play, I don’t hear them. When I glue the first and second items together, those two notes disappear, as if they were never there.

NotesCopiedItemNotPlayingDisappearIfGlued

By chance I zoomed in a bit further…

SmallFragmentOfMIDIItemCuttingOffNotes

Aha. That explains it. My notes are cutting off because I have somehow managed to get a tiny fragment of some other MIDI item overlapping the start of those notes and overriding them (sloppy careless trimming when cutting/pasting probably). That’s why they weren’t sounding, and that explains why they were disappearing when glueing. The empty fragment was glueing over the top and removing the notes.  Once I deleted that tiny fragment, I could hear them, and glueing no longer caused them to disappear. Resolved!

PS. Is it ‘gluing’ or ‘glueing’?  Both are valid according to the Oxford English Dictionary!

 

 

Posted in Reaper | Tagged , , , | Leave a comment

Cockos Reaper Installer Takes A Long Time To Start

On my Windows 7 Home Premium x64 PC, when I double-click a Reaper install file (eg. reaper461_x64-install.exe, but it’s happened on numerous previous versions too), it appears to do nothing, nothing happens.  After about 5 minutes, the ‘do you want to run this file?’ security warning pops up, and then I can continue through that and it installs as normal. Why does it take so long?

In Windows Task Manager, I can see MsMpEng.exe (Microsoft Security Essentials AntiMalware Service Executable) maxing out one of my CPU cores, so perhaps it’s something to do with that..perhaps it’s running a virus scan of the installer first.  I shall have to do more digging!

Posted in Music, Operating Systems, Reaper, WIndows | Tagged , | Leave a comment

Selecting Every 2nd Note In MIDI Editor In Cockos Reaper

The latest versions of Reaper (4.60+) now have a MIDI selection filter. I use it frequently when editing drum tracks, when I want to change the velocity of every 2nd hi-hat note, for example.

This is how you select every second instance of one particular note (in this example, note G#3, which is my hi-hat, playing 8th notes).

In the MIDI editor, press ‘F’ to bring up the ‘filter events’ window

Change ‘event type’ to ‘note’

Select ‘note’ and ‘use piano keys’, then click the note you want to change in the piano roll on the left (in my case, G#3).

Select ‘position in measure’ and change the ‘low’ and ‘high’ drop downs to 1/8 and ‘repeat’ to 1/4 (you’re telling it to select 8th notes every 4th note apart, ie., every 2nd 8th note)

Click ‘set selection’. Every 2nd 8th note should now be selected.

SelectEvery2ndNote

 

EDIT: I’ve recently tried this in the latest version of Reaper, 4.72…and it doesn’t seem to work anymore – the procedure above that worked pre-Reaper 4.72 doesn’t select ANY notes. I found I could only get this to work if I left the ‘position in measure’ – ‘high’ drop down box BLANK.   Maybe the behavior has changed in the newer Reaper behavior..maybe I’m doing something wrong…who knows.

Posted in Reaper | Tagged , | Leave a comment

Cockos Reaper Cutting & Pasting or Duplicating MIDI Items – Notes Going Out Of Time

One thing that infuriates me with Reaper is that it’s so easy for items to go out of time (misaglined with the grid) when copying and pasting or duplicating MIDI items. If the start of your original MIDI item is ever so slightly not aligned with a grid line, and then you copy it to a location where the start is aligned with a grid line, then your MIDI notes end up slightly offset from the grid.  If you’re duplicating the same MIDI item (ie. ctrl-d) over and over again, as you would with a drum loop for example, it can soon turn into a great big out-of-time mess.  Sometimes the problem is subtle and you hardly notice it, until you realise that something doesn’t quite sound ‘right’ and you start inspecting MIDI notes, and realise things are ever so slightly out of time.  And then you have to waste time inspecting every MIDI item to make sure it’s not happened anywhere else.

To try and avoid this happening, I created a custom action that I always run on my MIDI items before I copy/paste or duplicate them. The custom action consists of the following two actions:

‘Item: Trim items to selected area’. If the start/end of the item overlaps the desired size (the time selection), this trims it to make the start/end match.

‘SWS/AW: Trim selected items to fill selection’. If the start/end of the item is smaller than the desired size (the time selection), this expands it to make the start/end match.

I called my custom action ‘Item: set item size to time selection’ and mapped it to my ‘T’ key (for ‘trim’).

I’ve gotten into the habit of making sure that when I record a new MIDI item, when done I always set my time selection to the desired size of the MIDI item, select it, then press ‘T’, and it trims or expands the item to match exactly the time selection. If the time selection was made with the grid snap turned on, then I can be sure the MIDI item start/end points will sit on the grid lines exactly, and I’ll have no fear of misaligned MIDI items going out of time when copying/duplicating.

Posted in Reaper | Tagged , | Leave a comment