Finding Files with locate

Many Linux users use the ‘find’ utility when searching for files using the command line on their system. They’ll do a simple:

find / -name 'pattern'

Really though, the power of find isn’t just in finding names of files but rather specific details about those files. For example, if you wanted to find files which are writable by both their owner and their group:

find / -perm -444 -perm /222 ! -perm /111

or perhaps find any file that’s been altered in your Download directory in the past 24 hours:

find /home/user/Downloads/ -mtime 0

As you can see, the find command is very versatile and can be used to find an array of different attributes of files.  There are times though where I’m just looking for something and I don’t want to have to wait for the command to scan the entire directory tree in order to track it down.  That’s where locate comes in with quick and simple results.

Using the Locate Command

Using the locate command can only be accomplished if you install the mlocate package.  Most major distributions have this available.  If not, head over to the mlocate homepage and install manually.  Once that is accomplished, you’ll need to manually run a command to index your filesystem with it…otherwise, you’ll have to wait for the command to run automatically as it registers with cron to do so on a system level.  Open an terminal and change to your root user, then execute the following:

updatedb &

This updates the mlocate database that indexes your files and forks it to the background (the ‘&’ forks it to the background).  You can now logout of the terminal as root and the process will quietly work in the background.

After the command completes, using mlocate is as easy as using the locate command:

locate firefox | less

The command above will look for all files with firefox in the name and pipe the command through less so you can use the spacebar or enter key to scroll the file buffer.  Of course, the reason we pipe it through less is because any file that resides in the ‘firefox’ directory will be reported in the output.  While this tool isn’t as granular as the find command, it is a quick way to track down paths, directories, and files you know should exist.  Since the data is indexed using the updatedb command (by cron) the results are very quick and the command does not have to scan through the filesystem to return the results.

There are plenty more advanced options via flags (such as following symbolic links, making search term case sensitive, and even using regexp).  See the man page for details on how each of these options work.  Play around with locate and see what you can do!  It’s a powerful and quick search command!

Google News Redesign is Horrible

So, what do you think of the Google News redesign?

You like it???  Tell me where you live so I can come hit you on the head a couple of times with a tack hammer…we’ll see if that jars anything loose.  All kidding aside (no I don’t want to hit anyone on the head with a tack hammer), there is plenty of negative feedback on the redesign.  If you’re not sure what changed, the original Google News Blog announcement is here (with screenshots) and you can also see it on your own computer (for now…they may roll it out to other countries besides the US soon so this may not work perpetually) here is how to check:

  1. Login to your google account.  Go to http://google.com/news
  2. Now visit this link in a new tab:  http://www.google.ca/news

The difference initially looks subtle but once you start scrolling it blares like a fog horn in your head.  I’m not the only one who thinks the redesign sucks.  The original announcement is filled with negative comments about the redesign.  Look on the right hand column of the announcement to see related posts and you’ll quickly see there are plenty of people who despise this ‘improvement’.  Even looking in the google news general forum results in the most popular threads being discussions about how bad the redesign actually is.

People have even begun to label this redesign as the “New Coke” of Google products.  I’m thinking they may be right.  Don’t remember the New Coke snafu?

How Can We Tell Google Their Redesign Sucks?

Most people have been going to the support area for Google news.  In my opinion, this is ABSOLUTELY the wrong area.  Instead, head over to the blog announcement page and you’ll see a link to the Help Center.  Once there, on the top right hand corner of the announcement is a link to comments. As of the writing of this article there were about 15 comments on this change.

It is my theory that Google is only paying attention to this comments section and not to the thousands upon thousands of posts taking place inside their support forums.  Afterall, is complaining that the redesign sucks really a support issue?  Make your voice known by visiting the Help Center and dropping a comment via the comments link there.  Clicking this link opens up a sidewiki comment system.  Make sure you are signed into your google account when leaving a comment.

So what are the problems with Google News?

Tailored News – Google said the new redesign is “tailored to your interests” aka “news for you”.  Here’s the thing…I don’t want news tailored to my interests.  I want unedited and unfiltered news.  The reason I liked Google News in the first place was because I didn’t have paid sponsors results jockying to the front of the page.  I could read liberal and conservative news side by side.  I could get one side of the story and the other side of the story.

Now, I get only the side that interests me.  This doesn’t make for a well informed, rounded individual.  In other words, I want to see EVERYTHING and decide what to read…I don’t want that taken away from me at the beginning.

Scrolling – Congratulations Google!  It now takes me 6 pages of scrolling to see the same amount of news I used to be able to read in 2.  Boy I would have loved to be a fly in the wall on the meeting where the ‘stream’ concept was discussed…a big, monsterous fly so that I could have fly puked right on whoever thought it was a good idea.

Google news is now a facebook stream of news.  I don’t want that.  If I wanted a facebook stream of news, I’d create a facebook account and friend all the news agencies out there and wait for the news to stream to me.

It now takes me three to four times longer to read news than it did in the past.  I’m also getting a poor sample of the news.  I’m missing tons of articles I got in the past and headlines don’t pop like they used to.  It’s also HARDER to read when you’re scrolling 5000 lines of text.  For this reason alone the redesign is 20lbs of crap poured into a 10lb bag.

Local News – Local news went from having its own section to having 3 headlines.  Thanks for reducing my local news Google…I really appreciate that.  Good to know that I don’t need to be reading what’s happening right outside my window.

Fast Flip Reduction – Remember when fast flip was 3-4 wide across the bottom of your google news page?  Now it’s 1 article on the small right hand column.  WORTHLESS.  And of course, there is no way to get rid of it from your google news page.

Spotlight – What the heck is this section for?  What do these articles have in them that allows them to have a spotlight shined on them?  Do publications pay Google to be included in this section?  Why can’t I remove this section if I want to?

Most Popular – These articles are the most popular according to whom?  Am I just supposed to trust Google that they are the most popular ones out there?  Do publications pay Google to be included on this section?  Why can’t I remove it?

A good article that includes many of the reasons I discussed above can be found here.

The Squeekiest Wheel?? Alternatives??

So, if we complain en masse, will Google listen?  Does the squeekiest wheel get the most oil?  I hope so.

Until then, I won’t be using Google News. A suitable and tolerable substitution can be found at Ask.com…for those of you saying “Try Bing!” I did and it sucks.  Ask.com’s News Page is simple and doesn’t require me to scroll 40 times just to read news.  Thanks for keeping it simple Ask!  You’ve got a new supporter!

What do you think of the new google news?  Please let me know with a comment below.  The redesign hasn’t been rolled out in all areas yet so you may not see it in your location…however, be warned that it is probably coming.  Hopefully, Google will realize this move is the New Coke Snafu and backtrack to their original design…not because the features they want to implement suck, but because when implementing them, they made reading the news MUCH harder than it should be.

Interesting Statistics

Very interesting statistics that I’ve noticed since moving the site to a Linode VPS.

If you take a look at the graphic below, the spike in the middle will probably stick out quite a bit.  Oddly enough, the spike I noticed in CPU percentage used (which is regulated for VPS at Linode) also spiked up disk usage…mainly because I began to swap when cpu/ram use skyrocketed.  All of this happened with Ubuntu 10.04 installed.  CentOS was the first distro I tried but I quickly switched to Ubuntu when I spotted a really nice how-to in the Linode document library.  Oh, and please excuse my horrible gimp skills on the image below…it was a quick and dirty editing of the image:

cpu usage

After switching to Ubuntu, I began receiving alarms for my account due to the high usage of CPU and disk.  I attempted to tweak settings and configuration files for about a week and realized it just wasn’t going to work for me.  I switched to Debian Lenny and the move was a positive as is reflected in these pictures.

disk usage

I was hoping Ubuntu 10.04 would fit for me since it is a long term support (LTS) release.  CentOS is my normal server distribution of choice and I really wanted to branch out and go with something different.  I used a Linode Stackscript for WordPress for CentOS but elected for vanilla installs of Ubuntu and Debian aftwards (I didn’t like NOT knowing what was installed when I first logged in…call me a control freak).

I just found it interesting that Ubuntu 10.04 did so horribly in this instance.  After investigating, I found a couple of likely suspects:

  1. Default Apache install in Ubuntu leaves a lot to be desired..even after tweaking both it and PHP for days I couldn’t get them to lay off the resources.  Even switching to mpm_worker and FastCGI did little to settle things down.
  2. Ubuntu swappiness is bad…it is set at 60 (I use 10 normally) and it swapped every chance it could get…it’s set by default to swap more than it should.
  3. mod_php on Ubuntu is hungry for all your cpu and ram and disk; be warned!

Debian, as the parent distribution of Ubuntu, would most likely suffer from the same problems…except it doesn’t.  Things are working great with it and I’d recommend it for any of your server needs!  Has anyone else seen this oddity with Ubuntu 10.04?  If so, please drop me a comment below.

A Blip on My Posts

Hello everyone!

You may have seen a blip swing by in posting on the site with the default WordPress posting “Hello World” displaying as a new post.  This was due to my recent migration from Site5 shared hosting to a Linode VPS.  During the switchover, the database had not been uploaded yet as I was tweaking the webserver…feedburner detected a change in the RSS when DNS switched and BOOM!  The WordPress default post popped up saying hello.  I thought I had everything planned and timed perfectly but it seems I was off because of how fast DNS switched.

I apologize if this littered your inbox or your RSS reader.  I can promise some GREAT posts coming up.  I’ve been working on a file permissions and user groups posting to help new users out.  I’ve also inherited an older laptop with a PIII that I’ll be installing Salix on soon…I’ve decided to go with LXDE version of Salix 13.  Should be quite fun to see how that performs and report about it.  I’m also investigating Linux command line downloaders that can grab files from the web for you.  So lots of stuff on the horizon.  Once again, apologies for anything odd that may have popped up.

If you’d like to know more about the migration or have Site5 shared or Linode VPS questions, please drop me a line in the comments section.

Installing Openbox on Foresight Linux

My friend Og Maciel originally introduced me to Openbox a while back and I’ve been using it ever since. I love the lightweight feel, the ability to customize and the center around having NO icons on my desktop.  I don’t feel cluttered when I work! Today, we’re going to go over installing Openbox with some added tools.  This tutorial is tailored for Foresight Linux but the guide may very well serve other distros as well.

What is Openbox?

From the Openbox homepage, “Openbox is a minimalistic, highly configurable, next generation window manager with extensive standards support.”  From using it, I often think of it as fluxbox-like with the benefits of being able to dip into Gnome or KDE for the items that I want to use.  Your desktop will then run with speed and simplicity using only the elements you want to use with it.

So…Let’s get Started…

This How-To will assume that you’re running Foresight Linux, you’re logged into Gnome and that you’re familiar with conary, the package manager for Foresight.  First and foremost, install openbox:

[devnet@lostlap Desktop]$ sudo conary update openbox obmenu obconf

This installs the needed components to run Openbox on your system. Openbox is minimal by default though so if you login to the environment now for the first time, there will be no taskbars, nothing…just a large blank area for you to work with. We will need to install some extra components to give a bit more functionality. If you’d like a panel menu, I recommend using tint2. I used to use pypanel which is a small panel written in python but this panel is no longer developed.

There are other panels that are packaged with openbox in mind for Foresight; fbpanel is available, which is a very fast and functional menu bar. I like lxpanel also, which is fbpanel with some easier configuration options. For a full list, please see openbox documentation. For our purposes here, we will install tint2:

[devnet@lostlap Desktop]$ sudo conary update tint2

Now we need to copy the default configuration file for tint2 so we can build our panel to our liking.  You’ll have to create the default path for the tint2rc configuration file.  To do this and copy the config file:

[devnet@lostlap Desktop]$ mkdir -p ~/.config/tint2/
[devnet@lostlap Desktop]$ cp /etc/xdg/tint2/tint2rc ~/.config/tint2/

Now tint2 has a configuration file in place and is ready for Openbox to start.

Let the Configuration Begin!

The hard part (install) is now out of the way thanks to the conary package manager. Now we need to configure Openbox so that it’s ready for us when we log out of Gnome. The configuration files will need to be copied to /home/user/.config/openbox.  Of course, this path doesn’t exist yet so we’ll need to create it like this:

[devnet@lostlap Desktop]$ mkdir -p ~/.config/openbox/

Visiting there now will show that there aren’t any files in this directory.  The file we’ll absolutely need to place there is autostart.sh. Other files that will be in here are rc.xml which is for obconf (openbox configuration) and menu.xml (openbox menu system).  We’ll copy menu.xml from a default copy there later.  The other file should auto-create when loading for the first time (rc.xml)

The autostart.sh file is what starts all of our services and our tint2 panel we just installed as well as setup our wallpaper and other items.  Instead of going through the options you can place in here, I’m going to share my autostart.sh to get you up and running quickly.  Please note that if you chose not to install fbpanel and use the gnome-panel or other panel instead, you’ll need to comment the pypanel line below and uncomment what you’ll be using:

[devnet@lostlap Desktop]$  cat autostart.sh
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
##############################################################
# Panel Section
##############################################################
# pypanel, my favorite panel for openbox
#(sleep 3 && pypanel) &
# Use the wbar Launcher if you would like.  Don't forget to install it before uncommenting
# wbar &
(sleep 3 && tint2) &

#############################################################
# Gnome Integration Section
#############################################################
# This section let's Gnome give us some of its desktopiness
gnome-power-manager &
nm-applet --sm-disable &
/usr/libexec/gnome-settings-daemon &
gnome-volume-manager --sm-disable &
gnome-keyring-daemon &

###########################################################
# Other Add-on's for Openbox
###########################################################
# Make your wallpaper restore to last setting using Nitrogen.
nitrogen --restore &
parcellite &
volumeicon &
################################# End ###################

Download my autostart.sh

To create the menu system file for openbox, we’ll copy from the default installation to our .config/openbox directory (so we can use obmenu…otherwise, that command will give us an error) so use the following command in a terminal:

[devnet@lostlap Desktop]$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/

Now you’re ready to login and reap what you have sown 🙂 Logout of Gnome and change sessions in GDM to Openbox.  Notice that your tint2 panel starts up and has the gnome applications we recorded in the autostart.sh file above running and docked! You can add more options to your autostart.sh file and you can also edit tint2rc (in your /home/user/.config/tint2 directory) to store settings for your panel.

I’ve Installed and am Running, Now What?

Now you get to customize the Openbox menu with your favorite applications. Menus are activated by right clicking anywhere on the desktop. There are a few default applications…I choose obconf right away so that I can choose a theme I like and increase the text size since I’m using a high resolution. After that is done, I right click for the menu again and go to applications >> xterm. When the terminal pops up, I type obmenu. From there, I’ll be able to edit my right click menu.

Now instead of entering obmenu in a terminal each time, let’s add it to our right click options. In the obmenu window that you opened in the last paragraph, expand the Openbox 3 option. Find obconf and highlight it. Click ‘new item’ and add obmenu for a label, execute for action, and obmenu for Execute. This will add obmenu to your right click options so you don’t have to open a terminal each time to do things. You can also customize any of the items you find in applications…I put a few things I normally need such as thunderbird, firefox, gnome-terminal, etc. Feel free to add whatever you need…you can have many submenu’s . It’s setup is pretty straightforward.

Nitrogen, the wallpaper manager, requires a small tweak as well to get working. What I did was create a /home/username/Photos/Wallpaper directory and then loaded it up with my favorite desktop wallpaper. Good places to go for cool wallpapers are desktopography.com and vladstudio.com.  Next, install Nitrogen:

[devnet@lostlap Desktop]$ sudo conary update Nitrogen

After your first login, you’ll need to add a menu entry using obmenu to call the nitrogen browser. So create the menu entry and the action you call is:

nitrogen /home/username/Photos/wallpaper

Of course, replace ‘username’ with your users name.  This will allow you to open up all the wallpaper photos inside of that directory.

So What Have we Done?

Today, we’ve installed Openbox on Foresight Linux. We’ve given it a tint2 panel so we have a place to dock applications and we’ve customized the Openbox right click menu and added a wallpaper program called Nitrogen. Hopefully, this shows you the customizable features of Openbox and also shows you the speed that Openbox operates at. It’s a very minimalistic environment, yet one that can be very powerful.

Installation Notes of Interest

tint2

Tint2 is my newly crowned favorite panel for openbox.  It’s lightweight and is able to be configured in so many ways.  I added the sleep command inside my autostart.sh to make sure that the desktop is loaded before the tint2 panel tries to load…mostly, this is due to network manager wanting to animate while the panel loads.  This isn’t as much problem with tint2 as it is with pypanel (see below).

pypanel

Some things I’ve noticed when running openbox…network manager has problems with pypanel. I added the sleep command inside my autostart.sh and this is much better now…but there may be similar problems with network manager. It’s really NM searching for a network and it causes the panel to flicker a bit. Not a real show stopper.

Gnome-panel

Gnome-panel running inside openbox causes a few errors to pop up when I login. This could be due to the fact that I’ve started things in my autostart.sh out of order…I’m also not all together sure what is causing these errors. The problem seems to be with the docking area of gnome-panel as when I minimize programs they are not docked. Easily fixable, but annoying nonetheless.

Alternative Panels

There are quite a few alternative panels out there.  Fbpanel is one.  Perlpanel is another.  Fbpanel and lxpanel are available in the Foresight repositories. You can also add other launchers like wbar if you so desire.

Screenshot

Openbox on Foresight
Openbox on Foresight

Boxee is Changing the World

Television and Movies shape reality.

Just look at this medium over the past few decades and you’ll always find a TV series or movie that is a glass reflection of what is happening in the real world.  Movies and TV have the power to elicit strong emotional responses (i.e. The Notebook_or_insert_another_chick_flick_here) , invoke the ire of opposing groups (i.e. Expelled: No Intelligence Allowed), and even inspire people to unite under a common goal.  Anything that powerful and influencing with the reach that moves and TV have is a force to be reckoned with.

Stagnant Development and Stagnant Thinking

When development on something stagnates and no further advancement happens, often times that technology is abandoned.  An example of this is how voice-over-IP is changing how we do phones.  With Skype, Vonage, Google Voice, asterisk, and other amazing services the consumer is innovating while phone companies flounder.  Soon in the future we will see phone companies change to become absorbed by ISPs.  The same is true of Television companies.  With the onslaught of new media on the web and the ability to stream video from point A to point B, conventional media producers are being forced to become innovative to stay relevant.  The problem is that they don’t want to innovate.  They’d rather sit back and let the old way they operate things be the ONLY way they operate things.  A prime example is NBC’s fall from grace; from first to worst with no sign of improvement.  Time and time again they prove that they don’t “get it” at all…even up to NBC CEO Jeff Zucker saying that Boxee is stealing content from Hulu when they play videos…using this logic:  Opera, Safari, Firefox, and any web browser is “stealing” content by visiting Hulu.com and playing videos…because Boxee uses Mozilla Firefox to play Hulu’s content.

When big television finally gets this…they’ll get on board and they’ll be seen less negatively and more positively.  The first Television company to  fully partner with Boxee to offer full episodes will win.  What does winning mean?  It means that the PR exposure will be such a huge shot in the arm that the company will benefit across the board.  It also means that they get rich metrics on what people are watching, how often they watch, and when they are watching…all without even needing a Nielson ratings.  The first company to do this, in my opinion, will be the company all other broadcast corporations will chase.

How Boxee Harnesses the Power of Movies and TV

Boxee tames that reality shaping force for you.  Boxee changes the way you are entertained.  By changing how something is used or consumed, you change all those the thing reaches.  Instead of TV being brought into your home…YOU are bringing TV into your home on your terms.  Studios need to know that to gain control over something you sometimes have to give up control.

Boxee crawls the web for you and brings all television it can find (think CBS, ABC, NBC, Hulu, Netflix, clicker.com, tv.com) into a single interface.  You play your show in Boxee and can even rate it and/or share it.  People can subscribe to your boxee feed and know what you rated a movie or television show and perhaps watch it themselves.  However, the real power of boxee is the single interface.  This gives people the ability to launch a single program that can find TV for them.  The entry barrier to watching TV online is thus lowered.  That means that Boxee is a POWERFUL tool for television and movies…one not being utilized by those markets.

Boxee is taking a cross platform approach to things as well…it’s freely available for Linux, Windows, and Mac platforms.  This allows Boxee to be something EVERYONE can experience.

Boxee IS changing the entire world, one television at a time.  If broadcasting corporations don’t recognize this and work with Boxee…I’m afraid they may be left out in the cold during this change.  What do you think?  Does Boxee have the power to change the world?

If you’d like to know more about getting started using Boxee, please visit

http://www.howcast.com/videos/310743-How-To-Get-Started-With-Boxee

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.