May 19, 2012 3:24 AM

Grep.

I've used 'sudo updatedb' and then 'locate foo' to find things on my system, and that worked for some things but not others. I needed something more powerful, enter ........... Grep!

Grep works as

grep pattern file-name1 file-name2
as in
grep 'Bin 01' /home/boztu/Music/*
Which shows all instances of 'Bin 01'. Simple to use, and much more powerful than just plain locate!

More information and further examples can be found at http://bulba.sdsu.edu/grephelp.html


Posted by Sharon | Permalink

May 18, 2012 3:53 AM

Datapacker.

For about a week now I've been struggling with 'datapacker' which is a tool to pack files into the minimum number of bins as you specify to burn as a CD or a DVD, and who's homepage is at https://github.com/jgoerzen/datapacker/wiki . The programs author, John Goerzen, has been very kind and helpful with a guiding hand and advice as I struggled to master the program.

It is a very good program but needs you to be precise in what you're trying to achieve. I wanted to know the minimum number of DVD's that I would need for a certain directory containing mp3s. So I ran it as this command line;-

datapacker -b ~/Music/irish_celtic_music_collection_version_2/%03d -s 4000m -a hardlink ~/Music/irish_celtic_music_collection_version_2/*.mp3
It gave me three bins, so I know that I need three DVD's for them to be burnt to.

Again it will not work if there are spaces in the titles of the album, so you need to replace them with underscores, as detailed elsewhere in this blog.

However, it has shown up one odd thing which I dont know the answer to yet. When I use 'konqueror' as my main file program it does not show the bins named '001', '002', etc that datapacker creates. Using 'krusader' or 'dolphin' does show them!


Posted by Sharon | Permalink

May 17, 2012 3:08 AM

Mind-mapping software.

I have been a fan of Tony Buzan's mind-mapping for many years, and have used several programmes for it, primarily kdissert and now freemind.

A mind map is a diagram used to represent words, ideas, tasks, or other items linked to and arranged around a central key word or idea. Mind maps are used to generate, visualize, structure, and classify ideas, and as an aid to studying and organizing information, solving problems, making decisions, and writing. Further information about mind-mapping can be found at http://en.wikipedia.org/wiki/Mind_mapping .

Kdissert was developed by Thomas Nagy but is no longer in active development, but is still available in debian squeeze, but not in wheezy. It is very easy to use and quite complex documents can be created with minimal effort.

Semantik followed on from kdissert, and again developed by Thomas Nagy, but seems to have stalled in its development since August 2009. It can be found at http://www.freehackers.org/~tnagy/kdissert.html but is not available for debian squeeze or wheezy due to it requiring qmake and uic3.

Freemind is a java based programme and is available in debian squeeze and wheezy, and is in active development. It can be found at http://freemind.sourceforge.net/wiki/index.php/Main_Page . It is slightly more complex to use than kdissert but gives very elegant mind-maps which seem to be easier to follow. It is available cross-platform and produces consistently good results.

Another clone of freemind is freeplane which is available for squeeze and wheezy. It uses the same commands as does freemind and also saves its mind-maps with the same suffix, so they can be read and used by either programme. It can be found at http://freeplane.sourceforge.net/wiki/index.php/Main_Page .

For myself, I'm having to get used to using freemind/freeplane instead of kdissert, but I think that the results look better and more professional.


Posted by Sharon | Permalink

May 09, 2012 11:51 PM

Feeds!!!!

After a gap of very nearly five years, actually 4 years and 11 months, I am at last able to upload xml files so that the RSS feeds are now working again! I'm sorry it took so long, and its a bit of a convoluted way of uploading them, but it works, so who cares ? :)

Finally, normal service has been resumed! :)


Posted by Sharon | Permalink

May 08, 2012 2:11 AM

Renaming to mp3

As part of my plan is to backup all my mp3's to dvd, and then maybe even delete some of them such that I can play them from the dvd I've been busy converting from flac to mp3 and wav to mp3.

First, flac to mp3, is done at the command line by cd'ing in to the directory in the terminal, and then use this command ...

for file in *.flac; do flac -cd "$file" | lame -h - "${file%.flac}.mp3"; done
then sit back and watch the fun. Once its completed you can either listen to the resulting mp3s or just delete the flac's straight away.

With the wavs to mp3s, you create a 'wav2mp3.sh' program in your cron directory which contains the following

#!/bin/sh
# name of this script: wav2mp3.sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   lame -h -b 192 "$i" "$file.mp3"
  fi
done

Once this is saved and made executable by running the command

chmod 777 wav2mp3.sh
Then its copied and pasted to the directory where the wav files are and run as wav2mp3.sh, where it will continue to convert all the wav files to mp3s. Again you can listen to them before deletion if you so desire.

One thing you must be careful of though in both cases is that the directories are correctly named, in other words they dont contain these characters >= &, space, - . Any spaces should be renamed as underscores, which should make life simpler for you.


Posted by Sharon | Permalink

May 06, 2012 4:18 AM

Some Useful emacs key presses

C here equals the CONTROL key
C-x C-f find-file Find a file and read it to screen
C-x C-v find-alternate-file Read a different file.
C-x i insert-file Insert a file at the cursors position.
C-x C-s save-buffer Save the current buffer.
C-x C-w write-file Write the contents of the buffer to a file.
C-x C-c save-buffers-kill-emacs Save all open buffers and get out of emacs.
C-z suspend-emacs Suspend emacs.
C-y
Paste

Posted by Sharon | Permalink

May 01, 2012 12:50 AM

Backing up my mp3 music collection.

I've decided to back up my music collection to DVD, and one folder contained 2976 mp3s, which came to 18.9gbs, much too big for one DVD. so i used genisoimage with the command ...... genisoimage -o ~/irishceltic.iso /home/boztu/Music/Irish_Celtic_Music_Collection_Version_2 . This gave me a single file called irishceltic.iso.

But there is a problem, genisoimage truncates the file names at the first space that it encounters. To get round this I use the following script;-

#!/bin/bash
# From James Morris, Kent Linux Users Group, 2012

find $1 -type f \( -name '*.mp3' \
-o -name '*.MP3' \) |
while IFS= read -r NAME;
do
DEST=`echo "$NAME" | tr ' ' '_'`
mv -v "${NAME}" "${DEST}"
done

This is saved in my cron folder and called 'renamemp3s.sh' and is called from the command line with the folder you wish to work on after its name. So this script is run first and then genisoimage is used afterwards.

Then I used split to make it into 4gb files, as .... split -b 4000m /home/boztu/irishceltic.iso ...... and the resulting files were 3.9gbs. They were saved as xaa,xab, xac, etc and just had to be renamed xaa.iso, xab.iso, etc.

Then I used k3b to burn the image onto DVDs very easily, which now means that i can play them from the DVD drive and can delete the originals leaving me with more space for more music.

But k3b also creates a problem, in that it truncates the file names to the first 12 characters, and I suspect that there is no way round that, unfortunately.


Posted by Sharon | Permalink

April 19, 2012 10:48 AM

Keyboard Shortcuts.

WINDOWS.

The following short cuts will focus primarily on open windows.

Alt-tab : This combination cycles through the currently open windows. This is handy when you have a lot of windows open and you constantly are moving from one to another.

Ctrl-alt-d : This combination minimizes all open windows to the far corners of the screen. To get them back just hit the combination again.

Alt-F9 : Minimizes the focused window.

Ctrl-Alt-s : Shade window. To unshade window hit the same combination.

DESKTOP.

The following combinations effect the desktop.

Ctrl-Alt-Backspace : This combination will restart X Windows (this logs you out).

Ctrl-Alt-l : This combination will lock the screen. You will need your user password to unlock the screen.

Alt-F2 : This combination opens the “run” dialog. From here you can enter a command to run (similar to the “cmd” Windows command).

Alt-F1 : This combination opens the main menu.

Print Screen : This key will take a screenshot of the whole desktop.

Alt-Print Screen : This combination will take a screenshot of a single window.

Ctrl-Alt-left arrow: This combination will move one desktop to the left.

Ctrl-Alt-right arrow : This combination will move one desktop to the right.

Ctrl-Alt-down arrow : Show all desktops on one screen. Because there are more desktops than will fit across your screen (even in this small size), you use the left and right arrow keys to move one way or the other.

MENUS.

Alt F1 : This will open up the Applications menu on the GNOME desktop. Once open you can use your arrow keys on your number pad.

Alt F : This opens up the file menu in your current working window. Once open you can use your arrow keys on your number pad.

Alt E : This open up the Edit menu in your current working window. Once open you can use your arrow keys on your number pad.

Alt Space : This brings up the Window Menu (where you can select a window to be “Always on Top” and more. Once open you can use your arrow keys on your number pad.

WINDOWS.

These particular shortcuts always pertain to the current working window.

Alt F7 : Initiates window movement. Once you press this combination you can use your arrow keys to move the window where you want it.

Alt F8 : Resizes a window. Once pressed, use your arrow keys to resize the window. Hit Enter when finished.

Alt F10 : Maximizes a window.

Alt F5 : Returns a window to previous or normal size.

Alt F4 : Closes the window.

NAUTILUS.

Nautilus is the default GNOME file manager.

Ctrl W : Close the current working Nautilus window.

Ctrl R : Reload the Nautilus window.

Alt Up Arrow : Open parent folder.

Alt Left Arrow : Move back one folder.

Alt Right Arrow : Move forward one folder.

Alt Home : Return to your home directory (~/).

Ctrl L : Show/hide the location bar.

F9 : Show/hide the side pane.

Ctrl H : Show/hide hidden files.

Ctrl + : Zoom in.

Ctrl - : Zoom out.

Ctrl 0 : Normal size.


Posted by Sharon | Permalink

April 19, 2012 2:23 AM

Upgrading to wheezy?

I also started the groundwork to upgrade to wheezy from squeeze. I knew that I got a distorted screen under wheezy and it turns out to be my graphics card, which is a bit old, being a VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) , as i learnt from 'lspci'. and it uses the nouveau driver under squeeze but not under wheezy. So I would need to;-
disable nouveau in /etc/modprobe.d/blacklist.conf and in /etc/modules.
Then to load nvidiafb i would need to create a file with this in it;-
Section "Device"
Identifier "my gpu"
Driver "fbdev"
EndSection#
then save it as "20-fbdev.conf" in /etc/x11/xorg.conf.d/ and i'll probably have to mkdir it.

It seems such a lot of hoops to jump through to get an unstable system where things do occasionally get broken, and to use it to replace a stable rock-solid system where stuff doesn’t get broken unless i break it. So I've decided to stick with my current setup until wheezy becomes stable.


Posted by Sharon | Permalink

April 10, 2012 1:33 PM

vnstat

Vnstat has long been a favourite of mine, and i've used it for many years, but I've just learnt that when you set it up with 'vnstat -u -i eth0' run as root, that you must then reboot for it to have any effect and start recording.

Posted by Sharon | Permalink

April 09, 2012 8:00 AM

Tasklist colours in KDE

Although I use GNOME there are certain programmes that I use from KDE, like Kontact and konqueror and krusader. I have long had a gripe that I cant read the tasks in Kontact because the red colouring of them obscures the text. So today I did something about it, and asked on #kde and #debian in irc this question, "using debian 6.0.4 and kde 4.4.5 and kontackt 2.4.7 how do i change the coloured background of tasks from red to light green or pale yellow say please?"

The answer I got wasn't a full answer to the problem, but it was enough to point me to the right place. Which is "calender > configure calender > colours" and then just choose your colours. Result, I can at last read the text of my tasks and see when they need to be completed by.


Posted by Sharon | Permalink

April 04, 2012 4:25 PM

A new instllation

I recently had to do a fresh install of debian 6.0.4 due to trying to upgrade to wheezy [debian 7] and failing when my /usr got down to 7.5mbs and it still wasn't completed. So I reinstalled everything into one giant partition so I'm no longer worried about running out of space. I restored my home directory from my backups so I was soon up and running.

These are the main programmes that I installed and in what order ;- vnstat, logwatch, rsync, ntp, and then kmymoney, kmail, knode, kdf, iceweasel, winff, handbrake-gtk, transmission, gftp,xchat, xchat-gnome, k3b, gdesklets, glrellm, gwhere, nanoblogger, tomboy, krusader, gramps, gourmet, leafpad, revalation, and then I stopped recording them.

Kdf contains kwikdisk which si a very useful little program for showing the disk usage and how much is free and i use it quite a lot. So now I have a big shiny installation of debian to use and to avoid breaking too.

I still want to upgrade to wheezy but i'm falling foul of a known bug when I try to do an upgrade, and when I try to do a fresh installation I cant because there is no graphical option on the installation menu. So I'll wait until they've got that sorted out then and try again at a later date.


Posted by Sharon | Permalink

March 15, 2012 11:09 PM

Backing Up DVD's - part 2

To back up my collection of dvd's to my hard drive I use 'handbrake' which creates an m4v file, and then 'winff' to create the .avi file, which is on average about a quarter to a third smaller than the starting file. The quality is quite good working with the defaults, so I haven't tried fiddling with the conf files as I'm quite happy with the defaults.

Posted by Sharon | Permalink

February 11, 2012 5:26 AM

Backing up DVD's

I've recently started backing up my commercial DVD's to my hard drive, and I'm tending to use "HandBrake" for it. So far it produces a nice compact m4v file, but I've yet to see the fruits of my intensive labours with it. And its soooo slow!

VLC can also rip DVD's and store them as an *.avi file, but it doesn't appear to compress the file output, which means that you get a horrendously big file.

K3b can also rip DVD's, but it stores each 'chapter' in the original film as a seperate *.avi, which means that you need to "stitch" them togethor again, before they can be of any use to you in a meaningful way.


Posted by Sharon | Permalink

January 22, 2012 12:54 PM

Password Keepers

I've recently discovered "Revelation" http://revelation.olasagasti.info/ which is a password keeper in active development, and its been added to my startup programs. I originally docked it into the system tray with "alltray" but I was unable to use it properly then, so now it just sits in the bottom program tray waiting to be used.

Another password keeper is "KeePassX" at http://www.keepassx.org/ which I’ve used previously but it doesn’t seem so intuitive as Revelation. One thing in its favour though is that it docks into the system tray which Revelation doesn't.


Posted by Sharon | Permalink