• Tip Jar

Customize Everything

Imagine for a moment you have just purchased a car. You get the keys, you climb in, start the engine. Now, let’s take this
imagined scene and add a few details. It’s the middle of a heat wave, outside your car the temperature reads 103 degrees
Fahrenheit. Somehow, the heat in the car has been set to max, and the volume on the radio is all the way up, and what’s worse,
the radio is tuned to rap. You can still save this imagined scene, just reach out, flip the heat over to air, turn down the
radio, and for god’s sake! find a station that plays music, you know, the stuff with talent.
I have noticed that when people get a new program, or in a lot of cases, a new computer, they never customize anything about it
at all. Just like you wouldn’t drive the car with the heat maxed during a heatwave with rap crashing through your new speakers
assailing your ears, neither should leave default settings as they are unless they are what you want. One great example of this
is the completely awesome speech synthesizer eSpeak. I have heard so many people complain that they don’t like the voice or the
British accent. If that is the case, why not customize it? It has a ton of languages including … you guessed it … U.S.
English and, there are a ton of variants as well so the voice can sound different. Go ahead, if you have a command line up:

espeak -v en-us+m3 "I just customized espeak. Yay for me."

See there, not so difficult.
I personally check preferences or settings for programs as soon as I install them. You never know what essential feature you
may discover that is disabled by default.

Blogging With Charm

If you love the CLI, and I do, charm is a great way to write, edit, or pretty much do anything with your blog. It is written for Live Journal, but works with WordPress. Setup is simple, just change the info below to match your credentials and launch charm. In Arch Linux, charm is available in the AUR:

metaweb = USERNAME PASSWORD http://YOURSITE.EXT/xmlrpc.php
editor = vim
pager = vimpager

And that’s it, you’re ready to pretty much control your blog right from the terminal. Charm has tons of options, and the menu based interface makes everything nice and easy.

Let’s Have Sox

I have mentioned sox briefly in passing in a couple other posts. This awesome command line music player and editor is a truly great addition to anyone’s CLI arsenal though, so I figured I’d devote a whole post to it. So, without further ado, let’s have sox!
Simple usage:
play file name.ext
as in play guitarsolo.ogg
or to record yourself,
rec guitarsolo.flac
To convert file from wav to ogg:
sox scream.wav scream.ogg
The sox manual does a great job at explaining play and rec, so I will keep it brief here. The purpose of this article is more to discuss the synth function and all the really neat stuff you can do with it.
There are several sound types you can choose from when using synth, they are brown, pink, pluck, saw, square, triangle and white. To play a single guitar note, an E, you can do the following:
play -n synth 2 pl E2
Notice the use of pl instead of pluck in the line above. You can use abbreviated synth types for any of the sound types, pi for pink, tri for triangle, etc. If, you want to write your note to a file, do it like this:
sox -n note.ogg synth 2 pl E2
Using the play command will fail here because it will try to play the file note.ogg instead of writing to it. There are lots of effects you can add to your notes including overdrive, flanger, etc. Each is well documented in the sox manual. One thing that I found difficult to understand at first was linking multiple notes together. There are some simple demonstrations of chords in the manual, but, if you want to have sox play a song, you will run into the daunting task of making some huge delays for each note, or you can link multiple sox commands together like this:
play "|sox -np synth .25 pl E2" "|sox -np synth .7 pl B2"
I have written a script to play the song "Twinkle Twinkle Little Star" using sox. It is available here. Now, if we stopped here, that would have been some good sox, but I’m all about the really great sox. So, There is a second script that turns your keyboard into a keyboard (synthesizer) which you can download from here. Simply tar xzf soxsynth.tar.gz and cd to the soxsynth directory. run the script with ./soxsynth.
I have really enjoyed this sox with you. I hope it was as good for you as it was for me.

A Quick Update

Over the last few months I have been getting used to my new Distro of choice, Arch Linux. It has been an excellent experience so far. I am really enjoying my new choice of graphical desktop too, XFCE. The XFCE accessibility is in pretty good shape, but new progress is kind of slow, and the accessibility list almost never responds to queries. There is a lot of potential though, and I am hoping for the best. If you follow the arch installation guide and are interested in setting up XFCE with accessibility, you will need to install the orca and speech-dispatcher packages. Remember to run spd-conf before launching speech-dispatcher for the first time. One of the really great things about Arch Linux is you aren’t forced to use pulseaudio by default. So, if you hate pulseaudio as much as I do, remember to set your sound output to alsa in the speech-dispatcher configurations. To enable accessibility, you will need to add the following line to your .xinitrc
export GTK_MODULES=gail:at-bridge
That should be enough to get you up and running, if you decide to enter the wonderful world of Arch.

Vmail CLI Email Client

Vmail is one of, if not the most awesome email client I have ever used. If you are a fan of the vim text editor, you are going to love Vmail.
The documentation on the Vmail website explains everything you need to know about usage and installing, so I will not cover usage here. I will show how to install it in Ubuntu 10.04 and higher. The suggested installation method uses RVM which was a bit tricky for me until I figured out that it needed sudo to put programs in your executable path. To install, type the following:
sudo curl -L https://get.rvm.io | bash -s stable --ruby
After it downloads it will begin the process. Read the screen, then press q to continue. Enter the source command it gives you right before your prompt reappears, or just close and reopen your terminal. Next, type:
rvm install 1.9.3
This command may take a while.
gem install vmail
To update to the latest version, simply type:
gem install vmail
again. I am currently using Vmail as my primary email client, and I am sure, after trying it you will be too. One last thing, if you would like to set a script as your signature, you can do so by placing:
signature_script: /home/USER/path/to/script
in your ~/.vmailrc

Confucius say, “Fortune is fun!”

The fortune command can provide you with hours of entertainment. It shows a random saying, or fortune, when invoked. In Ubuntu you can get it with:
sudo apt-get install fortune-mod
There are several fortune packs you can get to get even more fortunes. to find out what all is available type:
apt-cache search fortune-
Fortune is very well documented, so to find out how to use it type:
man fortune
You can create your own files for fortune as well. To do so, open your favorite text editor, and write whatever you want. To end a fortune type a % on a line by itself:
nano my_fortunes
This is a cool fortune!
%
when you have all the fortunes you want in your file use the strfile command to make it’s .dat counterpart:
strfile my_fortunes
then type:
fortune ~/my_fortunes
If you searched through the available fortune packs and installed the offensive fortunes you may be interested in a fortune file I made. It is full of Confucius sayings. Simply download the Confucius fortunes and extract it.
tar -xzvf Downloads/confucius.tar.gz
Then, you can use it by typing:
fortune ~/confucius
or, if you want to put it in fortune’s path so you will get them at random:
sudo mv ~/confucius* /usr/share/games/fortunes/off/
These are placed in the offensive fortune directory for a reason. So, if you are easily offended, do not download or use this file. If I find more good quotes to put in it I will update the file, so you may want to check back from time to time.
Here are some interesting things you can do with your newly downloaded Confucius fortune file. You can, of course, use your own file, or just let fortune pick from all files, although you may want to use the -s switch for short fortunes. In irssi:
/alias confucius /exec -o fortune /usr/share/games/fortunes/off/confucius
If you have xcowsay:
sudo apt-get install xcowsay
you can get an interesting login with this small script, save as confucius-login:
#!/bin/bash
sleep 2
xcowsay “$(fortune /usr/share/games/fortunes/off/confucius)”
exit 0
Go to the System menu, Preferences, Startup Applications and add the script confucius-login to the list.
You can also add:
fortune /usr/share/games/fortunes/off/confucius
to your ~/.bashrc for a saying when you open your terminal.
If you left the confucius files in your home directory, simply replace the path with:
/home/YOURNAME/confucius
I hope you enjoy these sayings as much as I do. If you have any Confucius sayings that you think are great that aren’t included in this file be sure to leave them in the comments and I may add them to the file.

TinTin – Alter Aeon

For the latest information and installation instructions Please visit the tintin-alteraeon wiki.
I have spent several months working on a trigger pack for the CLI based MUD client tintin++ to play the MUD Alter Aeon. Although it is still a work in progress I believe it is ready for people to use. It comes with a detailed readme file, so I will not include instructions for use hear, but here is how to install.

Ubuntu installation>

To get everything set up in Ubuntu open terminal and type the following:
sudo apt-get install git-core tintin++ sox libsox-fmt-all

Mac Installation

To get everything set up on a Mac:
If you want, you can download, extract, and build the latest version of tintin++ from source. Get the source code from
the tintin++ downloads page The technical details for how to install from source are beyond the scope of this article. Tintin++, a slightly older version, is available in mac ports.
Install macports:
the macports installation page
Install xcode and its command line tools available free from the Mac app store. The command line tools can be found under the download button on the toolbar, it’s the last item in the components table.
Open terminal:
sudo port install coreutils git-core gsed sox tintinxx wget xz
To be able to use the alt key abilities provided in this trigger pack, open terminal preferences and on the keyboard tab check use option as meta. Finally, select the file menu and choose use as defaults.
If you are using the Voiceover screen reader, the following tips may make for a more pleasant experience. Make sure to have terminal open when adjusting these settings:

  • Press VO+F8 and in Utility Category select activities.
  • Click Add to add a new activity and give it a name like terminal.
  • Select verbosity checkbox, VO+right arrow to select verbosity button.
  • Set speech verbosity to medium.
  • select additional settings to include checkbox.
  • Select the navigation checkbox.
  • Click set navigation.
  • Set Initial Position of VoiceOver cursor to keyboard focused item.
  • Uncheck keyboard focus follows VoiceOver cursor.
  • Uncheck voiceOver cursor follows keyboard focus.
  • Uncheck insertion point follows VoiceOver cursor.
  • Uncheck VoiceOver cursor follows insertion point.
  • Set mouse pointer ignores voiceOver cursor.
  • Check allow cursor wrapping.
  • Check skip redundant labels.
  • Click close and close VoiceOver utility.

Downloading the pack

Now that everything has been set up you can get the pack with the command:
git clone https://github.com/stormdragon2976/tintin-alteraeon.git
The download will take a few minutes. I am currently in the midst of switching most things sound related over to the built in MSP sounds which will decrease download times eventually.
After the download finishes, change to the tintin-alteraeon directory:
cd tintin-alteraeon
Mac users will need to do the following:
cp modules/bash_utils.mac modules/bash_utils.tin
You should only need to do this once. Cygwin and Linux users do not need to do this step.
You must be inside the directory for everything to work. Once there you can set up your characters. To do so, type
./multicharacter-setup.sh
and follow the instructions.
After you have created all your characters they will be available under ~/charactername. So, if you character is named Finn, you get to the character by typing:
cd ~/finn/
After you have changed to your character’s directory connect by typing:
tt++ aa.tin
You will get the tintin++ credits and a suggestion for a MUD to play. To actually connect type:
login
This will connect you to the game and you will be presented with the login menu.

Keeping Up To Date

Do the following to check for updates:
cd ~/tintin-alteraeon/
git pull
This will download any changes to the code or inform you that the code is already up to date.

Other Notes

Be sure to read the readme file included with the trigger pack. Remember, the first time you login to the game using this pack to type the word:
load
and press enter. It sets your skills and spells as well as some other information into variables which are necessary for the pack to work correctly.

Windows Users

Windows users will need to install a package called Cygwin. The easiest way to accomplish this is with a small cygwin-installer program written by michael Taboada. Run the program and follow the instructions. If you would prefer to do it manually though, download the setup.exe available on the install page to your desktop (do not run). Cygwin allows Windows users to 00run Linux applications. In order to do this, you will need some Linux packages. You can access the cygwin GUI and install packages that way, but the best way to handle package installation is to pass the packages you want to the installer, because the GUI isn’t 100% accessible as far as I know. There are several packages you will need. The easiest way I have found to do it is to right click the setup.exe file on your desktop, create shortcut. This is where things get a little confusing, because now you may have 2 setup.exe files on your desktop. usually the setup file will have something like "shortcut to" somewhere in the name, but not always. In my trials though focus is always given to the shortcut after it is created. Right click the shortcut and select properties. There are a couple of edit boxes here. the one we are interested in contains the path of the setup.exe executable "C:\…\setup.exe"
Here, after the closing quote, is where you need to paste the following flags and package names:
-A -q -P bc -P cron -P curl -P cygrunsrv -P gcc-core -P gcc-g++ -P gcc-ming2-g++ -P git -P glib -P glib2 -P inetutils -P make -P nano -P pcre-devel -P screen -P sox -P util-linux -P wget -P zlib
Select ok, then to run setup.exe with all the flags, just press enter on the setup.exe shortcut and allow it to run. You may need to select a mirror from the list when it runs. The first option in the list is ok.
If for some reason the shortcut keeps reporting problems, copy everything you have in the target box including the path inside the quotes, click run from the start menu, and paste into the box that comes up and 000press enter.
You will need to add a server, the list is accessible, you can just select the first one in the list, click add, then pretty much click next until installation starts. After a few minutes everything should complete successfully and you should get a finish button. After that, Cygwin is installed.
Next, download the tintin++ source code .tar.gz file from Sourceforge and Save it to your desktop and do not extract it. If you are using Windows Internet Explorer, you may get a sound notifying you that the download has been blocked. To focus the information bar press alt+n then press space to activate it and allow the download.
Now, it’s time to open cygwin. To do so, under the start menu, click run. when the box opens for a command type:
cmd
and press enter. To launch cygwin itself type the following at the prompt:
c:\cygwin\Cygwin.bat
Note the C in Cygwin.bat is capitalized. All the other letters in the command are lower case.
If you would like to paste into the command line, you will notice that control+v is not enabled for pasting. You will need to press alt+space, arrow down the to "Edit" menu, and select paste from it.
When you press enter, you will be in the Cygwin terminal. The first time you run it it creates a few things like your .bashrc.
Now, it is time to extract and compile your downloaded tintin file. To do this you need to first extract it from the desktop. Here is where I must tell you about bash’s tab autocompletion feature. If you know the first part of something, but not the whole thing, you can type the first few letters then hit tab and bash will complete it for you. You will probably want to make heavy use of this in the next command because it will likely be different for each user. Adjust the path to the file acording to your version of Windows and user information:
tar xzvf /cygdrive/c/Documents\ and\ Settings/USER/Desktop/tintin…tar.gz
USER is your windows logon name. You can do /cygd <tab> c/Doc <tab> Desk <tab> tintin <tab> and each time you press the tab key the path will be completed until you have the whole path to the file. Press enter and the file will be extracted into your home directory and things will get a lot easier from now on.
After the extraction has completed, a matter of a couple seconds, do the following to compile tintin++:
cd tt/src/
./configure
make
make install
After that finishes type:
cd
to get back to your home directory.
Now, all that is left is to clone the git repository for tintin-alteraeon. The git repository houses all the code for the tintin++ trigger pack. You pull the code from it, and all the updates as well. Because cygwin doesn’t automatically install certificates for you, you will have to prepend each git command with:
env GIT_SSL_NO_VERIFY=true
For example, to do the initial clone of the git repository, you would type:
env GIT_SSL_NO_VERIFY=true git clone https://github.com/stormdragon2976/tintin-alteraeon.git
Note, I have been unable to get multicharacter-setup.sh to work in cygwin. You will have to creat links manually if you have multiple characters.
To read the README file in the tintin-alteraeon directory, you can open it in the Nano text editor:
nano README
When you are done with the file, press control+x to close it.
Incidentally, if you would like to install my talking-clock package in cygwin there is only a couple more steps required. You already have the packages you need installed from the list above. The only thing you have to do is install cron as a service. To do so, enter:
cygrunsrv –install cron –path /usr/sbin/cron –args -n
cygrunsrv –start cron
If you run into problems with cron in Windows this article may be of help.
Next, you need to write a short bash script so that espeak will work. You can use any synth that will take commande line input, but for this example we shall use espeak. Make sure you have the windows version of espeak installed from:
http://espeak.sourceforge.net/. Then, inside the cygwin terminal, type:
nano /usr/bin/espeak
The nano text editor will open, and you can paste the following 3 lines into it:
#!/bin/bash
“/cygdrive/c/Program Files/eSpeak/command_line/espeak.exe” “$@”
exit 0
Press control+x to save the file. It will ask if you want to save changes, press y, then it will ask for the file name, just press enter because you already gave the name when you opened the file. The path in the file may be different for you depending on your Windows version and configuration.
The final thing you have to do is make your espeak script executable. So, type the following:
chmod 755 /usr/bin/espeak
Now, you can test it out by typing:
espeak "hello world"
To set up talking-clock:
env GIT_SSL_NO_VERIFY=true git clone https://github.com/stormdragon2976/talking-clock.git
cd talking-clock/
chmod 755 INSTALL
./INSTALL
To test it you can type:
talking-clock
Talking-clock has lots of capabilities, including using soundpacks for chimes. It uses cron to schedule chimes and can chime 1, 2, or 4 times per hour. To make it chime two times an hour, for example, you would type:
talking-clock –cron 2
All the information you need for configuring talking-clock can be found in the file called README in the same directory as the INSTALL file.
Top open the README in the nano text editor:
nano README
To close it again control+x. If you accidently made changes just press n if it asks you if you want to save. And Nano will close without making any changes to the file.
Have fun and if you have questions leave them in the comments.

Command Line Lyrics Viewer


@include(“scripts/ads.php”);

If you are a fan of command line music players like Cmus, Pianobar, or Shell-fm you may have wondered how to get lyrics for the song you are playing. There is a program called lyvi that does just that. Originally called cmus-lyrics it was created to display lyrics for music playing in Cmus, the program has been expanded to handle Shell-fm and Pianobar as well as several other CLI music players. It uses glyr to download lyrics. I am sure glyr may be packaged in future releases of Ubuntu, but as I am using Vinux 3.0 based on Ubuntu 10.04, I have to compile it. So here are instructions for getting the latest and greatest glyr:
sudo apt-get install cmake libglib2.0-dev libcurl3 libcurl4-openssl-dev libsqlite3-dev python3.1
git clone https://github.com/sahib/glyr.git
cd glyr/
cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
sudo make install
Then, to get lyvi
cd
git clone https://github.com/ok100/lyvi.git
cd lyvi/
git checkout glyrc
For the program to work you will need to have music playing in one of the players it supports, Cmus, Last.fm, or Pianobar. I recommend using a multitermnal program like screen or tmux. When you have music playing, to launch lyvi while in the lyvi directory type:
python3.1 lyvi
It will find and download the lyrics for the currently playing song. You can press the letter a to toggle through lyrics, artist information, and guitar tabs.
There are a couple of additional steps you need to take for it to work with either Pianobar or Shell-fm. The setup is very well documented in the README>MD file in the lyvi directory.
This program is very well written and is hours of fun.

Easily Share Files and Directories with Dropbox’s Public Directory

After reading this Lifehacker Article, I was convinced that similar functionality is possible in Linux. turns out I was right. Here’s a script you can add to .gnome2/nautilus-scripts to add the same functionality without having a program constantly running in your system tray like is required for Windows users. further more, my script will zip a directory before copying it to Dropbox, so no need to right click each file individually if you want to share a whole directory. If you’re not sure how to get it set up, here are instructions:
open Accessories, Terminal
cd ~/.gnome2/nautilus-scripts/
wget http://stormdragon.tk/scripts/share-with-dropbox.sh
chmod 700 share-with-dropbox.sh
Now, you can right click any file or directory, select scripts, and click on share-with-dropbox to copy the file to your public directory and have the link automatically placed in your clipboard. This script requires that xclip be installed. From terminal:
sudo apt-get install xclip
enjoy, and I hope you find this useful.

Softphones for Linux

With the news that Microsoft has bought skype, Linux users are left wonderinf how much longer a Skype client will be available to them. Although Skype is currently the most popular internet calling service there are other options that work equally as well and have the added binnifit of being open source. Open source softphones use the SIP protocol. This means, in order to use a softphone, you need to get a SIP address. There are a lot of sites that offer free SIP addresses.

  • Iptel.org
  • Sip2sip.info
  • Ekiga.net
  • are great examples of sites that offer free sip addresses. Often your sip account will include some great features too like free voice mail, and the ability to get the voice mail emailed to you.
    After you have registered and gotten your SIP address you will need a softphone. once again there are several choices. My personal favorite is Linphone but there are also Ekiga Softphone, Twinkle, and a lot of others available for Linux. Softphones are available on all opporating systems, Windows, Mac, Linux, Android, etc all have softphones.
    After you have installed your softphone:
    sudo apt-get install linphonec
    in Ubuntu and Vinux for linphone, you need to configure it. This may be different for different softphones. Here, I will show how to set up Linphone using iptel.org as an example. One great thing about Linphone is it is usable in the terminal, so if you happen to be in a console you can still make and receive calls. The way you launch Linphone in terminal is by typing:
    linphonec
    You will get some messages as the program starts and finally a warning about video being disabled in linphonec. If you are in Gnome, for example, and using gnome-terminal you can enable it by typing:
    linphonec -v
    Then, to add your sip address type:
    proxy add
    Here is each of the prompts you will get an what should go in it:
    linphonec> proxy add
    Adding new proxy setup. Hit ^D to abort.
    Enter proxy sip address: sip:iptel.org
    Your identity for this proxy: sip:YourUserName@iptel.org

    Do you want to register on this proxy (yes/no): yes
    Specify register expiration time in seconds (default is 600): 3500
    Expiration: 3500 seconds
    Specify route if needed:
    No route specified.
    ——————————————–
    sip address: sip:iptel.org
    route:
    identity: sip:YourUserName@iptel.org
    register: yes
    expires: 3500
    registered: no
    ——————————————–
    Accept the above proxy configuration (yes/no) ?: yes
    Proxy added.
    linphonec> Registration on sip:iptel.org successful.
    If you are using linphonec you can get help on the commands by typing help. Most things are pretty simple, answer answers a call, terminate hangs up, to make a call do:
    call sip:UserName@sipprivider.whatever.
    If you start getting a lot of calls from what looks like just an ipaddress with no one there when you answer, these are called "ghost calls". They can be annoying as hell, especially when you get over 70 a day. One way to deal with these is to change your local sip port. To do so, edit your ~/.linphonerc and add the following lines under where it says [sip]

    sip_port=5065
    sip_tcp_port=5065

    There are lots and lots of softphones. If you have a favorite and would like to provide instructions for setting it up please do so in the comments. Please also say on which opp operating system it is available. Unless you are sure you are using IPV6 you will want to type the command ipv6 disable. If you do not do this you may not be able to connect.

  • Tip Jar