‘beeb’-v4.0

Another release of ‘beeb’ which takes it to even greater heights! :) And just as an experiment I’m “self-hosting” the ‘tar.gz’ file so that it can be downloaded from here.

Documentation first -
This is the documentation for ‘beeb’ [version 4.0] the all-singing, all-dancing, upgrade to ‘get-iplayer’!

The BBC has some superb radio and TV programmes, some of which can be downloaded using ‘get-iplayer’, and then can be played with your choice of viewer. This script will -

  • Check to see if you have ‘get-iplayer/get_iplayer installed. If not it will prompt you to install it.
  • Creates the directory where the ‘beeb-tv.txt & beeb-radio.txt’ files are stored.
  • Downloads the current radio programme feed,
  • Allows you to put the programme numbers in to download, and tell you how much more you can download in this session,
  • Downloads the programmes and saves as *.mp3,
  • Asks you to put any further programme numbers in to download, and tells you how much more you can download in this session,
  • Asks you if you want to create a playing list of the radio programmes that can then be used by MPD.
  • Then downloads the current TV programme feed,
  • Allows you to put the programme numbers in to download, and tell you how much more you can download in this session,
  • Asks you to put any further programme numbers in to download, and tell you how much more you can download in this session,
  • Downloads the programmes,
  • Asks you if you would like to delete any of the ‘beeb’ downloads which are older than 30 days. If you answer “y” to this, it is DESTRUCTIVE and you will LOSE some programmes.
  • The script will quit and unload itself if left unattended and not downloading anything for thirty minutes. You might have gone to bed leaving it downloading some programmes, but when you go back to it in the morning, all connections to it are broken.

But before any of this can happen you need to configure it all, and this is done using ‘.beebrc’ which should be saved to your “/home/$USER” directory. In ‘.beebrc’ you can see the paths to my various directories, which will give you an idea of what should go where in your setup. So if you open ‘.beebrc’ in your favourite text editor, then change these lines -

tvsite=”where the downloaded tv programmes are to be stored”
music=”where your main music library is stored”
radiosite=”where the downloaded radio programmes are to be stored”
beebradio=”the playlist of your downloaded radio programmes”

Then to run ‘beeb’ from the terminal, you need to place it somewhere in your executable pathway, maybe home/$USER/bin‘ or ‘/usr/local/bin’ and then just put ‘beeb’ in your terminal and follow the questions that it gives you.

Required.

get-iplayer.
The prime requirement of this script is the programme ‘get-iplayer’ which is in most linux distributions. Without it, the script will not function!

Hints.

  • There is no need to press ENTER to proceed, just answer “y, n,q or r”. The only time you need to press ENTER is when you are inputting programme numbers.
  • The “r” command will restart the script from the beginning, just in case you need it.
  • The programme listings for both radio and tv will be found at “home/$USER.beeb/”
  • Don’t let ~/.get-iplayer/downloadhistory get too big as it will cause
    problems in your downloading, like being very slow, or causing the programme to drop the connection.
  • If the programme appears to hang, it may be trying to reconnect, or have just crashed, in which case, you will have to run ‘beeb’ again with the same input as you used before.
  • If you do need to break out of ‘beeb’, for whatever reason, you can either
    answer ‘q’ when you’re prompted for it, or just press ‘CONTROL C’ to crash out.
  • To access ~/.beeb to read ‘beeb-radio.txt’ or ‘beeb-tv.txt’ just enter ‘cd $HOME/beeb’ which auto-opens it at the prompt. Then you can use ‘$EDITOR beeb-radio.txt’ or ‘$EDITOR beeb-tv.txt’ to display either of the files. $EDITOR is your choice of text editor.
  • You will find that the script silently creates a file called ‘touch.m4a’ which is needed when creating the MPD playlist. This file has zero content and poses no threat to you or your computer, and should be left in place. If you do delete it, then the script will crash whilst creating the MPD playlist, so please leave it in place as it is needed.

The legalities.

Please note, I am not a lawyer, and this section is created using internet sources.

‘get-iplayer’ is only supposed to be used in the UK, if you do manage to use it outside the UK, then good luck to you but you will be unable to get any support for it. And to use it in the UK you should also have a UK TV licence too. Any files downloaded with ‘get-iplayer’, or this script, should only be kept for 30 days before being deleted.

Any problems, or further instruction required, please let me know at ‘boudiccas@talktalk.net’.

Sharon Kimble.
April 2014.
_
Changelog.

4.0 (14-04-2014)

  • Now gives the ability to restart the script from wherever you are.
  • Now gives the ability to delete content older than 30 days.
  • Script quits if left unattended and not downloading for 30 minutes.

3.1 (16-02-2014)

  • Faulty packaging, did not contain all necessary files, therefore repackaged.

3.0 (16-02-2014)

  • Now downloads all the radio programmes as *.mp3

2.8 (11-02-2014)

  • Moved mpd feed update question to just after radio programmes download, where its placement seems more logical.

2.7 (06-02-2014)

  • Updated documentation to reflect the current legal situation, as I understand it.

2.5 (28-01-2014)

  • Checks to see if get-iplayer/getiplayer is installed. Then runs with
    whichever is found.

2.0 (26-01-2014)

  • Changed configuration to create ~/.beeb and store feeds in it.

1.5 – and earlier

  • Changed ‘beeb.conf’ to ‘.beebrc’

And now the source code itself.

#!/bin/bash
set -e
#: Title            : beeb
#: Date             : 14 April 2014
#: Version          : 4.0
#: Description      : To work with get-iplayer and use small scripts to download BBC programmes.
#; Requirements     : get-iplayer
#: Uses '.beebrc' saved at $HOME/.beebrc

# Copyright (C) 2014  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
####################################################
trap "kill -- -$BASHPID" EXIT
function ask {
    while true; do

        if [ "${2:-}" = "Y" ]; then
            prompt="Y/n"
            default=Y
        elif [ "${2:-}" = "N" ]; then
            prompt="y/N"
            default=N
        else
            prompt="y/n"
            default=
        fi

        # Ask the question
        read -p "$1 [$prompt] " REPLY

        # Default?
        if [ -z "$REPLY" ]; then
            REPLY=$default
        fi

        # Check if the reply is valid
        case "$REPLY" in
            Y*|y*) return 0 ;;
            N*|n*) return 1 ;;
        esac

    done
}
function ask2 {
    n=$1                    # the limit on the input length (<1000)
    if [ -z "$2" ] ; then   # the name of variable to hold the input
        echo "Usage $0: <number> <name>";
       return 2;
    fi
    result="" # temporary variable to hold the partial input
    while $(true); do
        printf '[%03d] > %s' "$n" "$result"
        stty cbreak
        REPLY=$(dd if=/dev/tty bs=1 count=1 2> /dev/null)
        stty -cbreak

        test "$REPLY" == "$(printf '\n')" && {
             printf "\n"
             eval "$2=\"$result\""
             return 0
        }
        test "$REPLY" == "$(printf '\177')" && {
             # On my terminal 0x7F is the erase character
             result=${result:0:-1}
             (( n = $n + 1 ))
             printf "\r\033[K"
             continue
         }

    result="${result}$REPLY"
        (( n = $n - 1 ))
        if [ $n -eq 0 ] ; then
           printf "\n"
           eval "$2=\"$result\""
           return 1
        fi
        printf "\r\033[K" # to clear the line
    done
}

txtbld=$(tput bold)
bldgrn=${txtbld}$(tput setaf 5) 
tvfeed="$HOME/.beeb/beeb-tv.txt"
radiofeed="$HOME/.beeb/beeb-radio.txt"
beeb="/usr/local/bin/beeb"
source ~/.beebrc

if [[ -x "/usr/bin/get-iplayer" ]]
then player="/usr/bin/get-iplayer"
elif [[ -x "/usr/bin/get_iplayer" ]]
then player="/usr/bin/get_iplayer"
elif [[ -x "/usr/local/bin/get_iplayer" ]]
then player="/usr/local/bin/get_iplayer"
else echo "$0: Error: 'get-iplayer' or 'get_iplayer' is not installed. Please install it." &gt;&amp;2
     exit 1
fi

if [ -d "$radiosite/touch.m4a" ]
then
    echo;
else
    touch "$radiosite"/touch.m4a; echo;
fi

if [ -d "$HOME/.beeb" ]
then
    echo ;
else
    echo "$(tput setaf 1) $(tput setab 7) Error: Directory $HOME/.beeb does not exist $(tput sgr0)"
        read -n1 -p ""$bldgrn" Do you want to create the '$HOME/.beeb' directory? [y/n/q] $(tput sgr0)" ynq
    case "$ynq" in
        [Yy]* ) mkdir $HOME/.beeb; touch "$tvfeed"; touch "$radiofeed"; echo;;
        [Nn]* ) echo; exit;;
        [Qq]* ) echo; exit;;
        * ) echo ""$bldgrn" Please answer yes or no. $(tput sgr0)";;
    esac
fi

 {
    read -t 1800 -n1 -p ""$bldgrn" Do you want to update the radio feed? [y/n/q/r] $(tput sgr0)" ynqr
    case "$ynqr" in
        [Yy]* ) rm "$radiofeed"; eval "$player" --type radio >>"$radiofeed";;
        [Nn]* ) echo;;
        [Qq]* ) echo; exit;;
        [Rr]* ) exec "$beeb";;
        * ) echo ""$bldgrn" Please answer yes or no. $(tput sgr0)";;
    esac
 };
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to download some radio programmes? [y/n/q/r] $(tput sgr0)" ynqr ;
    case "$ynqr" in
        [Yy]) echo
              echo ""$bldgrn" Please input the radio programme numbers to download [max 200 characters] $(tput sgr0)"
              ask2 200 'radiobox'
              echo "$radiobox"
              echo
              cd "$radiosite"
              eval "$player" --g "$radiobox" --aactomp3; echo;;
        [Nn]) echo;;
        [Qq]) echo; exit;;
        [Rr]) exec "$beeb";;
        * ) echo ""$bldgrn" Thank you $(tput sgr0)";;
    esac
  };
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to download some more radio programmes? [y/n/q/r] $(tput sgr0)" ynqr ;
    case "$ynqr" in
        [Yy]) echo
              echo ""$bldgrn" Please input the radio programme numbers to download [max 200 characters] $(tput sgr0)"
              ask2 200 'radiobox'
              echo "$radiobox"
              echo
              cd "$radiosite"
              eval "$player" --g "$radiobox" --aactomp3; echo;;
        [Nn]) echo;;
        [Qq]) echo; exit;;
        [Rr]) exec "$beeb";;
        * ) echo ""$bldgrn" Thank you $(tput sgr0)";;
    esac
  };
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to update the mpd feed? [y/n/q/r] $(tput sgr0)" ynqr
    case "$ynqr" in
        [Yy]* ) cd "$music"
                rm "$beebradio"
                ls -1 "$radiosite"*.{mp3,m4a} >"$beebradio"
                echo;;
        [Nn]* ) echo;;
        [Qq]* ) echo; exit;;
        [Rr]* ) exec "$beeb";;
        * ) echo ""$bldgrn" Please answer yes or no. $(tput sgr0)";;
    esac
};
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to update the tv feed? [y/n/q/r] $(tput sgr0)" ynqr
    case "$ynqr" in
        [Yy]* ) rm "$tvfeed"; eval "$player" --type tv >>"$tvfeed";;
        [Nn]* ) echo;;
        [Qq]* ) echo; exit;;
        [Rr]* ) exec "$beeb";;
        * ) echo ""$bldgrn" Please answer yes or no. $(tput sgr0)";;
    esac
 };
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to download some tv programmes? [y/n/q/r] $(tput sgr0)" ynqr ;
    case "$ynqr" in
        [Yy]) echo
              echo ""$bldgrn" Please input the tv programme numbers to download [max 200 characters] $(tput sgr0)"
              ask2 200 'tvbox'
              echo "$tvbox"
              echo
              cd "$tvsite"
              eval "$player" -g "$tvbox"
              echo;;
        [Nn]) echo;;
        [Qq]) echo; exit;;
        [Rr]) exec "$beeb";;
        * ) echo ""$bldgrn" Thank you $(tput sgr0)";;
    esac
 };
echo;
{
    read -t 1800 -n1 -p ""$bldgrn" Do you want to download some more tv programmes? [y/n/q/r] $(tput sgr0)" ynqr ;
    case "$ynqr" in
        [Yy]) echo
              echo ""$bldgrn" Please input the tv programme numbers to download [max 200 characters] $(tput sgr0)"
              ask2 200 'tvbox'
              echo "$tvbox"
              echo
              cd "$tvsite"
              eval "$player" -g "$tvbox"
              echo;;
        [Nn]) echo;;
        [Qq]) echo; exit;;
        [Rr]) exec "$beeb";;
        * ) echo ""$bldgrn" Thank you $(tput sgr0)";;
    esac
 };
echo;
{
    read -t 1800 -n1 -p "$(tput setaf 1) $(tput setab 7) Do you want to delete programmes older than 30 days? [y/n/q/r]  $(tput sgr0)" ynqr ;
    case "$ynqr" in
        [Yy]) find "$radiosite" -mtime +30 -type f -delete;
              find "$tvsite" -mtime +30 -type f -delete; echo; exit;;
        [Nn]) echo; exit;;
        [Qq]) echo; exit;;
        [Rr]) exec "$beeb";;
        * ) echo ""$bldgrn" Thank you $(tput sgr0)";;
    esac
 };
Tagged , , , , | Leave a comment

‘ebuild- v2′

After having quite a few problems when I did my bi-daily, i.e. every other day, build of emacs, I’ve reworked my script which makes it easier to use.

#!/bin/bash
set -e
# set -x
#: Title            : ebuild
#: Date             : 12 April 2014
#: Version          : 2.0
#: Description      : To download and build the development build of emacs. 
#: Requirements     : xorg-dev, libgif-dev, libtiff-dev, ncurses-dev
# Copyright (C) 2014  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
####################################################
log=~/logs/emacsbuild2.txt
exec > >(tee -a $log) 2>&1
echo "$(date +%Y-%m-%d\ %H:%M:%S)" >> $log

### First download
#cd ~/git
#bzr branch bzr://bzr.sv.gnu.org/emacs/trunk
#cd ~/git/trunk
#./autogen.sh
#./configure
#export emacs_prefix="/usr/local"
#make
#sudo make install
#cd ~ 

### 2nd and subsequent downloads
cd ~
if [ -d "$HOME/.emacs.d/build/" ]
then
    echo;
else
    mkdir "$HOME/.emacs.d/build/"; cd ~ ; echo;
fi
cp /usr/local/bin/emacs-24.4.50 $HOME/.emacs.d/build/emacs-24.4.50-$(date +%Y%m%d-%R)
cp /usr/local/bin/emacsclient $HOME/.emacs.d/build/emacsclient-$(date +%Y%m%d-%R)
cp /usr/local/bin/emacs $HOME/.emacs.d/build/emacs-$(date +%Y%m%d-%R)
cd ~/git/trunk
#bzr branch bzr://bzr.sv.gnu.org/emacs/trunk
bzr pull
./autogen.sh
./configure
export emacs_prefix="/usr/local"
make
sudo make install
cd ~

For the first time you use it uncomment the first section, and comment out the second section, and then run the script.

For the second, and subsequent times, comment out the first section and uncomment out the second stage, and then run the script. You will find that it copies several files from /usr/local/bin to $HOME/.emacs.d/build/ and saves them with today’s date and time. This is to stop them being over-written in case your current build fails, you still have a good working file ready for use.

One thing that you have to bear in mind is that connecting to savannah for the first time and initialising your repo of emacs trunk build is that it may take some time! From start to finish when I did it was 40 minutes, time for you to make a cup of tea even! :)

Tagged , , , | Leave a comment

‘emq-v1′ – to help choose which version of emacs to use.

#!/bin/bash
set -e
#set -x
#: Title            : emq
#: Date             : 6 April 2014
#: Version          : 2.0
#: Description      : To help you see and decide which version of emacs you want to use
#: Requirements     : The versions of emacs in the menu
# Copyright (C) 2014  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
####################################################
log=~/logs/emacs-usage.txt
exec >>(tee -a $log) 2>&1
{
    read -n1 -p "$(tput setaf 2)
                testing ~ a,
                emacs 24.4.50 ~ b,
                emacs 24.3.50 ~ c,
                emacs [bleeding edge] ~ d,
                emacs-gtk ~ e,
                emacs24 [stable] ~ f,
                emacs23 [older] ~ g,
                quit ~ q? [a/b/c/d/e/f/g/q] " abcdefgq
    echo; echo "$(date +%Y-%m-%d\ %H:%M:%S) Answer: $abcdefgq" >> $log
   case "$abcdefgq" in
        [a]* ) /usr/local/bin/emacs -mm & echo;;
        [b]* ) /usr/local/bin/emacs-24.4.50 -mm & echo;;
        [c]* ) /usr/local/bin/emacs-24.3.50 -mm & echo;;
        [d]* ) /usr/bin/emacs -mm & echo;;
        [e]* ) /usr/bin/emacs-snapshot-gtk -mm & echo;;
        [f]* ) /usr/bin/emacs24 & echo;;
        [g]* ) /usr/bin/emacs23 -mm & echo;;
        [q]* ) echo; exit;;
        * )
    esac
}

Just save to your executable pathway, make it executable, and then run ‘emq’.

Tagged , , , | Leave a comment

Life on the bleeding edge 1 – emacs.

This is part of a small series of postings about linux software being at the
bleeding edge, i.e. the active development versions. And we kick off with emacs which went into development freeze on the 23rd December last year, and this is version 24.4.50.xx. This is being written in emacs 24.4.50.2, and two days ago I was using 24.4.50.1 so you can see that it is actively changing.

I have written this script which will download the development version of
emacs, builds it, and then installs it in /usr/local/bin. Then you can comment out some of the script lines and use it for further downloads and builds.

#!/bin/bash
set -e
#set -x
#: Title            : ebuild
#: Date             : 1 April 2014
#: Version          : 1.0
#: Description      : To download and build the development build of emacs. 
#: Requirements     : none known
# Copyright (C) 2014  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
####################################################
log=~/logs/emacsbuild.txt
exec >> (tee -a $log) 2>&1
echo "$(date +%Y-%m-%d\ %H:%M:%S)" >> $log
trap "kill -- -$BASHPID" EXIT

cd ~
#cd ~/git
cd ~/git/trunk
#bzr pull http://bzr.savannah.gnu.org/r/emacs/trunk
bzr pull
./autogen.sh
./configure
export emacs_prefix="/usr/local"
make
sudo make install
cd ~

To use it for the first time follow these instructions

#30 cd ~ ;; uncomment 
#31 #cd ~/git ;; and comment out
#32 cd ~/git/trunk ;; and uncomment 
#33 #bzr pull http://bzr.savannah.gnu.org/r/emacs/trunk ;; comment out
#34 bzr pull

and then run ‘ebuild’

You should be prompted for your users password when it is at the point of
installing to /usr/local/bin.

To run it easily use my script ‘emq’, which will be in a following post.

Tagged , , , | Leave a comment

Sudden catastrophic loss of free space!

So there I was quietly working away in emacs when suddenly the tab-bar and the mode-line started flashing purple! Disaster had struck, but what disaster? In the mini-buffer it was saying that there was no free space left on the drive, and so it was unable to save a file. No free space? No way, there should be about 140 gigs of hard drive space? Where had it gone?

‘Conky’ confirmed that the drive was full, and that it had not all gone into the trash! I had been downloading a whole slew of mails from gmail into GNUs and when I realised that it was going to be 1000+ emails, I’d panicked and killed the process. So somewhere all those emails had gone, but where?

I started ‘ncdu’ which is “Ncdu is a ncurses-based du viewer. It provides a fast and easy-to-use interface through famous du utility. It allows one to browse through the directories and show percentages of disk usage with ncurses library.” This analysed my /home/$USER directory and didn’t show anything near the missing space. On to Plan B!

I then started ‘baobab’ and running it as ‘sudo baobab’ and it is “GNOME disk usage analyzer – Disk Usage Analyzer is a graphical, menu-driven application to analyse disk usage in a GNOME environment. It can easily scan either the whole filesystem tree, or a specific user-requested directory branch (local or remote). It also auto-detects in real-time any changes made to your home directory as far as any mounted/unmounted device. Disk Usage Analyzer also provides a full graphical treemap window for each selected folder.” This scanned the whole of / and didn’t show any sign of the missing 140gigs either.

So where was that 140gigs? It wasn’t in /home/$USER and it wasn’t in / either! I don’t know, I couldn’t find it! I’d already deleted 750mbs of cruft which wasn’t needed so was safe to delete. My only other option now was to reboot, and pray! Which is what I did!

And when it came back up it showed 140gigs of free space! It was obviously too much to remain in memory so it had been dumped as temporary files onto the hard drive, which rebooting deleted them.

Normal service had resumed!

Tagged , | Leave a comment

The new kid on the block – QupZilla

For about a month now I’ve been using ‘QupZilla’ as my default web browser and am using the development version. QupZilla is a new, fast and secure open-source WWW browser, and can be found at http://www.qupzilla.com/ and looks like this -

computer-laptop-qupzilla.png

It has source files for most of the major distros, so you might well find it available for your distro.

With every version, QupZilla is trying to include new features. Currently QupZilla implements all standard web browser features. In addition to this, QupZilla provides a lot of interesting features like

  • Very fast startup – QupZilla is ready to use at lightning speed
  • Very fast browsing – with QWebKit core, QupZilla renders pages in a moment
  • SSL Certificate Manager – never lets you visit pages with bad certificates without notification
  • Search Engines Manager – with OpenSearch support and suggestions
  • Browser Themes – with themes support, you can easily make your browser look unique!
  • Speed Dial – access your favourite pages easily
  • Cross Platform – supports for all major platforms and allows to use it everywhere
  • Extensions – AdBlock, GreaseMonkey, Mouse Gesture, Access Keys Navigation and more

Some of its main features are -

1 Native look’n’feel

QupZilla is using native widgets style on major Linux Desktop Environments. It is also using icons from the active desktop icon theme. If you find native themes too boring or have some problems with it, you can always switch to other themes

2 Unified Library

QupZilla unifies bookmarks, history and rss reader in one well-arranged window. No more multiple windows, QupZilla uses just one!

With the integrated rss reader, you can stay up to date with your favourite sites. QupZilla can also import bookmarks from other browsers.

3 Integrated AdBlock

Are you bored of websites full of advertisements? Are they eating your bandwidth and time? The only thing you need with QupZilla is to update EasyList or maybe add your own rules and start browsing ad free.

4 Speed Dial

This popular extension is finally available for QupZilla users! You can now access your favourite pages as fast as you want on one page opened in new tab. Needless to say that it fully supports drag&drop and page thumbnail loading.

It is in active development and is currently at version 1.6.3 which was released on 14 February 2014.

You can also use a command line interface to interact with QupZilla.

Usage: qupzilla [options] URL

QupZilla options:
-h or –2013;help print this message
-a or –2013;authors print QupZilla authors
-v or –2013;version print QupZilla version

-p=PROFILE or –2013;profile=PROFILE start with specified profile
-ne or –2013;no-extensions start without extensions

Options to control running QupZilla:
-nt or –2013;new-tab open new tab
-nw or –2013;new-window open new window
-pb or –2013;private-browsing start private browsing
-dm or –2013;download-manager show download manager
-ct=URL or –2013;current-tab=URL open URL in current tab
-ow=URL or –2013;open-window=URL open URL in new window

Example: qupzilla http://www.google.com
will run QupZilla with google.com page
(or add tab with google.com if already running)

The changelog can be found at
https://github.com/QupZilla/qupzilla/blob/master/CHANGELOG

If you want to use the development version, currently at 1.7.0, you could get it downloaded, and auto-built using this script, which places the executable in /usr/local/bin

#!/bin/bash
set -e
#: Title			: qzbuild
#: Date		    	: 1 April 2014
#: Version			: 1.0
#: Description		: to automate the downloading and building of QupZilla
#; Requirements		: none known

# Copyright (C) 2014  Sharon Kimble 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
####################################################
log=~/logs/qzbuild.txt
exec > > (tee -a $log) 2>&1
echo "$(date +%Y-%m-%d\ %H:%M:%S)" >> $log

cd ~ ;
mkdir -p ~/.temp-qupzilla;
cd ~/.temp-qupzilla;
git clone 'git://github.com/QupZilla/qupzilla.git';
cd ~/.temp-qupzilla/qupzilla;
export QUPZILLA_PREFIX="/usr/local"
qmake;
make;
sudo make install;
cd ~ ;
rm -R ~/.temp-qupzilla; echo
Tagged , , | Leave a comment

YASnippet, your own snippets, and lorem-ipsum.

Yasnippet is an extremely good system of ‘boiler-plate’ text for emacs which can be called on for inserting text at the cursor. So far, this post has used two snippets, ‘New Post’ and ‘Lorem Ipsum’. ‘Lorem ipsum’ is simply dummy text of the printing and typesetting industry. It has been the industry’s standard dummy text ever since the 1500s, and is being used here to demonstrate the use of snippets.

“Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus
dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.”

The first snippet called is ‘NewPost’ which has this format -

# contributor: boudiccas
# name: New Post
# key
# --
#+DATE: [2014-03-15 Sat 11:41]
#+OPTIONS: toc:nil num:nil todo:nil pri:nil categories:nil ^:nil TeX:nil
#+TAGS: org2blog, emacs,
#+TITLE: Uncategorized, Hello

It is saved in -

~/.emacs.d/snippets/org-mode/New Post

and is called from the ‘YASnippet’ drop-down menu, and goes like this -

YASnippet -&gt; org-mode -&gt; New Post

Once you have installed ‘YASnippet’ from ELPA you put this code into your .emacs

(require 'yasnippet)
 (yas-global-mode 1)
;; default TAB key is occupied by auto-complete
(global-set-key (kbd "C-c ; u") 'yas/expand)
;; default hotkey `C-c &amp; C-s` is still valid
(global-set-key (kbd "C-c ; s") 'yas/insert-snippet)
;; give yas/dropdown-prompt in yas/prompt-functions a chance
(require 'dropdown-list)
;; use yas/completing-prompt when ONLY when `M-x yas/insert-snippet'
;; thanks to capitaomorte for providing the trick.
(defadvice yas/insert-snippet (around use-completing-prompt activate)
     "Use `yas/completing-prompt' for `yas/prompt-functions' but only here..."
       (let ((yas-prompt-functions '(yas/completing-prompt)))
             ad-do-it))

but I have found that when this text is put in your .emacs, highlighted and then using the menus -

Emacs-Lisp -&gt; Evaluate region

this immediately makes it available and saves you either restarting emacs, or from ‘evaluating the buffer’. It is more immediate, and puts the ‘YASnippet’ menu item in the menu-bar. From there you can just look down its available items, and seeing the very important item of ‘Reload everything’, which as it says restarts everything, including your snippets.

The ‘lorem ipsum’ snippet has this format -

# contributor: boudiccas
# name: Lorem ipsum
# key
# --
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus
dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui
nunc nobis videntur parum clari, fiant sollemnes in futurum."

and is saved in the org-mode directory of snippets. It is installed and started exactly the same as the ‘New Post’ snippet.

Tagged , , , | Leave a comment

Passwords 3 – Passwordless password manager.

I thought this was a rather novel and rather easy solution to passwords that it was worth passing on.

“Most people I know tend to simply use the same password on ALL websites. Email, Paypal, Amazon, Ebay, Facebook, Twitter. This is obviously a very bad idea.

Passwords are always a problem. Difficult to remember, hard to think of a good one when you need a new one, tricky to keep safe. For the moderately-paranoid and the sufficiently-techie there are many good solutions out there. Password managers. Online, offline, commercial, free. So I usually suggest to my friends and colleagues to use a password manager.

I personally like to use clipperz (online). I also used keepass (multi-platform). Both free and open source tools and do a good job.

However, I doubt many of my friends actually follow my advice. They’ll have to install something, or log on to somewhere JUST FOR THAT. It’s a little annoying to use and make every login complicated. It might not be available when they’re using the computer at work/friend’s house. So they end up doing the same thing and simply use one password.

So what’s the solution?? Well, lets refine the problem. The main concern for me is that IF I use the same password and it gets compromised. Even if it’s super-strong, ALL my ‘online assets’ almost immediately get compromised too. By the time I log in to change the password on ALL those websites, it’s probably too late. That’s assuming I know it was compromised on one of those websites. So I tend to trust the security of Amazon and Paypal (not that they are 100% immune to attacks and leaks), but what about this website I order coffee at (great coffee and a great website, and I do not imply that their security is not good, it probably is as good as their coffee), or that other website I ordered some computer parts at 2 years ago… The thing is, it only takes ONE. And then if someone grabs this password, the first thing they’re going to try is logging in to paypal, amazon, ebay etc.

It got me thinking. What if I carried on using the same (super-strong) password, but instead of using my usual email, used a different one for each website??! you must be thinking now “How can I use a different email for each website?? Sign up with a gazillion hotmail accounts??” No, there’s a simpler way, but lets leave it aside for now, I’ll show you how to in a moment. So what are the benefits? Even if someone grabs my (super-strong) password from this one website, the email address won’t work on any other website. And they won’t be able to guess my other email accounts Because each email address is different and hard to guess!!

How do I get those gazillion email addresses without signing gazillion times for an email account then? Do you have a gmail account? Hotmail? Yahoo?! No??!! Well, you should probably get one of those (although others may allow the same thing). All these webmail accounts allow you to create aliases. (here’s a quick overview for gmail, hotmail and yahoo). Essentially it’s another email address that is linked to your main email. So instead of john.smith@gmail.com you can use john.smith+f9230382@gmail.com. Not the most friendly address, but virtually impossible to guess. All you need to do now is sign-up for an account using this alias. Don’t forget to create a new alias for every online account you create though! And make sure the alias is hard to guess. Just stick a bunch of random characters and digits at the end. the longer the better (size DOES matter).

The only remaining question is therefore “how do I know which alias I used for <insert name of website>?”. My suggestion is relatively simple. Keep it inside your email account. Keep a draft email, send an email to yourself, add a task/note or whatever you can use inside your online webmail account. The list would look something like this:

facebook – john.smith+kjdi23982ndsa@gmail.com
ebay – john.smith+484jqcqwl2@gmail.com
amazon – john.smith+hgqozcmn21kf@gmail.com

It’s not super-secure, but:

  • Only if your email account gets hacked they would see this list (and they need to know to look for it too)
  • The list of aliases would NEVER include your super-secure password. This is something you still have to remember.
  • If you make sure you use a different (super-secure) password for your email account, then even if your regular (super-secure) password gets compromised, they won’t be able to get into your email account and get this list.

So you end up with two super-secure passwords you have to remember, and a (not super secure) list of email aliases inside your email account. That’s the passwordless password-manager.

1 NOTE:

  • Be very careful of losing this list. Without it, you won’t be able to log in to your online accounts. So if you do plan on using this, make sure you have a few copies of this list elsewhere. A simple solution is every time you use an email alias, send yourself an email with a note about it. Try to use the same subject so you can find it later and send this email to more than one email if you have more than one. Then you can simply search through your email account(s). I suggest somthing like

From: john.smith@gmail.com
To: john.smith@gmail.com, john.smith@hotmail.com
Subject: new alias for <website name>

john.smith+fkfjdl93823@gmail.com”

Sourcehttp://www.testuff.com/blog/passwordless-password-manager/
Published – 03/03/2011

Tagged | Leave a comment

A New Plank

Whilst generally surfing around I came across a new launcher, which is similar to ‘docky’ but called ‘plank’. And this is what it looks like –

Screenshot-050314-13:28:27.png

‘Plank’ is a very lightweight and quick to launch launcher, and easy on resources. Looking at the above screenshot of ‘plank’ you can see the similarity to ‘docky’, and ‘docky’ was developed from ‘plank’.

Its home-page is at https://launchpad.net/plank and can easily be installed into Debian using these lines appropriate for your ‘sources.list’ –

## Repos for plank
# for wheezy users
deb http://people.ubuntu.com/~ricotz/debian-plank wheezy main
# for jessie and sid users
deb http://people.ubuntu.com/~ricotz/debian-plank sid main

Although it does say ‘ubuntu’ in the site address the packages do install debianized packages.

There is no GUI for configuring plank, you have to edit its configuration file which can be found at –

~/.config/plank/dock1/settings

and this is also where you can change the themes that it comes with, which are three only – Default, Matte, and Transparent. You can change the themes very easily from within ‘plank’ itself if you install what I call the ‘multi-pack’ which places an icon at the second position from the left of plank.

There is a multi-pack of themes of 27 available by using this command at the command-line –

cd ~ &amp;&amp; mkdir -p ~/.temp-plank-themer &amp;&amp; cd ~/.temp-plank-themer &amp;&amp; wget
https://github.com/rhoconlinux/plank-themer/archive/master.zip &amp;&amp; unzip
master.zip &amp;&amp; cd plank-themer-master/ &amp;&amp; rm -fR
~/.config/plank/dock1/theme_index; rm -fR ~/.config/plank/dock1/themes-repo; cp
-a theme_index/ ~/.config/plank/dock1 &amp;&amp; cp -a themes-repo/
~/.config/plank/dock1 &amp;&amp; cd ~ &amp;&amp; rm -R ~/.temp-plank-themer &amp;&amp; sh
~/.config/plank/dock1/theme_index/plank-on-dock-themer.sh

You can get further themes at various sites on the internet, look at ‘devianart’, and these are installed at ‘/usr/share/plank/themes’ which then appear at the bottom of the theme list if you save them with a lower-case first letter, whereas if you use an upper-case first letter then they merge with all the other themes.

Plank is so nice and clean, easy to use, uses minimal resources, and doesn’t have unnecessary bloat like some other launchers. In other words, you haven’t got a spinning icon to alert you to the fact of activity in that programme. You have to know what programmes you are running and if they are likely to have activity in them, think ‘xchat/hexchat’ for IRC, etc. It is now in full-time use here as I like it so much.

But, there is one possible gotcha if you are using ‘fluxbox’ and compton’, which is easily solveable. If you use both programmes you will find that there is a space approximately one inch high above plank in which no button can be pressed, or any keyboard activity. This is due to some interaction between compton and plank. You can see this area very easily by closing compton, and then putting this command into your terminal ‘compton -c –shadow-blue 1′, which then shows this space which I prefer to call ‘dead-ground’ as a fuzzy blue shadow. So to solve it, you need to close compton, and put the following text into your ‘~/.fluxbox/apps’ file –

[app] (name=plank)
  [Layer]   {bottom}
[end]

Save it, and restart compton, and plank, and now every programme works as it should. What you are actually doing is to send plank to the bottom-most layer of fluxbox, which is layer 10, and allows other programmes to lie over the top of it and even cover it entirely. But, it works!

When you start plank for the first time, it starts hidden, so you have to position your cursor at the bottom of the screen to bring it into focus. You can control whether its hidden or not in the config file, and here it is –

#This file auto-generated by Plank.
#2014-03-07T13:58:26+0000

[PlankDockPreferences]
#Whether to show only windows of the current workspace.
CurrentWorkspaceOnly=false
#The size of dock icons (in pixels).
IconSize=48
#If 0, the dock won't hide.  If 1, the dock intelligently hides.  If 2, the dock auto-hides. If 3, the dock dodges active maximized windows.
HideMode=0
#Time (in ms) to wait before unhiding the dock.
UnhideDelay=0
#The monitor number for the dock. Use -1 to keep on the primary monitor.
Monitor=-1
#List of *.dockitem files on this dock. DO NOT MODIFY
DockItems=plank.dockitem;;plank-themer-ondock.dockitem
#The position for the dock on the monitor.  If 0, left.  If 1, right.  If 2, top.  If 3, bottom.
Position=3
#The dock's position offset from center (in percent).
Offset=0
#The name of the dock's theme to use.
Theme=Fresh
#The alignment for the dock on the monitor's edge.  If 0, panel-mode.  If 1, right-aligned.  If 2, left-aligned.  If 3, centered.
Alignment=3
#The alignment of the items in this dock if panel-mode is used.  If 1, right-aligned.  If 2, left-aligned.  If 3, centered.
ItemsAlignment=3
#Whether to prevent drag'n'drop actions and lock items on the dock.
LockItems=false

Enjoy your new launcher, which is very configurable with so many themes available for you to use.

Tagged , , , , | Leave a comment

Archives!

With the help of modern-day chicanery and trickery, WordPress is now able to offer up a page of archives, which shows all of the posts here, in the order in which they were posted.

So, to access them just head to the top of the page, just below the header and you’ll find three tabs, ‘Contact me’, ‘Sitemap’ and ‘Archives’, so just click on the ‘Archives’ tab. :)

Tagged , | Leave a comment