» Publishers, Monetize your RSS feeds with FeedShow: More infos (Show/Hide Ads)
Gimp is the standard bearer of high-end graphic design in Linux and it's a seriously beefy application. However, if you've spent years in Photoshop and Windows like I have, warming up to Gimp in Linux might take a bit of extra effort. I hope you believe as I do that the more you work with Gimp the more you will feel like that effort was worth it.
With that in mind, let's take some effort out of moving selections and paths.
Moving Selections
By "moving a selection" I'm referring to moving a selection's content, not the selection area itself. In Photoshop this is a simple Shift-Click affair and in Gimp, well, it isn't. Here is an example of a moved selection.

The secret to moving selections in Gimp is to first "float" the selection to it's own Floated Layer, at which point you can press "M" to move it along with its content. My Gimp custom keyboard setting for floating a selection is CTRL-SHIFT-L. Followed up by "M" for move. Speedy.
Moving Paths
It would also be nice if we could easily move paths as well. Below we see a path enhanced with the Gimp Draw Arrow Plug-in from the Gimp Plug-in Repository. The arrow looks fine, but it's pointing in the wrong direction and not exactly where we want it.

A secret to moving paths is ensuring that they are on their own layer. That way any move and rotate actions will move the path (along with the layer.) A possibly better approach to moving paths is to first convert them to a selection with "Selection -> From Path" or SHIFT-V. Once the path is a selection we can use CTRL-SHIFT-R and rotate just the arrow. We can also move it with "M" and either use arrows or the mouse. I should note that is the path is not first in its own layer, you can use the float selection process we described above upon converting the path to a selection.

Here's the final result. It might not be very pretty, but that doesn't take away from the satisfaction of being able to easily move stuff in Gimp.

This is one of those "posts for me" where I want to document something so I don't have to think about it next time. Today the thing I don't want to think about is updating Polly, a Twitter Desktop Client for Linux. There are several Linux Twitter Clients available and I happen to like this one. Here's a screenshot.

The app is written in Python and in active development, though you'll find some features like search not yet implemented. The home page is at https://launchpad.net/polly.
First thing we'll do to update to the newest version is download the tar.gz (current filename Polly-0.93.9 (pre-alpha 3.9).tar.gz.) We can then extract it at the command line, but the quickest approach is to simply double-click and extract to a ~/Downloads subdirectory. This is what the contents of the Polly subdirectory look like.

Here we want to go to the command line and NOT simply double-click on "Install", so we'll change into the ~/Downloads/polly subdirectory (let bash directory-complete help you) and run install as sudo.
~/Downloads/polly$ sudo ./install
Our new Polly executable is located in /usr/bin. On my most recent upgrade I had an issue with Polly not launching. If this happens to you the following terminal window should hold the key to a successful launch.

A couple of things to point out here. You see circled that we're in the /usr/bin directory where we type "polly" and can discover our problem. We're missing a module named "gdbm." This is a Python module which Polly requires and can be installed with
$ sudo apt-get install python-gdbm
shown at the command prompt.
There, no thinking about upgrading when the next Polly alpha is released!
If you do test driven development in Ruby on Rails you are probably familiar with running
$ rspec spec/whatever_spec.rb
at the command line where you'll see green or red, depending on the phase of the testing. Guard is a Ruby Gem that automates running your tests and monitoring filesystem changes so that when we change a _spec.rb file only those tests get run.
And it gets better when adding Spork to the process. Rspec has to reload the entire Rails environment each time it runs. The Spork Test Server solves this problem by loading the environment once, then maintaining a pool of processes for running future tests.
The very best feature of Guard is that you get continuous testing feedback after adding the Notify Gems in your Gemfile.
# Notify and Test Gems for Linux
group :test do
.
gem 'rb-inotify', '0.8.8'
gem 'libnotify', '0.5.9'
end
Here's a screenshot of Guard and Spork in action, providing RSpec Test feedback with Linux Mint Desktop Notifications at top right and all red-green details in the Terminal window bottom left.

I won't go into all of the configuration details, but to give you an idea of the setup required to enjoy continuous TDD feedback we
1) Add the Guard Gem and the Spork dependency to our Gemfile
group :development, :test do
.
.
gem 'guard-rspec', '2.5.4'
gem 'guard-spork', :github => 'guard/guard-spork'
gem 'spork', '0.9.2'
end
2) Add the notify gems (shown earlier)
3) Initialize Guard so that it works with RSpec.
$ bundle exec guard init rspec
This will also create our Guardfile which we'll want to modify so that Guard doesn’t run all the tests after a failing test passes.
4) We next bootstrap the Spork configuration with
$ bundle exec spork --bootstrap
and update our spec/spec_helper.rb to add environment loading. (not shown)
5) To configure RSpec to automatically use Spork we add the --drb option to our .rspec file
6) Rather than initializing Spork with Guard with
$ bundle exec guard init spork
we'll modify our Guardfile to initialize the Spork Server. (not shown)
At this point we can enjoy continuous testing feedback all day (and night) long!
$ guard
Yousa!
How many times have you heard people say that they need to keep a Windows PC around because they need it to do Quicken? I've heard it often. In fact, I'm one of those people, but I do not know for how much longer since I installed the very capable GnuCash on Linux Mint. Here's a screenshot of GnuCash, which you can see its checkbook function is nearly indistinguishable from Quicken.

You're probably wondering why this post is necessary. After all, if you want to install GnuCash or most other apps in Linux Mint you fire up the Synaptic Package Manager or you install it from the command like so.
$ sudo apt-get install gnucash
And both of those will fail, at least they did for me. GnuCash's installation messages were downright indignant, telling me to fix my broken packages before attempting to install GnuCash, that my libaqbanking33 resource was incapable of being updated, or some other nasty comment.
I did some digging into this and read some rather radical solutions, including re-installing the Synaptic Package Manager! It turns out that you just need to know where to look for GnuCash, as the default Mint Software Repositories which usually doles out bits of pure joy will instead feed you GnuCash heartbreak.
We need to add GnuCash's primary respository to our software source list, archive.getdeb.net. We do that with
$ wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
then
$ sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu quantal-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'
Notice the "quantal-getdeb" parameter. Quantal is the respository key for Ubuntu 12.x versioned software, which is the equivalent of Mint 14's base code set.
You'll want to do a Package Update next with $ sudo apt-get update, after which you can perform a $ sudo apt-get install gnucash and hopefully have a much more positive experience than the last time you did it.
I haven't started playing with GnuCash, but I'll get back to you if I'm still one of those people who keeps a Windows PC around to run Quicken.
If you are a happy Apache Passenger user you might lose some of that joy when your Rails site looks like this after an upgrade to Ruby 2.0.0.

This was particularly problematic for me since I had recently re-installed Ruby to reside in a personal home .rvm folder for Sudo Free Ruby with RVM. So I was looking at both a Ruby reconfig and a possible upgrade incompatibility issue. I was seeing 404s when trying to view a Rails Route URi and endless missing Ruby Gem errors.
Here's what I did to get the joy back, as my Passenger Apache Module is now properly handling Ruby 2.0.0 sites and using the Ruby Gems in my .rvm folder that it's supposed to be using.
First I installed the latest passenger gem using the pre-release option.
$ gem install passenger --pre
Notice, no sudo. Next I installed the latest Passenger Apache2 Module with
$ passenger-install-apache2-module
Again, no sudo. As written in the Phusion Apache User's Guide, passenger-install-apache2-module is actually just a user-friendly front end around the command rake apache2, which performs the actual compilation of Phusion Passenger.
When the Passenger Module compile is complete it will provide you with the Apache configuration you'll need to add to /etc/apache2/apache2.conf. Here's what that looks like.

When the output says /etc/apache2/apache2.conf, it MEANS /etc/apache2/apache2.config. That's important, at least in my experience it is. I plan on playing around with alternative Passenger load and configuration options for more Ruby Gemset version flexibility in the future, but I've found that if you put the Passenger config and load statements in their respective /mods-available/passenger .load and .conf files that Passenger will not load properly and throw up 404s on Rails Routes.
Hope this post restores Passenger and Ruby harmony for fellow Rail Folk after a Ruby 2.0 upgrade.
If you find yourself using sudo when installing and updating your Ruby Gems, sorry to have to be the guy to say it, but something is wrong with your Ruby setup. But hey, it works, right? Yes, but weirdness can result when gems are installed with sudo, and worse, your time is precious and it's being wasted when deep into a
$ bundle update
you have to start from the beginning because of a permissions issue on a particular gem requiring special attention.
I described how I installed rvm on Linux Mint and it was really really close to being accurate, but not quite close enough because to fix permissions issues on bundling I was typing
$ sudo gem install ...
to keep things rolling.
Then I discovered AJ ONeal's How to install Ruby (and RVM) on Ubuntu (for technotards.) If you follow the technotard way like this technotard did, you shouldn't have to type sudo again, and you'll be on your way to flexible ruby development and versioned RVM GemSets. Bundle updates should display successful completion with no sudo intervention each time, every time.

I recently came to the conclusion that I was spending too much time at the Linux Terminal command line navigating to my Rails Projects and knew there had to be a better way. All of my projects have the path /mintland/webapps/[PROJECT]. Given that all project folders had the same root path, it should be easy.
I needed a script to change to any [PROJECT] directory allowing me to type something like
$ ./myproj.sh [PROJECT]
which would change to the project folder I entered as a parameter.
Bash changes directories in the script's subshell, so I also needed a solution that would take me directly to the project folder without entering
$ . ./myproj.sh [PROJECT] (or $ source ./myproj.sh [PROJECT])
Enter .bashrc, the Bash Shell script run each time a new terminal window (bash instance) is loaded. I created two functions, rdir() which changes to the project directory, and rproj() which changes to the project directory and fires up Sublime Text.
rdir()
{
webappDirectory="/mintland/webapps/"$1
cd $webappDirectory
clear
}
rproj()
{
webappDirectory="/mintland/webapps/"$1
cd $webappDirectory
clear
subl $1.sublime-project &
}
If the project folder name was "demo_app", the command to change into the project folder would be
$ rdir demo_app
You can see how the "demo_app" parameter is processed in the bash script with the "$1" input variable.
If you're curious about the last line in rproj(), I use a [PROJECT].sublime-project file for each of my projects when loading Sublime Text, so when executed for our demo_app project example the line would be
subl demo_app.sublime-project &
Now THAT'S flexible directory navigation!
After moving from Microsoft Windows to Linux I discovered that I now think more in terms of efficiency, of using the power of Linux to get the job done better and faster. Most of us Linux geeks seem to always have a terminal window or two open, which means we spend a lot more time at the keyboard and less time with the mouse.
I found myself going back and forth between Chrome and a terminal window recently and knew there had to be a way in Linux to eliminate having to use the mouse to do so. Then I discovered Cinnamon's ALT-TAB window switching. Microsoft Windows users are no doubt laughing, knowing that they had this feature forever. I guess that's true, but I never used it, and probably not that many other Windows users do either.
The point is that Cinnamon supports efficient desktop navigation that efficiency-minded Linux users will want to use. Here's window switching with Linux Mint Cinnamon with ALT-TAB. No mouse required.

You can go for fancier window navigation with Cinnamon extensions like CoverFlow AltTab. Here's a screenshot of that.

Don't forget, since Cinnamon is based on GNOME 2, all of the GNOME keyboard desktop shortcuts are also available. Here's an excellent list of GNOME Keyboard Shortcuts at the LinuxMint.com Community site.
I read several instructions on upgrading RubyGems in Linux and didn't have much success until discovering the Rubygems-Update Gem. With Rubygems-Update keeping my RubyGems version current is no longer an issue.
Using one recommended upgrade approach
$ gem update —system
displayed the Debian "set the REALLY_GEM_UPDATE_SYSTEM environment variable" error message.
Fortunately it was then I discovered the Rubygems-Update Gem.
$ sudo gem install rubygems-update
$ sudo update_rubygems
Rubygems-update installed and RubyGems updated!
$ gem env
confirms we're up to speed with the latest RubyGems.
Big thanks to Sameera Gyan and his post Upgrading Ruby Gems on Ubuntu Linux. And of course, thank you to the authors of the RubyGems-Update Gem!
If you're like me you find yourself using cloud storage more and more. Most cloud services like the two I use most often, Dropbox and Ubuntu One, tell us that our documents are secure and I believe them. But I've been around long enough to know that bad stuff happens in the Cloud and that it's simply not prudent to trust any Cloud service with your most important data.
This is where GnuPG comes in. GNU Privacy Guard (GPG for short) gives you the confidence to store your confidential documents on any cloud service, using a key-based encryption and decryption system that is easy to implement.
You could use any number of approaches to protecting your cloud content. Using LibreOffice's Document Password feature is one approach, for example.

For most documents you want to store in the cloud that should be sufficient, but what if you simply can't take any chances? That's when you might consider GPG encryption and decryption.
Getting Started with GnuPG
GnuPG is installed with most Linux distributions, so there should be nothing you need to install. The first thing you'll want to do is create a personal Key. GPG key creation is well documented and found on many blogs and articles on the Internet so simply search for GnuPG Create Key and you're set. You will also see that there is nothing to it.
The Script
Now we'll want to create a bash script to encrypt and store our secure document in the cloud. We also might want a script to retrieve and decrypt the document if we want to share it from multiple Linux machines. So let's create a single script and use --encrypt or --decrypt parameters to specify the action we want.

We named the script gpgNotes.sh, so to run the script we go into the terminal and enter
$ gpgNotes.sh --encrypt
to encrypt and sign our document and copy it to the cloud, and
$ gpgNotes.sh --decrypt
to grab the file from the cloud, decrypt it and save it locally.
With GnuPG we can use the cloud with confidence!
Like most of us, my work is divided between a laptop and a PC and I use cloud services like Dropbox and Ubuntu One to share data between them. Grsync and Rsync takes data sharing to the next level, giving me the ability to synchronize updates among multiple Linux machines.
If you come from a Windows background, think of Rsync as a Robocopy for Linux. Rsync, like Robocopy, is an intelligent file backup command line tool copying only those files you specify. Typically we're only copying the files that have been modified since the last time Robocopy was run resulting in a very efficient copy process. Rsync has all of the capabilities of Robocopy with one big advantage, its Grsync graphical UI. Here's a screenshot of Grsync.

For the Rubyists out there looking at the source and destination properties of the above example, yes, Git or some other version control system is the best way to keep project files in sync, but let's ignore that point for now. Our purpose here is to demonstrate keeping files updated on multiple Linux machines.
Our example shows copying updated files from a machine to a cloud service. To complete the update on another machine we'd reverse the process. It should be noted that each task can be saved as what is called a "Session" in Grsync. This is a configuration file you create once and can use with multiple machines. I keep my Grsync Session Config files on a cloud drive so I can load the configurations from any machine.
You'll notice below how we can include additional properties for setting exclude and log files.

One of my favorite features of Grsync is the ability to perform dry runs as shown below. This gives you a preview of what files will be copied and confirms the process will copy the files you were expecting it to copy
Not only are you presented with a list of files that will be copied but a command line statement is generated from your GUI settings. You can use the command to learn more about rsync or use it in a bash script.

I hope I've demonstrated how darn handy Grsync and Rsync can be in keeping your files synchronized among multiple Linux machines.
According to Wikipedia, a Koan is a story, dialogue, question or statement used in Zen practice to provoke the "great doubt" and test a student's progress. When referring to learning Ruby, the Koans Project is a valuable introduction and learning tool.
The Neo Ruby Koans project gives you hands-on experience with the main aspects of Ruby, covering blocks, classes, constants, hashes, arrays and much more. It takes you through a series of subject-specific project test scripts where you provide the answers as in the following example.
array = [1, 2, 3]
new_array = array.collect { |item| item + 10 }
asset_equal __ , new_array
Your task is to fill in the "__" test assertion value.
Taking the Test
When you launch the project with
$ rake
the test will be evaluated displaying the success or failure of the test. Here's what that looks like in Sublime Text and a terminal session in Linux Mint.

Koans also requires you to write a few simple classes to support completed Test Assert definitions, like this one for determining triangle types.

Here's a sample Koans Test Assertion statement which the above Ruby definition needs to satisfy.
assert_equal :scalene , triangle(3, 4, 5)
How long it takes to complete the Neo Ruby Koans test obviously depends on your familiarity with Ruby. If you're starting out with Ruby the Koans Test Project is worth the investment, whether it takes you days or even weeks to find, um, enlightenment.
If you're like me you produce a lot of screenshots and want to highlight regions with a circle, like so.

Except that's just plain ugly if you're doing it in Gimp. I've used numerous graphics design packages on multiple platforms over the years and rarely did I encounter such ugly strokes. Surely Gimp could do better.
It turns out that it can, but Gimp makes you work a bit more for it. The secret to smooth strokes in Gimp is first to convert the selection to a path, then STROKE THE PATH. You can add keyboard shortcuts to make the process as easy as stroking a selection, so it's not really a big deal.


You can also improve the silky smoothness of your strokes by using the Paintbrush to stroke your path.

Don't allow yourself to furnish ugly strokes to your colleagues and clients. Make'm smooth by stroking the path. Here's the original image with the nasty stroked selection replaced with a stroked path.

The Blogger Rails Tutorial from JumpstartLab is a complete learning experience if you're beginning your Ruby on Rails adventure. While building a simple blogging application you'll touch on all of the basic aspects of Rails development. You'll be working with Models, Views and Controllers, creating routes, performing data migrations, using forms and partial forms, and working in the Rails Console.
Blogger also gives you hands-on experience installing and working with RubyGems. You'll be uploading files with the Paperclip Gem and even be adding support for logins and user accounts with the Sorcery Gem.
Let's look at some screenshots of the Rails blogger application. While you'll be building the application yourself from scratch, JumpstartLabs provides you with an application stylesheet to help you feel you're building an actual Rails app.



The Blogger Tutorial is a great way to become familiar working in a new editor if you're coming to Rails from another language or platform, or both. Here you see how the tutorial has you working in your editor as well as a terminal Rails Console to learn basic Ruby concepts or install new gems.

Not only does the JumpstartLab Blogger Tutorial give you hands-on experience building a working Rails application, it does so extremely efficiently with clearly explained and indicated console commands and code excerpts. While you feel you are building the application on your own, you are actually cutting and pasting much of the code from the tutorial into your application and console windows. You'll be learning a lot and learning it quickly!
Thanks to JumpstartLabs for this excellent Rails tutorial. If you're
getting started with Rails you need to give this tutorial a look.
As I recent Linux convert I am learning how to make the most of Gimp after years of using Photoshop, Paint.NET and the Snagit Image Editor in Windows. Gimp is a very capable graphics editing application, but it takes a bit of warming up to.
One of the ways to get more out of Gimp is by taking advantage of it's Custom Keystroke feature. Start in Edit -> Keystrokes.

Now enter keystrokes for your most common used tasks. I do a lot of stroking and resizing, so I added a simple "S" keystroke to launch the stroking dialog box. You can also use custom keystrokes for duplicating keystroke processes in other graphic design applications with which you're familiar, like Photoshop for instance.

You'll be surprised how much more productive you'll become in Gimp with a few keystroke settings.
First of all I bet you didn't know the Chrome History data was stored in a database on your hard drive. Interesting, eh? Here's how to get at it from a linux user's perspective. So everyone knows what we're talking about, your Chrome History is quickly retrieved with Ctrl-H or using the menu option.

To the Terminal
In Linux Mint the History "file" is found in
~/.config/google-chrome/Default/History
I say "file" just to mess with you, because it's actually a Sqlite database. Let's get querying!
We'll start by opening the History database

Looking Around
First we'll see what tables are found in our History file, uh, I mean database. haha! We can do that by entering a SQL command or by entering ".tables."

The urls table contains the most valuable information for our History pursuits, so we'll view the structure of urls and query to our heart's content.

If you're starting your Ruby on Rails adventure and learning the ropes you'll probably want to be able to quickly create new Rails applications in virtual directories on a single apache development site.
http://devsite/app1
http://devsite/app2
etc...
If so you may encounter configuration issues that you didn't see when getting your first Rails demo site up and running. Here we'll touch on a few gotchas you might encounter and how to quickly resolve them.
Let's start by creating the Rails application by going into the directory above where the app will reside and
$ rails new app1
Then we'll follow the Phusion Passenger documentation on deploying to a sub URI for Apache.
We want to make sure Passenger is enabled for our Rails application. We'll know we're onboard when we click on "About Your Application's Environment" link and see what we're supposed to see as opposed to a "/rails/info/properties Not Found" message. We covered the properties not found issue in an earlier post.

One additional point to remember when configuring Rails in a virtual directory is to set AllowOverride to "all" in the site root in your Site-Available config file.

Application Could Not Be Started

If you encounter an "Application could not be started" error when launching the Rails application, it's a good bet that either Node.js or Execjs are not installed, or both. Here's a guide on installing Node.js from David King, and for installing Execjs, a simple
$ sudo gem install execjs
will do the trick.
Hey, a Package Control to make it super easy to install packages in Sublime Text! Who doesn't want that? It's the first package you probably want to install in Sublime Text.
Here's Package Control in action.

Here's the definitive guide from Will Bond on installing the Sublime Package Control. I used the Manual Instructions of downloading the package and copying it to "Installed Packages" on my Linux Mint machines.
SublimeREPL is an excellent interpreter that runs inside of Sublime Text. If you encounter an error when attempting to load it containing "Could not find pry" it's because you're missing the Pry Ruby Gem. I know, sounds obvious, but it wasn't to me right away, thus this post.
Here are a couple of screenshots to show you what I'm talking about.


Pry is an IRB alternative and runtime developer console gem SublimeREPL uses and is easily installed in a Terminal window with
$ gem install pry
Restart Sublime Text and you're golden.
The default Ruby on Rails page contains an "About Your Application's Environment" link. Here's what it looks like.

If all goes well we will see info on our Ruby version, RubyGems, Rack and other configuration details. I was seeing this fine when using "rails server" to view the application in WEBrick, but encountered a
`/rails/info/properties' not found
when clicking on the link from my http://railsweb url. The issue was that my Passenger module and virtual site were not configured correctly. My first clue was that my passenger.load and passenger.conf file links were not visible in /etc/apache2/mods-enabled folder. So I enabled them the usual way.
$ sudo a2enmod passenger
$ sudo service apache2 restart
Then I updated my "railsweb" Virtual Host file in /etc/apache2/sites-available, adding the following lines
PassengerRuby /usr/bin/ruby
PassengerRoot /var/lib/gems/1.9.1/gems/passenger-3.0.19
PassengerMaxPoolSize 10
PassengerEnabled on
RailsEnv development
The PassengerRoot property points to your passenger gem root.
Okay then, hope that helps somebody.








