Posts Tagged ‘linux’

Install Phusion Passenger / mod_rails on a cPanel host

Tuesday, April 13th, 2010

I recently had occasion to set up Passenger/mod_rails on a cPanel server. There is some varying and dated information around the web, so I thought I would share current best practice:

First you’ll need to SSH to your server and perform all the following commands as root or via sudo:

$ su

Let cPanel set up Ruby and Rails the way it wants:

$ /scripts/installruby
$ /usr/local/cpanel/bin/ror_setup

Install passenger the normal way (see Passenger docs):

$ gem install passenger
$ passenger-install-apache2-module

Create /usr/local/apache/conf/passenger.conf with the lines that the Passenger install script tells you to add to your Apache configuration file, e.g.:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby

Include the Passenger config by editing /usr/local/apache/conf/httpd.conf and, somewhere near the beginning, adding:

Include "/usr/local/apache/conf/passenger.conf"

We want to make sure cPanel preserves our edits to httpd.conf when it does updates, so we need to run:

$ /usr/local/cpanel/bin/apache_conf_distiller --update --main

Restart Apache with

$ /scripts/restartsrv_httpd

Upload your Rails app to somewhere outside of public_html (e.g. ~/rails_apps/yourapp) or use cPanel’s “Software / Services > Ruby on Rails” functions to create a new one.

Login to your domain’s cPanel and go to “Domains > Subdomains”
Create a new subdomain whose document root is path/to/yourapp/public
Make sure it’s pointing to yourapp/public

Visit your subdomain and see your app running — easy!

Free Linux time tracking software

Tuesday, January 19th, 2010

I was reviewing my time tracking arrangements and thought I would share the results of my search for a better solution. I had specific requirements, so this isn’t for everyone, but I hope it might be useful to some. Results are ordered by my entirely unscientific rating system.

If you know of any I missed, let me know in the comments.

Required for consideration

  • Free
  • Runs on Linux
  • Access to data store (no proprietary web services)
  • Easy start/stop of tasks (i.e. don’t have to manually enter start and end times)

Important

  • Cross-platform
  • Open source
  • Work offline
  • Manually add/edit time
  • Nestable items
  • Export reports of total time spent on an item with breakdowns

Desired

  • Stop tracking activity when computer is idle or off
  • Reminder of current activity
  • Nice graphical reports
  • Tagging
  • Collaboration

Kimai

Pros:

  • Open source
  • Slick interface
  • Easily manually add or edit time entries
  • Tasks are assigned to projects, which are assigned to customers — this is as good as nesting, for me
  • Export reports filterable by customer, project, or task to PDF, XLS, CSV, or HTML
  • Same task can be tracked against multiple customers — as good as tagging, for my purposes
  • Multi-user, web-based
  • Freelance/consultant-specific features: rate, expenses, location, and total cost in reports

Cons:

  • Can’t work offline if installed on a remote server
  • No idle/off detection
  • No reminder of current task
  • No graphical reporting

Verdict: +8 / -4
Solidly fits my working requirements in a very nice interface, though I’ll have to consider whether I want to use it as a local installation and not enjoy its multi-user capabilities or install it on my server and not have access to it offline.

Project Hamster

Pros:

  • Open source
  • Easy, intuitive interface
  • Manually add/edit time easily
  • Nice graphical reports
  • Exportable reports
  • Configurable idle/off detection
  • Configurable reminder of current activity
  • Tagging (in repository)

Cons:

  • Not very cross-platform — only partial Windows compatibility, main focus is the Gnome desktop environment
  • Limited to one level of categories
  • Export totals per task only, not category
  • No collaborative capabilities

Verdict: +8 / -4
Does most of what I need it to do, and with a pretty good interface to boot.

Rachota

Pros:

  • Open source
  • Tagging, of a sort (spaces in the category field of a task cause it to be assigned to multiple categories at once)
  • Configurable idle/off detection (in development build)
  • Decent, filterable reporting
  • Exportable reports configurable by time period and filterable by task

Cons:

  • Sometimes confusing interface
  • Can’t easily add/edit time (coming in next version?)
  • Only one level of categories
  • Idle detection doesn’t really work, off detection doesn’t work all the time
  • No reminder of current task
  • No collaborative capabilities
  • Doesn’t exit gracefully when the computer shuts down

Verdict: +5 / -7
The interface isn’t great, but the real killer with this one is its inability to manually add or edit time. Hopefully this will improve as development progresses.

TimeSlotTracker

Pros:

  • Open source
  • Manually add/edit time
  • Nestable tasks
  • Export report of total time spent per task, filterable by date and parent task, to HTML, TXT, and CSV
  • Export customizable via XSLT

Cons:

  • No graphical reports
  • Clutters up home directory with non-standard files
  • Default export templates are unappealing
  • Configurable current task reminder which sadly doesn’t seem to work
  • No idle/off detection
  • No tagging
  • No collaborative capabilties

Verdict: +5 / -7
A simple cross-platform, open source time-tracker with limited export options and reporting; its inability to nest items and poor reporting won’t work for me.

Klok

Pros:

  • Nice interface
  • Great calendar view to easily add/edit/visualize time
  • Pie chart reports with easy drill-down
  • Nestable tasks

Cons:

  • Bugs (activity is sometimes saved with zero length)
  • Can’t export reports, only weekly or monthly time sheets (not overall project totals)
  • Not open source? Can’t find license or source code
  • No idle/off detection
  • No reminder of current task
  • No tagging
  • No collaborative capabilities (apparently coming in next version)

Verdict: +4 / -7
Despite the pleasantly useful interface, the shortcomings (namely the occasional bug and lack of report exporting) mean it doesn’t fulfil my needs. Those who don’t need the exporting or other features may enjoy it, however.

Time-Tracking-Tool

Pros:

  • Tasks can be nested
  • Report on total time spent filterable by task and time period
  • Save application data for reopening elsewhere
  • Edit recorded time for a task

Cons:

  • Not open source? Can’t find license or source code
  • Reports overly simplistic, don’t handle subtasks well
  • Can’t export reports
  • Can’t view or edit start and end times of activity
  • No tagging
  • No idle/off detection
  • No reminder of current task
  • No collaborative capabilities

Verdict: +4 / -8
Perhaps useful for those who like simplicity, but the uncertainty around its license and its omissions make it a non-starter for me.

Baralga

Pros:

  • Open source
  • Save application data for reopening elsewhere
  • Manually add/edit time

Cons:

  • Interface clunky in places
  • Can’t nest tasks/projects
  • Can’t export reports, only an Excel spreadsheet or CSV file containing time spent per project per day
  • Only one, limited visual report
  • No idle/off detection
  • No reminder of current task
  • No tagging
  • No collaborative capabilties

Verdict: +3 / -8
A simple cross-platform, open source time-tracker with limited export options and reporting; its inability to nest items and poor reporting won’t work for me.

Other options

These are a couple that piqued my interest but weren’t worth trying out because of a lack of cross-platform compatibility.
Windows-only:

64-bit Lightning 1.0pre builds for Linux

Monday, October 5th, 2009

Update: An official 64-bit build of of Lightning 1.0 beta1 is now available.

Ever since I switched to 64-bit Linux, I’ve been looking around for up-to-date 1.0pre builds of the Lightning calendar extension for my Thunderbird 3 mail client, as Mozilla for some reason does not provide 64-bit builds. For a time I was using a build from zaera-holo.net, but it was never updated and the site now appears to be down. Finally, from a comment on the Lightning AMO page, I found a new build from Friday, which appears to work well. Hope this helps others out as well.

If anyone finds a more regularly-updated channel, please let me know.

Adobe AIR on 64-bit Linux

Tuesday, September 29th, 2009

Was installing AIR last night on my nice new Studio XPS 13 laptop, recoiling in horror at Adobe’s workaround installation instructions for 64-bit Linux, when I found these simple instructions:

Install Adobe AIR Linux 1.5 on 64-bit Linux distributions

So Adobe has this knowledge base article — Install Adobe AIR Linux 1.5 on 64-bit Linux distributions — to describe how to install Adobe Air on 64 bit linux systems. Do yourself a favor — just install wine from the standard repositories, and then execute the last line in the instructions:

sudo cp /usr/lib/libadobecertstore.so /usr/lib32

Wine already sets up a complete 32bit compatible environment, so you
don’t have to worry about manually breaking out shared libraries.

Much easier.

Courtesy of the MC Studios blog.

travelling geek

Wednesday, March 29th, 2006

Just a quick geeky note — the free internet workstation at this hostel, the Alberguinn in Barcelona, uses Ubuntu Linux, how cool!

sound for sabrent sbt-tvfm composite and s-video in linux

Monday, August 29th, 2005

Last year, I sent in a patch for the saa7134 linux kernel module (part of video4linux) to add support for the Sabrent SBT-TVFM tv tuner card. Unfortunately, I didn’t get the chance to test it beyond the TV and radio, but a couple people were kind enough to e-mail and point out that the audio settings for composite and s-video were wrong. The first person e-mailed something like nine months ago, but then I forgot about it until someone e-mailed today, at which point I got off my lazy ass and sent in the dinky little patch that I should have made last year. Here’s the diff against the latest CVS snapshot (2005/08/10) for anyone interested:


--- saa7134-cards.old 2005-08-29 15:06:41.987728113 -0400
+++ saa7134-cards.c 2005-08-29 15:09:30.519188225 -0400
@@ -1374,7 +1374,7 @@
.inputs = {{
.name = name_comp1,
.vmux = 1,
- .amux = LINE2,
+ .amux = LINE1,
},{
.name = name_tv,
.vmux = 3,
@@ -1383,7 +1383,7 @@
},{
.name = name_svideo,
.vmux = 8,
- .amux = LINE2,
+ .amux = LINE1,
}},
.radio = {
.name = name_radio,

I haven’t tested it myself, but I’ve received more than one report about it. Hopefully I’ll do some more work on this in the coming weeks, specifically adding support for the remote at last, because I’m going to be using the card to set up a media center for my family.

liferea

Friday, August 26th, 2005

Still searching for a good RSS reader… Just a note to myself to try out Liferea when I get a chance, io_error says it’s good. I’m currently using Sage for Firefox, but it’s annoying because it doesn’t automatically update the feeds and I wish I could see just a little more information about each feed item before having to click it. I do like its compactness, though, and the fact that it’s right there in Firefox, where I spend a lot of my time.

palm vx internet networking over serial

Thursday, August 18th, 2005

So I saw that Métro had an updater program, called MétrUp which will update the program and all installed city files if run when the Palm is connected to the Internet. Looking into it, I discovered that one of the Palm networking options was to use serial! So, I checked it out and sure enough I was able to put my my Palm Pilot Vx in the cradle and route its networking through the serial connection and my computer. It was really pretty easy, and I did it following the steps at the end of this page. The “Point to Point networking on Palm” HOWTO is even more detailed, check it out if you need an explanation of a specific step or want to tweak.

amarok 1.3 released

Monday, August 15th, 2005

The newest version of my favorite music player/library program ever has been released – Amarok 1.3! I’ve been using the betas, and I have to say, there are some terrific improvements and it really works great; I love it even more. Do yourself a favor, ditch Juk, Rhythmbox, or whatever you’re using, and switch to Amarok. If you’re using WinAmp or iTunes for Windows, you just have a whole ‘nother set of problems…

bash script to convert 15fps mjpeg to mpeg-2

Saturday, July 30th, 2005

This sort of came up in #openvideo on FreeNode, so I figured I should post this conversion script I wrote, in case it comes in handy to anyone else.

#!/bin/sh
# Script for converting my Canon SD110 videos to something usable by Cinelerra.

if [ -z "$1" ]; then
echo "Give me a file, biatch!"
echo "Usage: videoprep.sh filenames"
exit
fi

while [ ! -z "$1" ]; do

if [ ! -e "$1" ]; then
echo "$1 does not exist!"
exit
fi

filename=$(basename "$1" .avi)

lav2yuv +n "$1" | yuvfps -r 30:1 | mpeg2enc -o $filename.m1v

lav2wav -I +n "$1" | mp2enc -o $filename.mp2

mplex $filename.mp2 $filename.m1v -o $filename.mpg

rm -f $filename.m1v $filename.mp2

mpeg3toc $filename.mpg $filename.toc

shift
done

echo "Done!"

exit 0