Chris Jean's Blog

Linux, WordPress, programming, anime, and other stuff.
twitter
rss

Archive for Linux

All of the WordPress themes that I work on for iThemes are managed as Git repositories. Recently, we moved past the 100 repositories mark. That’s a lot of repositories to manage, and unfortunately, too many of those repositories contain duplicated information.

Later on, I might delve into how we use Git to manage our theme repos. For today, however, I’d like to focus on how I quickly and easily pushed up changes to more than a dozen repos in a single, albeit long, Bash command.

I had finished making updates to 16 Flexx repos, and I needed to push all of those changes up. Since I had multiple working repos in that folder, I was lucky that each of these repos began with the text “Flexx”. Also, since they are all part of the same series and need to keep the same version number, that simplified the tagging as all could be tagged as 2.5.0.

Given this information, I simply ran the following command from the directory that contained all the repository directories:

for i in `ls|grep Flexx`; do echo “— Pushing $i”; cd $i; git commit -am ’2.5.0′ && git push && git tag 2.5.0 && git push –tags; cd ..; echo “— Finished $i”; done

There’s a lot going on here, so I’ll break it up and explain what I’m doing.

Continue reading “Updating Multiple Git Repositories Easily Using Bash for Loop”

In Linux, clicking the middle mouse button (or mouse wheel) pastes the most recently highlighted text from any application. This is useful; however, it has an extremely-annoying side-effect in Firefox. Whenever I middle-click outside of entry fields, I get an annoying pop-up that says: “The URL is not valid and cannot be loaded.” This frustrates me to no end. It usually happens when I accidentally nudge my mouse and miss middle-clicking a link in order to open it in a new tab.

So, why is it doing this? Turns out that, by default, Firefox for Linux allows you to use this middle-click to paste functionality to allow you to navigate to a highlighted URL simply by middle-clicking non-editable portions of the page. When an invalid URL is the result of the paste, the annoying popup appears.

Today, I found out how to get rid of this annoyance.

Open a new tab in Firefox and navigate to “about:config”. This will take you to an interface that allows you to tweak and configure very specific functionality of Firefox.

In the “Filter:” text box, enter “middlemouse.contentLoadURL”. This should present a single entry that lists the option as having a value of “true”. Simply double-click the listing to change the value to “false”. The effect is instantaneous.

Now when you middle-click outside of editable areas in Firefox, it will no longer try to navigate to a URL. This change only modifies the navigation to URL functionality; the middle-click to paste in editable areas still functions.

If you like the middle-click to scroll functionality found in other browsers/operating systems, then search for “general.autoScroll” and double-click the listing to change it to true. Now you can middle-click to initiate scrolling.

Updated for Firefox release 3.5.5

Firefox 3.5 was released yesterday. This is an exciting new release complete with features such as support for HTML 5, video and audio that works in the browser without the need for plugins, a much faster Javascript engine, a native JSON parser, private browsing mode, support for SVG transformations, and other great enhancements.

I’m sure that you’re just as excited to get started with Firefox 3.5 as I was yesterday when I heard the news. But wait! We’re on Ubuntu, we can’t just install whatever we want, we need to wait for a package. Right? Wrong.

Here’s a really quick way to get 3.5.5 running on your Ubuntu 9.04 system.

Continue reading “Upgrade to Firefox 3.5 on Ubuntu 9.04 – Jaunty Jackalope”

Now that I know how to do this, it seems so easy and straight-forward. To change the default application files of a specific type are opened with, do the following:

  1. Right-click a file that you wish to change the default application for and select Properties.
  2. Click the “Open With” tab.
  3. Select the desired application’s radio button.
    • Additional applications can be added if the one you want is not listed. Use the Add button to find the desired application.
    • You can also remove applications from the list by highlighting the application and clicking the Remove button.
    • Adding applications to or removing applications from this list changes which applications are available in the “Open With” option when you right-click a file.
  4. Click the Close button.

Again, it seems so easy and straight-forward now. Go figure. :)

It’s been a month since my last post. For all my regular readers, I’m very sorry for the absense.

There’s a lot of intersting stuff going on right now. Fortunately, with so much going on, I shouldn’t have a lack of topics to talk about.

To get the old post ball rolling again, how could I not start back up with Ubuntu 9.04?

Continue reading “Gaarai is Back and the Jackalope is Jaunty”

Linux has many great tools built in that help maintain the system without user intervention. One such tool is Cron.

On my Ubuntu 8.10 system, there are many things that are set to run each day: locate database updates, misc cleanup utilities, automatic package updates, log rotations, etc. All of these are managed by the Cron system.

For a while, I needed to manually run the updatedb command to update the locate database, and I never thought about why. The problem is that my daily, weekly, and monthly Cron jobs never run. The reason for this is that these Cron jobs are scheduled to run very early in the morning, when my system is off. Thus, these job schedules never run.

The solution for this is easy. I simply need to change the times these run at to times when my system is on.

Continue reading “Changing When Daily Cron Jobs Run in Ubuntu”

As I mentioned before, I want to switch from using Subversion for project code collaboration and versioning to Git.

I’m switching not because I have some idealogical dread of Subversion or its methods. In fact, I quite like how much easier Subversion has made handling code collaboration. The problem I ran into is that Subversion has become doggedly slow and bloated.

For example, a simple project with a current working size of 2.9MB has a Subversion repository that is a massive 98MB in size. Furthermore, it takes a full four minutes to commit a change, even a simple one-line change to a text file. During this commit process, my server’s dual quad-core processors are essentially maxed. Why the repository has become so amazingly large and why the commits take so long, I’ll never know. The maxing out of my server for four minutes per commit is also unacceptable since there are times where minor changes will need to be made to more than a dozen repositories at a time. Multiply the number of commits by 4 minutes a piece, and not only is a terminal on my system tied up for more than an hour, but my server’s CPU is maxed for just as long.

Beginning last week, I dug into Git and learned what I needed to know. The initial impressions are great; however, Git is not without its problems either. The primary problem with Git is that its syntax is extremely-obscure, IMHO.

Continue reading “Goodbye Subversion, Hello Git”

These days, I really want to dabble around more with virtual machines. They have a lot to offer for benchmarking and failover protection. However, I always thought that you needed a host OS to run the virtual machines in. In my experience, this was clunky at best and riddled with problems such as automatted startup of virtual machines, stability of the host OS, and degraded performance.

I’ve used virtual machines lately with Sun’s VirtualBox, a free virtualization platform that can run virtual machines. This has been valuable for testing different distros, but wouldn’t suffice for running virtual servers. At least, it wouldn’t based on my experiences.

I have a friend that has worked professionally with virtualization technology for a few years, and he pointed me to a VMware product called ESXi. Not only is ESXi free, it runs as the native OS in which other OSes can run virtually.

I have yet to test it out, but it shows great potential. If you have any experience with ESXi, I’d love to hear it.

There’s a very good chance that you have already heard of the game World of Goo. If not, check out this video to get a taste.

This game has a number of great things going for it:

  1. It’s a heck of a lot of fun to play.
  2. The world if very unique and has a fun feel to it.
  3. The music really sets the mood for the different areas.
  4. It supports Windows, Mac, and Linux.
  5. It’s DRM free.

These days, I find great favor in things that 1) have Linux support and 2) are DRM free. Since World of Goo looked like a ton of fun and had both of those, the $20 price tag was nothing. Frankly, the price is very small when you consider the many hours of fun that you can have with all the goo balls.

I ran World of Goo both on one of my Windows Vista machines and on my Ubuntu machine at home. It worked very well on both platforms. Even the Linux version was very smooth even though I’m running Compiz.

FYI: If you want to run this on Linux, you can get the software as a DEB or RPM package or as a tar.gz archive with all the application files. I recommend usingone of the package files. Since the packages are built for 32-bit, you will need to use these instructions if you have a 64-bit distro.

I highly recommend World of Goo, but you don’t have to have blind trust in my opinion. You can download the demo and try it out for yourself.

You might be interested in their post about the release of the Linux version. The day of the Linux release, sales were 40% higher than their previous highest-selling day. “There is a market for Linux games after all :) ,” said one of the developers after updating the post.

I recently watched the entirety of the Revolution OS documentary. While it definitely is not a video that can be enjoyed by most people, nor even most computer users, it is a very intersting watch for a number of reasons.

Visiting the documentary’s site, you quickly gain a sense of what this documentary is aimed to be: “… the inside story of the hackers who rebelled against the proprietary software model and Microsoft to create GNU/Linux and the Open Source movement.” However, that’s not what this video is about.

When I first started watching the documentary, I thought I would get this intimate insight into how people made calculated movements against the growing monopoly of Microsoft’s operating systems. In fact, this isn’t anything near what actually happened.

Continue reading “A Good Video on the History of the Open Source Movement”