Introduction

Sometimes, you may only be able to connect to a Microsoft SQL (MS-SQL, or MSSQL) server through its SQL port, so you cannot use RDP to access the Enterprise Manager or other graphical tools on the host.  Other times, you may simply want to leverage the power of a Linux box.  ;-)   Regardless of the reason, if you want to connect to a MS-SQL server from a Linux box, read on…  As in previous posts, any installation or configuration instructions pertain to Gentoo.  Please adapt as necessary. … Also, these instrcutions were tested on MS-SQL Server 2000, so some instructions may need to be adapted depending on your version of MS-SQL.

Basics

FreeTDS offers an opensource command line client, tsql.  This is comparable to using Microsoft’s OSQL command line interface, although the arguments to launch the client are different.  Although it has various options, you launch tsql, like so:

tsql -S <sql_server_name> -U <user_name> [-P <password>]

If you are comfortable with OSQL, you will have no problem using this basic SQL CLI client.

Programmatic

Packagers are available for Perl, PHP, Python, and several other scripting languages, which provide an extensive, programmatic interface to the remote MS-SQL server.

References

  1. http://members.cox.net/midian/howto/phpMSSQL.htm
  2. http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2006-09/msg00108.html
  3. http://www.easysoft.com/developer/languages/perl/sql_server_unix_tutorial.html
  4. http://www.easysoft.com/developer/interfaces/odbc/linux.html
Share
 

Introduction

Suppose you have access to a remote MS-SQL database, and you need to analyze it.  Why?  Let’s pretend that you intend to migrate the contents to another server or database, like MySQL.  ;-)   Anyway, how do you discover various essentials about the database? … These instructions are for Microsoft SQL Server 2000.  The following instructions and results will probably vary wildly for other versions of MS-SQL.

Connect with TSQL

First, let’s connect to the remote MS-SQL using the tsql command line client:

tsql -S <sql_server_name> -U <user_name>

You may have another favorite method to gain command line access to the SQL database, but this is my current favorite.  :-)

Listing All The Tables in the Database

In our open SQL CLI, one site posted doing something like:

EXEC sp_tables
GO

Unfortunately, this does not list all the tables for some unknown reason.  I could see several more tables listed in MS SQL Enterprise Manager.  Most of my “user” tables were not reported by the above method, although some were reported correctly.

Another site indicated listing special system table contents, which I think is actually specific to ORACLE and newer versions of MS-SQL.  Maybe it will work for you?

SELECT * FROM sys.TABLES
GO

The same site also suggested the following, but it also returned partial results for some reason unknown to me.

SELECT * FROM INFORMATION_SCHEMA.TABLES
GO

Others recommend using “sp_help” with no arguments, like so:

sp_help
GO

However, I found that it returned far too much information, much more than just the list of all tables, although that did seem to be included…

Ultimately, I used this:

SELECT * FROM sysobjects WHERE TYPE='s' OR TYPE='u' ORDER BY NAME
GO

This returned a filtered list of system objects that had a type of either “system” or “user” table.  Very nice! :-D

Listing Table Structure

The structure of a particular structure can be listed, like so:

sp_help &lt;table_name&gt;
GO

Listing All Columns

Try this:

SELECT name, object_name(id) FROM sysindexes

Determining DB Size

Try this:

EXEC sp_spaceused [tablename]
GO
Share
 

Problem

Imagine you have an MS-SQL table that has LOTS of columns.  Some of the column names are known, but others are dynamically generated, and their names are not known at run time.  Now imagine that you suspect most of those unknown columns are empty.  How do you determine if any rows contain values in the columns, whose names are unknown?

Incremental Solutions

You could always just show all the values for every column of every row:

SELECT * FROM myTable

However, if your table is large, this may return too much data.  So, you could look for unique values, like so:

SELECT DISTINCT * FROM myTable

This works better.  However, if the known columns contain lots of unique data, the above T-SQL command may still return too much data.  Let’s try to focus on returning the unique values of just the unknown columns!

Final Solution

In our problem, all of the unknown columns begin with a known prefix, “UDA_”.  So, we need to get a list of the column names compiled in a comma separated list, suitable for a second SELECT statement.  We can do this, like so:

DECLARE @myColumnNames NVARCHAR(MAX)
 
SELECT @myColumnNames=COALESCE(@myColumnNames + ',', '') + COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE (TABLE_NAME='myTable') AND (COLUMN_NAME LIKE 'UDA_%')
 
SELECT @myColumnNames

These statements initialize a local variable, @myColumnNames, and then COALESCE, or compile all the column names from the myTable, which begin with the prefix, “UDA_”, into a comma separated list.  The last statement prints the variable value for debugging purposes, which might look like:

Finally, a simple select statement can be used to return the distinct values of these columns from our table.  The only problem is that you cannot substitute a variable directly into a T-SQL statement, so you have to build the necessary statement string and execute it, like so:

EXEC('SELECT DISTINCT ' + @myColumnNames + ' FROM myTable')

Putting It All Together

DECLARE @myColumnNames NVARCHAR(MAX)
 
SELECT @myColumnNames=COALESCE(@myColumnNames + ',', '') + COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE (TABLE_NAME='myTable') AND (COLUMN_NAME LIKE 'UDA_%')
 
EXEC('SELECT DISTINCT ' + @myColumnNames + ' FROM myTable')

If the above statements yield a single row with nothing but NULLs, then you know those columns are all empty!  Anything else indicates that at least one of the table rows, for at least one of your columns of unknown name, contains a value!

Share
 

Introduction

I recently switched from using Linux’s KVM to using Sun’s VirtualBox for virtualizing a Windows XP guest on a Gentoo Linux host, and I have been quite pleased. The only feature that I don’t have working is clipboard-sharing, but that’s a problem for another day. Previously, I had major problems with sound using my EchoAudio Mia card. Ultimately, I used ALSA’s dmix plug-in to mix audio streams in software, before feeding it to the card. That worked great! However, VirtualBox was complaining about the new setup, and start-up was defaulting the audio component to “null”. In other words, my VM guest had no audio support!

Two problems, Two Solutions

The primary problem was that I had enabled the “esd” USE flag for my Gentoo system, which enables Enlightenment’s Enlightened Sound Daemon (ESD, or ESounD). Apparently, the latest version of SDL (libsdl) does not function properly in the ALSA environment, if the esd USE flag is set. Well, VirtualBox depends on SDL for audio support; consequently, my VM guest could not produce audio. The solution was to add the “-esd” USE flag to /etc/make.conf and rebuild the dependent packages (emerge -uDN world).

The second problem stems from my use of ALSA’s dmix plug-in. Although this works fine for playback, the dmix plug-in cannot be used for capture. Therefore, an environment variable must be set to specify an alternative capture source, like so:

# Unset any output customizations, use default
$ unset VBOX_ALSA_DAC_DEV
# Specify capture (analog-to-digital converter) device - can also be added to ~/.bashrc
$ export VBOX_ALSA_ADC_DEV="hw:0,0"
# Launch my Windows guest VM
$ VBoxManage startvm "Windows XP SP2"
# wait for it...
$ sleep 3
# check log for results:
$ grep -Pi '(alsa|audio)' VBox.log
VirtualBox Command Line Management Interface Version 2.2.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
 
Waiting for the remote session to open...
Remote session has been successfully opened.
00:00:00.808 [/Devices/AudioSniffer/] (level 2)
00:00:00.808 [/Devices/AudioSniffer/0/] (level 3)
00:00:00.808 [/Devices/AudioSniffer/0/Config/] (level 4)
00:00:00.808 [/Devices/AudioSniffer/0/LUN#0/] (level 4)
00:00:00.808   Driver <string>  = "MainAudioSniffer" (cch=17)
00:00:00.808 [/Devices/AudioSniffer/0/LUN#0/Config/] (level 5)
00:00:00.808   Driver </string><string>  = "AUDIO" (cch=6)
00:00:00.808   AudioDriver </string><string>  = "alsa" (cch=5)
00:00:01.090 Audio: Trying driver 'alsa'.
00:00:01.093 Audio: set_record_source ars=0 als=0 (not implemented)
00:00:01.095 ALSA: ADC frequency 44100Hz, period size 1024, buffer size 4096
00:00:01.099 ALSA: DAC frequency 44100Hz, period size 940, buffer size 3763</string>

Now I could hear audio output from my VM guest, simultaneously while listening to audio from host applications, and I could also capture audio!

Incidentally, I extended my default ~/.asoundrc file a little, although it did not seem to make a difference:

pcm.!default {
    type plug
    slave.pcm "dmix"
}
pcm.dsp0 {
    type plug
    slave.pcm "dmix"
}
ctl.mixer0 {
    type hw
    card 0
}

References

  1. http://forums.virtualbox.org/viewtopic.php?f=7&t=18835
  2. http://forums.gentoo.org/viewtopic-p-5714588.html#5714588
  3. http://www.virtualbox.org/ticket/1908
Share
 

Introduction

Previously I blogged about using Alsa with EchoAudio’s Mia 96-kHz / 24-bit prosumer audio card. However, I have since experienced one nagging problem: Only one application can use the sound card at a given time! It is impossible for two or more applications to share the sound card. For a second application to use the Mia, the first app must be closed before the second is opened; otherwise, the first one will maintain a lock, blocking the second.

Many newer sound cards included integrated mixers, which allow multiple applications to simultaneously produce sound. Older sound cards depended upon software to perform the mixing. ALSA includes the “dmix” plug-in, which performs this very task.

ALSA DMIX Configuration

Typically, dmix is used automatically by ALSA, whenever it detects a sound-card without built-in mixing. Unfortunately, the ALSA driver for the Mia reports the card as having mixing capability, which it does not. Therefore, we must manually direct ALSA to use the dmix plug-in by default. ALSA is generally controlled through the “asoundrc” file, which can exist at the system or user level:

/etc/asound.conf
/home/my_user/.asoundrc

Several tutorials and HOWTO’s exist to set up ASLA’s dmix plug-in; however, these proved overly complicated, as I simply use:

$ cat /home/my_user/.asoundrc
pcm.!default {
    type plug
    slave.pcm "dmix"
}

This directs all applications to use the dmix plug-in by default. Now I can simultaneously play sound from multiple applications and without having to open and close each application in sequence!

System ALSA Configuration

Just for reference, my system’s ALSA configuration seems to use DMIX by default; however, it has never worked for me. I am including it here, just for reference:

$ cat /etc/asound.conf
pcm.swmix {
    type dmix
    # any unique number here
    ipc_key 313
    slave {
        pcm "hw:0,0"
        # these settings may require tweaking for different sound
        # cards; this is for the Powerbook's built-in snd-powermac
        # probably not required at all for well-behaved cards...
        period_time 0
        period_size 1024
        buffer_size 8192
        # mentioning rate fixes wrong speed/pitch in native ALSA stuff
        rate 44100
    }
}

# this makes OSS emulation via aoss default to using dmix, allegedly
pcm.dsp0 {
    type plug
    slave.pcm "swmix"
}

ctl.mixer0 {
    type hw
    card 0
}

# this makes native ALSA apps default to using dmix
pcm.!default {
    type plug
    slave.pcm "swmix"
}

Conversation with Giuliano Pochini

Giuliano Pochini is the author of the ALSA driver for the EchoAudio Mia. Recently, I posed my problem to him, as follows:

I am using your ALSA driver for the EchoAudio Mia PCI card. You have done a fantastic job! I really appreciate it.

One question: I am only able to use one application at a time to produce sound. If I want to produce sound in another application, I must close the first application, and then open the second.

Is it possible to have more than one application simultaneously produce sound through the Mia?

Should I use ALSA’s dmix plug-in, or is there a better solution?

To which, he kindly replied:

That card has 8 voices and 4 outputs. The vmixer controls how the voices are sent to the outputs. If your application uses default: or hw:x.0.0 or plughw:x.0.0 then it can use a single 1 to 8 – channels output. You have to use dmix to make alsa-lib mix the sound coming from differents apps. Otherwise you can manually configure your apps to use plughw:0.0.0, plughw:0.0.2, plughw:0.0.4 and plughw:0.0.6 and use the vmixer to route them to the ouptus as you prefer.

There is another way which requires some non trivial changes to the driver: make it automatically select the first free stereo pair when an application opens a substream. Drawbacks are that apps wouldn’t be able to open non stereo substreams anymore and that changing the volume would become problematic because you couldn’t know what channels have been assigned to each app. And, of course, there are only 4 stereo pairs available, all with the same sample rate, so dmix and resample are likely to be necessary anyway.

References

  1. http://alsa.opensrc.org/index.php/.asoundrc
  2. http://alsa.opensrc.org/index.php/AlsaTips#Share_a_single_card_with_multiple_applications
  3. http://alsa.opensrc.org/index.php/DmixPlugin
  4. http://alsa.opensrc.org/index.php/Hardware_mixing%2C_software_mixing
  5. http://www.alsa-project.org/main/index.php/Matrix:Vendor-Echo_Corporation
  6. http://www.alsa-project.org/main/index.php/Matrix:Module-mia
  7. http://www.webalice.it/g_pochini/ead
  8. http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
Share
 

Introduction

Some time ago, I blogged on missing, or broken icons in Gnome’s Evolution, when used in the KDE desktop environment, running on a Gentoo box.  Since then, I have migrated to KDE 4.2, and I have once again experienced the same problem.  I tried using each of the icon themes installed on my system, but none of the themes were complete.  Each one was missing icons – some more, others less.  Incidentally, the new “oxygen” theme seemed the most complete.

I submitted a bug report to Gentoo’s bug tracking site and received the following answer.

Solution

Here’s the workaround provided by Timo Gurr:

$ rm ~/.gtkrc-2.0
# emerge gtk-engines
# cp /usr/share/themes/Clearlooks/gtk-2.0/gtkrc /etc/gtk-2.0/gtkrc
# DIY:
     Edit /etc/gtk-2.0/gtkrc
     Add: 'gtk-fallback-icon-theme = "gnome"' as the first line.

Then restart Evolution.

This worked great for me! Hopefully, Gentoo will update portage include this procedure for the evolution, gtk, or gtk-engines packages in the future.

Share
 

Introduction

For some time, I have casually noticed that Gnome’s Evolution was not spell-checking my email messages.  Most other email clients, text editors, and even modern web-browsers, at least check your spelling as you type, underlining misspelled words with red wavy lines.  Evolution has this capability, but it was not enabled on my system.  Here is how I enabled spell-check on my Gentoo system for Evolution.

Solution

Gnome’s Evolution is dependent upon external spell checkers to perform this function.  Popular open-source checkers include ispell, aspell, and hunspell.  Aspell is newer than ispell, and was designed to replace it, at least according to aspell’s web-siteHunspell is an up and coming spell-checker, based on MySpell and backwards compatible with its dictionaries.  Apparently, Hunspell is used in many popular projects, such as:  OpenOffice, Mozilla Firefox, Mozilla Thunderbird, Opera, and Google Chrome.

All of these above spell-checkers are developed to be language independent; therefore, you also must also install a language specific “library” or “dictionary” to complete the installation.

Evolution appears to use aspell.  However, I installed all 3 spell-checkers and English dictionaries for each checker, plus a few other utilities, like so:

# emerge -pvt app-text/aspell app-text/gnome-spell app-text/ispell \
app-text/spellutils app-vim/vim-spell-en dev-perl/Text-Aspell dev-perl/gtk2-spell \
dev-python/gtkspell-python app-dicts/aspell-en app-dicts/myspell-en

Check to make sure you satisfied with the proposed installations, and then commit:

# emerge app-text/aspell app-text/gnome-spell app-text/ispell \
app-text/spellutils app-vim/vim-spell-en dev-perl/Text-Aspell dev-perl/gtk2-spell \
dev-python/gtkspell-python app-dicts/aspell-en app-dicts/myspell-en

After emerging the above packages and restarting Evolution, I was able to select dictionaries and enable the “Check as you type” feature by navigating here:

Evolution -> Edit -> Preferences -> Composer Preferences -> Spell Checking

Now I had nice red wavy lines everywhere! :)

BTW, I did encounter a problem where some of my dictionaries or checkers became corrupted, so I had to re-install (re-emerge) all of the above packages to fix the problem, even though I had previously installed these packages.

Share
 

Introduction

There are just a few applications that keep me tied to Microsoft Windows.  For work, there is primarily one, and it’s a bigee!  Microsoft Office, especially Outlook.  We have looked at a few other solutions previously that mitigate this problem by running Office on top of either Wine (a Windows emulation layer) or KVM (a Virtual Machine with a Windows installation).  However, I wanted something more complete.  I wanted a native client that could access my corporate email and calendar on a Microsoft Exchange server.  As far as I know, at this point in time, there is only one client that would claim such functionality – Gnome’s Evolution.

Installing Evolution with the Microsoft Exchange Connector plug-in is not so bad.  Under the hood, it’s a bit of kludge, accessing your email through Exchange’s HTTP interface, but hey, it works!  :)   The big question is, “How do I import all my Outlook data, archived in local PST files?

Unfortunately, PST is a proprietary Microsoft format (I know, you are shocked), and the only way to access it is through a proprietary Microsoft library (mapi32.dll or mapi.dll) that only exists on a Microsoft Windows installation.  (I know, again, you are flabbergasted.)

There are 3 types of solutions that I found to migrate and liberate your email.  None of them are trivial.  Yuck!  :cry:   All of them are potentially time-consuming, especially if you have lots of data, but here are a few pointers.  :)

Solution #1:  Migrate Through Mozilla Thunderbird on Windows

Assuming you still have access to your Windows machine that is running Outlook, you can install Mozilla Thunderbird on the same machine.  The advantage being that Thunderbird can use the proprietary library to import your Outlook email!

The importing process if fairly simple.  Roughly, it is:

  1. Install Thunderbird, and uses its import wizard to suck in your Microsoft Outlook email and contacts.
  2. Close Thunderibrid.  Find where it stored the email, usually in a place like:
    C:\Documents And Settings\<USERNAME OR DEFAULT>\Application Data\Mozilla\Profiles\default\XXXX\Mail\imported.mail
    where, XXXX is some random collection of letters and numbers.
  3. In Evolution, import each email folder (named after the email folder, saved as an extensionless file by Thunderbird in the MBOX format) — one at a time!  Yikes!

As you can see, there are a few problems here:

  1. You have to process each folder one at a time!  Very time consuming, tedious, and boring…
  2. You cannot have nested folders, especially with email in a folder with additional folders.  Thunderbird’s storage format (MBOX) is standard, but old.  In fact, it has been “hacked” to support nested folders.  That was not part of the original idea.  Anyway, things can get messy if you have lots of folders, especially nested folders with messages and sub-folders in the same folders.
  3. Furthermore, this does not really address your calendar.
  4. Some people have reported that Thunderbird drops some of their email!!!!

I gave up on this method somewhere between problem #1 and #2.  … This could still work for you, and it does for many people, provided you either don’t have many folders or you don’t mind lots of pointy-clicky.  ;-)   If you go this route, make sure you count the number of messages in each folder inside Outlook and verify those counts once you import your email into Evolution.  You don’t want to lose any email.

Solution #2:  Migrate Through Outport on Windows

This solution is very similar to the above solution, except it uses an open source tool, Outport, to migrate your email on a Windows machine.  Consequently, I believe it has the same limitations.  It may be able to migrate calendar, but I still don’t like the idea of having to import my email into Evolution one MBOX file at a time.

Plus, Outport seems to have not been updated since 2003.  That’s worrisome, but maybe it’s no big deal…  Anyway, I wanted something easier.

Solution #3:  Migrate via an IMAP server

You may be thinking, “What?  This is easier?”   Well, it was to me.  :)

An IMAP email server not only supports providing messages, but it also supports uploading them.  In most email clients, you can add an IMAP based email account and then simply “drag-and-drop” your email or folders from your local computer to the IMAP server, or vice-versa.

The basic idea of this method is roughly this:

  1. Setup or procure access to an IMAP server. (You have friends, right?  Gmail provides IMAP support too.  ;-) )  You will need to know the machine name, possibly the port number, account id, password, and authentication method (plain text, SSL, TLS, etc.).
  2. Add this server as an IMAP account to Outlook.
  3. Drag and drop all your email to the IMAP account.  (You may not be able to put folders inside the “Inbox”, but you can add them to the “root” of the account.)  I know this is still “pointy-clicky”, but it’s much less than the other methods.
  4. Close Outlook.
  5. Open Evolution.
  6. Add the same IMAP server as an account in Evolution.
  7. Drag and drop all your email from the IMAP account to your local store on Evolution.  Done!  Tada!!!  :-)

If you are worried about setting up an IMAP server, I have some basic instructions listed below.

Migrating Contacts

You can export your contacts in Outlook to CSV files or other formats, which you can read into Evolution.  Thunderbird can also read them and export them into other file formats, if you wish.  No biggee here.

Migrating Calendar Entries

This can be more problematic.  If you are like me, you may not have many entries, so I simply moved my calendar entries back up the Exchange server, using it as a temporary staging area.

Others have suggested exporting the Calendar entries up to Google’s Calendar and then back down to Evolution in iCal format.  Sounds good, but I can’t offer any experience on this method.

Setting Up A Temporary IMAP Server

I did not want to transfer all my email via Gmail’s IMAP server for lots of reasons (bandwidth, privacy, possible sub-folder complications, etc.).  So, I decided to set up my own local IMAP server on my Gentoo Linux box.  Here’s a few quick pointers, if you decide to do the same.

Install dovecot’s IMAP server:

emerge dovecot

Verify the configuration is set up to use the “maildir” format, not MBOX.  The “maildir” format was created by the qmail folks, and it has several advantages over the older MBOX format, including native sub-folder support.  Here are the important configuration changes that I had to make in /etc/dovecot/dovecot.conf. You may want to verify or research these further:

# Config file = /etc/dovecot/dovecot.conf
# This is required to enable network access - otherwise, it may be restricted to localhost only
listen = *, [::]
# This enables plain text passwords.
# This is not good on a public network, but works fine for private LAN's.
# And, it simplifies the login process in Outlook and Evolution.
disable_plaintext_auth = no
# This sets the mailbox format to 'maildir', and it stores the mail
# in your user's homespace on the IMAP server, avoiding
# various file permission problems on the remote box.
mail_location = maildir:~/.maildir

Then you fire up the dovecot server:

# /etc/init.d/dovecot start

And, away you go!

Conclusion

It’s not a pretty process, but if you bang your head on it long enough, you’ll get through it!  :-)   Just remember, freedom awaits all those who persist!  :-D   Good luck!

Share
 

Introduction

I recently switched to using Gnome’s Evolution groupware client for email and calendar management.  Although I really like Mozilla’s Thunderbird interface better for email, Evolution offers connectivity to Microsoft’s Exchange server, while Thunderbird does not.   Plus, Evolution provides built-in calendar support, which is still in the works as a plug-in (SunBird) for Thunderbird, and again, no Exchange connectivity support.  :cry:

Well, I am learning to like Evolution.  It has some nice features, like various spam filters plug-ins (Bogofilter, SpamAssassin).  And, it generally works.  But, now the question arises, how do I migrate my Evolution settings and email data from one machine to another?  Unfortunately, it’s not a simple matter of copying a single directory with its contents.  But, the solution is not too bad…

Solution

Evolution’s data and settings live in 4 places:

  • $HOME/.evolution – email data (Inbox, Sent, etc.)
  • $HOME/.gconf/apps/evolution – your account settings
  • $HOME/.gnome2_private/Evolution – your passwords
  • $HOME/.camel_certs – SSL Certificates, if any

However, you should not just close Evolution and copy these directories.  Evolution uses a calendar server and a Gnome settings server, which may keep some of these files open.  Therefore, you must shut-down Evolution and the appropriate servers, and then archive the data, like so:

$ gconftool-2 --shutdown
$ evolution --force-shutdown
$ cd
$ tar -zcvf evolution-backup.tar.gz .evolution .gconf/apps/evolution .gnome2_private/Evolution .camel_certs

This creates a compressed archive file, which can be copied to another Linux box and unarchived, like so:

$ tar -zxvf evolution-backup.tar.gz -C ~/

Others have recommended shutting down the Evolution and Gnome settings servers on the new machine, before installing the new files.  Afterward, the servers can be restarted, like so:

$ gconftool-2 --shutdown
$ evolution --force-shutdown
$ tar -zxvf evolution-backup.tar.gz -C ~/
$ gconftool-2 --unload evolution_setting.xml
$ gconftool-2 --load evolution_setting.xml

I did not have to do this, but it may be useful.

After doing this, simply fire up Evolution, and you should be good to go!

Share
 

Problem

Recently, I switched to using Gnome’s Evolution for my email and calendar groupware client on my Gentoo Linux workstation.  I encountered multiple problems that had to be worked.  One of the more noticeable and annoying problems was the messed up icons.  All of the button icons were pictures of blank paper with a red X in the middle, similar to a “file not found” icon.

Gnome Evolution with broken icons.

Apparently, this is a fairly common problem on new installs where people primarily use KDE and not Gnome.  Here is a collection of solutions that may help.

Solutions

Do you have any gnome icons installed?  Make sure you have at least gnome-icon-theme and hicolor-icon-theme installed.  For Gentoo, this is performed, like so:

# emerge gnome-icon-theme hicolor-icon-theme

Do you have read access to the installed icons?  For whatever reason, the installed icons occasionally lose their read permission.  As root, or using sudo, you need to ensure the appropriate permissions, like so:

# chmod -Rf a+rX /usr/share/icons

Have you configured all your Gnome-based tools, including Evolution, to use an installed icon theme?  As your standard, desktop user (not root), check for the existence of this file:

$ cat ~/.gtkrc-2.0

If it does not exist, or if it does not specify an icon theme, you need to add one, like so:

$ echo gtk-icon-theme-name=\"gnome\" >> ~/.gtkrc-2.0

Restart your Evolution email client and enjoy your pretty icons!  Red X’s be gone!!!  :)

References

Gnome Evolution with proper icons

Share
© 2012 Trevor's IT Blog Suffusion theme by Sayontan Sinha

Bad Behavior has blocked 82 access attempts in the last 7 days.