September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  
99

Categories

Archives

[one-liner]: Firefox Already Running Dialog Box on Fedora/CentOS/RHEL

Problem

Sometimes you’ll get a dialog box that pops up saying that firefox is already running when you know in fact that it isn’t.

Firefox Already Running Dialog Box

Firefox Already Running Dialog Box

Solution

This is typically caused by the existence of 2 files in your ~/.mozilla/firefox/<profile> directory. For example in my case:

1
2
3
% ls -la ~/.mozilla/firefox/rhwevaqa.default/|egrep "lock |lock$"
lrwxrwxrwx  1 tstacct users       16 2010-06-22 18:49 lock -> 127.0.1.1:+11131
-rw-r--r--  1 tstacct users        0 2010-06-22 18:49 .parentlock

Just delete these 2 files and firefox should start right up.

References

For more info about Firefox startup issues check out this mozilla FAQ

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.

[one-liner]: Getting Rid of Google's Left Sidebar (2nd Attempt)

Problem

In a previous [one-liner] post I mentioned a quick way to get rid of Google’s new Left Sidebar. Here’s a screenshot from that post of the Google sidebar.

Google Left Sidebar

Well as of May 2010 it appears that the Google sidebar is back, and my hack of just deleting the google.com cookies no longer seems to permanently get rid of the sidebar. So now it’s time to bring out a bigger stick … greasemonkey.

Solution

If you haven’t heard of greasemonkey, it’s a plugin to Firefox that allows you to control elements of a page that you are viewing, essentially overriding the design of a given page. You can do things like get rid of sidebars, add your own buttons, etc. I’m not going to get into everything it can do, we’re only interested in getting rid of Google’s sidebar, and with greasemonkey installed it becomes a simple task.

First click this link: greasemonkey plugin to Firefox, and click on the “Add to Firefox” button on that page. Restart Firefox to activate the greasemonkey plugin. Next you’ll want to make use of a greasemonkey “script” that is freely available over on userscripts.org.

NOTE: The userscripts.org website allows users to share useful greasemonkey scripts.

The greasemonkey script you’re looking for is called Toggle Google SideBar. Each “script” on the userscripts.org website has a big install button on their respective pages, so just click that button to install it. Once you’ve done that you’re done.

Now Google search results pages will look like this with the sidebar visible:

Google sidebar open

…and like this when the sidebar is hidden:

Google sidebar closed

Notice the big [+]? This allows you to toggle the Google sidebar if you want to see it.

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.

[one-liner]: Getting Rid of Google's Left Sidebar (1st Attempt)

NOTE: Refer to this updated post regarding Google’s left sidebar

Problem

So around 12:30am (4/1/2010) I go to hit google and I’m presented with this left sidebar (see it in the screenshot below). Given it’s April 1st, my first thought went to … its an April fools joke. But after poking at it for a bit longer it seemed legit. So I tried it for like 30 seconds and it sucks. What can I say it’s a waste of space so it had to go.

Google Left Sidebar

Solution

The fix is pretty easy. Basically go into Firefox’s Preferences (Edit -> Preferences), under Linux, and delete the google.com cookies. The cookies are located under the privacy tab of the Preferences dialog.

Firefox Preferences Dialog

Firefox Preferences Dialog

NOTE: Make sure you delete just the google.com cookies.

Cookies Dialog

Cookies Dialog

And with that, Google’s back to normal.

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.

[one-liner]: Using Yum to Download RPMs under Fedora, CentOS, and RHEL

Background

From time to time I’ve run into an RPM that won’t install via yum. These usually pop up because I’ve mixed packages in from a 3rd party repository, and the 3rd party package has some overlapping files with an already installed RPM.

Problem

Here’s an example that happened to me recently on a Fedora 10 system where I was trying to install some pulseaudio related packages.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
% yum install xmms-pulse xine-lib-pulseaudio
Package xmms-pulse-0.9.4-6.fc10.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package xine-lib-pulseaudio.i386 0:1.1.16.3-2.fc10 set to be updated
--> Processing Dependency: xine-lib = 1.1.16.3-2.fc10 for package: xine-lib-pulseaudio-1.1.16.3-2.fc10.i386
--> Finished Dependency Resolution
xine-lib-pulseaudio-1.1.16.3-2.fc10.i386 from updates has depsolving problems
  --> Missing Dependency: xine-lib = 1.1.16.3-2.fc10 is needed by package xine-lib-pulseaudio-1.1.16.3-2.fc10.i386 (updates)
Error: Missing Dependency: xine-lib = 1.1.16.3-2.fc10 is needed by package xine-lib-pulseaudio-1.1.16.3-2.fc10.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

Solution

If you’re confident that this is a “false positive” type of error you can force your way around it like so. First download the RPM using the never mentioned command yumdownloader.

NOTE: yumdownloader is part of the yum-utils package.

1
% yumdownloader xine-lib-pulseaudio

Next try to install/upgrade the package.

1
2
3
% rpm -Uvh --nodeps xine-lib-pulseaudio-1.1.16.3-2.fc10.i386.rpm 
Preparing...                ########################################### [100%]
	file /usr/lib/xine/plugins/1.26/xineplug_ao_out_pulseaudio.so from install of xine-lib-pulseaudio-1.1.16.3-2.fc10.i386 conflicts with file from package xine-lib-1.1.16.3-18.fc10.i386

This is what I would consider a bogus error. For whatever reason, both RPMs share the same file, so let’s just install it already by doing a forced installation of the RPM.

1
2
3
 % rpm -Uvh --force --nodeps xine-lib-pulseaudio-1.1.16.3-2.fc10.i386.rpm 
Preparing...                ########################################### [100%]
   1:xine-lib-pulseaudio    ########################################### [100%]

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.

Syslog Message Levels

I can never find these clearly defined in any man page so I’m putting them here the next time I need them.

The list of syslog severity Levels

0Emergency – system is unusable
1Alert – action must be taken immediately
2Critical – critical conditions
3Error – error conditions
4Warning – warning conditions
5Notice – normal but significant condition
6Informational – informational messages
7Debug – debug-level messages

Recommended practice is to use the Notice or Informational level for normal messages.

A detailed explanation of the severity Levels

DEBUG:
Info useful to developers for debugging the application, not useful during operations

INFORMATIONAL:
Normal operational messages – may be harvested for reporting, measuring throughput, etc – no action required

NOTICE:
Events that are unusual but not error conditions – might be summarized in an email to developers or admins to spot potential problems – no immediate action required

WARNING:
Warning messages – not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full – each item must be resolved within a given time

ERROR:
Non-urgent failures – these should be relayed to developers or admins; each item must be resolved within a given time

ALERT:
Should be corrected immediately – notify staff who can fix the problem – example is loss of backup ISP connection

CRITICAL:
Should be corrected immediately, but indicates failure in a primary system – fix CRITICAL problems before ALERT - example is loss of primary ISP connection

EMERGENCY:
A “panic” condition – notify all tech staff on call? (earthquake? tornado?) – affects multiple apps/servers/sites…

Useful Links

[one-liner]: Analyzing a System's BIOS from the Commandline under Fedora 10

Background

A system’s BIOS is a treasure trove of a lot of useful info about the capabilities of a computer. BIOS, which stands for Basic Input/Output System, contains information such as:

  • motherboard manufacturer
  • system’s serial number
  • amount of RAM installed
  • the CPUs speed & signature

Normally the BIOS is accessible by pressing the delete key or the F1 key while your computer is booting up.

Problem

Occasionally I’ve wanted to check out the BIOS settings of a system without having to go through the hassle of rebooting. With the help of this nifty command line tool, dmidecode, BIOS info can be had, without having to reboot.

Solution

…from the dmidecode man page

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

The DMI table doesn’t only describe what the system is currently made of, it also can report the possible evolutions (such as the fastest supported CPU or the maximal amount of memory supported).

SMBIOS stands for System Management BIOS, while DMI stands for Desktop Management Interface. Both standards are tightly related and developed by the DMTF (Desktop Manage- ment Task Force).

Example output from a Thinkpad T42 laptop

When you first run the dmidecode command it tells you a summary of how many structures are present within your system’s BIOS.

1
2
3
4
5
% dmidecode 
# dmidecode 2.9
SMBIOS 2.33 present.
61 structures occupying 2126 bytes.
Table at 0x000E0010.

Each structure is represented by a handle ID which is a hex value of the form 0x001F, followed by it’s type and it’s size.


…. Continue reading → [one-liner]: Analyzing a System’s BIOS from the Command Line under Fedora, CentOS, or RHEL »»

Page 1 of 111234510...Last »