Jul
23
2010
0

Add Thunderbird to Indicator Applet in Gnome

As I’m using Thunderbird as my default mail program, I found it really annoying, that it is not as nicely integrated in Gnome on Ubuntu Lucid as Evolution is.

So, I was looking for a solution. Here it is :)

1. Getting rid of Evolution in Indicator Applet

Run sudo apt-get remove evolution-indicator

2. Install required packages

Run sudo apt-get install libnotify-bin. This is needed to make the Thunderbird extension work.

3. Install Thunderbird extension

Open the Add-On manager in Thunderbird and install “Gnome Integration“. After installation, restart Thunderbird.

4. Disable default Thunderbird notifications

In Thunderbird go to “Edit => Preferences => General” and uncheck “Show an alert“.

5. Add Thunderbird to Indicator Applet

Run sudo nano /usr/share/indicators/messages/applications/thunderbird
and insert the following line:

/usr/share/applications/thunderbird.desktop

What about a shortcut for composing a new message or open the address book?

Well, it is possible to add such shortcuts, but at the moment, you have to redo it after every update, as the file, you have to edit, will be overwritten.

Add the following lines at the end of /usr/share/applications/thunderbird.desktop:

X-Ayatana-Desktop-Shortcuts=Compose;Contacts

[Compose Shortcut Group]
Name=Compose New Message
Exec=thunderbird mailto:
OnlyShowIn=Messaging Menu

[Contacts Shortcut Group]
Name=Contacts
Exec=thunderbird -addressbook
OnlyShowIn=Messaging Menu
Jul
10
2009
0

Install NETWAYSGrapher V2 in Debian Lenny

A few steps are required to get NETWAYSGrapher V2 up and running in Debian Lenny. Especialy those missing Perl modules are annoying (I don’t like to have a dev environment on a server).

Here are the steps that I’ve taken to get NETWAYSGrapher V2 up and running.

WARNING: I suppose you’ve already installed Apache, Nagios and MySQL and everything is working!

1. Install required packages:

1
apt-get install php5 php-pear php5-xsl php5-gd php5-mysql php5-pdo libyaml-perl libyaml-syck-perl libcarp-assert-perl libclass-singleton-perl libclass-accessor-perl libsql-abstract-perl libparams-validate-perl liblog-dispatch-perl libset-crontab-perl libthreads-shared-perl libcache-fastmmap-perl libdbd-mysql-perl libuniversal-require-perl libterm-readkey-perl libproc-daemon-perl

2. Configure CPAN

1
perl -MCPAN -e shell

Let CPAN configure itself by answering ‘yes’ to the question.

3. Install additional CPAN modules

The following modules are missing in Debian Lenny repository or too old:
- Thread::Queue
- Thread::Cancel
- threads
- threads::shared
- Proc::Simple

I’ve created Debian packages which you can find here
You can also install those modules from CPAN.

4. Download NETWAYSGrapher V2

You can download NETWAYSGrapher V2 here
After downloading, extract the package.

1
tar xjf NETWAYSGrapherV2-2.0RC2.tar.bz2

5. Run collector dependencies check

Run the following commands:

1
2
cd <GRAPHERV2_SOURCE_DIR>/appkit/etc
../bin/phing test-collector-deps

If all went fine, you should see a message like

SUCCESS: All perl deps (modules) found!

6. Disable magic_quotes_gpc and run frontend dependencies check

Disabling magic_quotes_gpc:

1
2
sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/' /etc/php5/apache2/php.ini
sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/' /etc/php5/cli/php.ini

Running frontend dependencies check:

1
cd
1
<GRAPHERV2_SOURCE_DIR>
1
2
/appkit/etc
../bin/phing test-frontend-deps

If everything is working, you should see no error message, except missing PHP LDAP support, which is not required.

7. Edit build.properties and fit it to your needs

Run your favorite editor and edit

1
<GRAPHERV2_SOURCE_DIR>/appkit/etc/build.properties.

1
2
Change <em>perm.daemon-user</em> and <em>perm.daemon-group</em> to <em>nagios</em>.
Set <em>httpd.server_name</em> to <em>your server name</em>.

If your database is not running on the same host, edit the db-values, too.

8. Create database user

Make a connection to your database as root user and execute the following command:

1
2
GRANT ALL on ng2_db.* to ng2 identified by '&lt;yourRandomPassword&gt;';
GRANT SUPER on *.* to ng2;

9. Start installation

1
2
cd &lt;GRAPHERV2_SOURCE_DIR&gt;/appkit/etc
../bin/phing -Dproperties=&lt;ABSOLUTE_PATH_TO_build.properties&gt; install-all

10. Add it to Apache

In <GRAPHERV2_INSTALL_DIR>/appkit/etc/appkit_httpd.conf is a fully configured vhost config file.
Copy or link this file to /etc/apache2/sites-enabled and reload your apache.

After you’ve finished all steps, you can integrate NETWAYSGrapher V2 in Nagios.

If you have any questions, feel free to ask me.

Written by saz in: Debian, Lenny, Linux, Nagios, WebApps | Tags: , ,
Jul
10
2009
2

Run apt-get update automatically under Debian

There are a few different ways to run apt-get update. But there is already a cronjob included in the apt-package.

This cronjob is lying in /etc/cron.daily/apt and has almost nothing to do, because everything is disabled by default.

You can add the following lines to your apt.conf, to make things work.
Start your favorite editor and open /etc/apt/apt.conf (by default, this file does not exists).

- Run apt-get update everyday:

APT::Periodic::Update-Package-Lists 1;

- Fetch all upgradeable packages every 7 days:

APT::Periodic::Download-Upgradeable-Packages 7;

- Run apt-get autoclean every 7 days:

APT::Periodic::AutocleanInterval 7;

- Run unattended upgrade every n days (0 disables it):

APT::Periodic::Unattended-Upgrade 0;

You can disable the unattended upgrade by changing it to a positive value greater zero. But keep in mind, that this can seriously damage your system, if things go wrong!

If you like to check, if everything is working as excepted, you may be waiting a few minutes. The cronjob is using a random value for sleeping some time. This is useful, to make sure, that your systems won’t connect to your apt-mirror at the same time. But for testing, this is really annoying.
Let’s change it for testing. Add the following line to your apt.conf:

APT::Periodic::RandomSleep 5;

If you’ve finished testing, simply remove this line.

Written by saz in: Debian, Etch, Lenny, Linux | Tags: , , , , , ,
May
08
2009
13

Updated Patch for fixing missing LSB information in Openfire init-script

Here is an updated version of my patch for fixing missing LSB information in Openfire init-script. (Read more about it here)

The patch should apply cleanly to Openfire 3.6.4 init-script. If you have any problems, feel free to contact me.

Note: You need the ‘patch’ program installed (apt-get install patch).

UPDATE: I’ve corrected the patch command. Thanks ButterflyOfFire for pointing it out.

1
patch -p0 < openfire_364_fix_missing_lsb_information.patch

Written by saz in: Debian, Lenny, Linux | Tags: , , ,
Apr
03
2009
0

Multitail for viewing multiple log files

A better way of watching log files instead of tail with multiple files is multitail.

It’s using ncurses to display the files and that makes it much easier to understand.

Written by saz in: Linux | Tags: , , ,
Mar
26
2009
0

Why is my MacBook Pro 5,1 getting so hot under Linux?

I’m running ArchLinux for some time on my MacBook Pro, but since I’ve installed ArchLinux, my MacBook Pro keeps getting hotter than under Mac OS X. Today I’ve installed the proprietary driver from NVidia. And now? My MacBook Pro is almost as cool as running Mac OS X. Except if I’m doing a lot of stuff using OpenGL.

But why? I think it has to do with power management inside Nvidia driver. If you run nvidia-settings, there is an entry “Thermal Monitor”. You can see the current core temperature of your GPU. Now run glxgears and you will see, that the temperature is getting hotter and hotter. Another entry is called “PowerMizer”. There you’ll see the GPU and memory clock. If you’re still running glxgears, it will be at the highest level (on my system 500 MHz GPU, 792 MHz memory). Try stopping glxgears and wait a few seconds. The temperature is going down from about 80°C to 65°C in about 15 seconds, the GPU and memory speed is at the lowest level (169 MHz and 100 MHz). Less performance, less heat, less battery usage. Isn’t it nice?

I think Mac OS X is using the same technology. And the best: on my MacBook Pro the hottest section was on the left between keyboard and display. Now it’s a lot cooler, not as cool as running Mac OS X, but Mac OS X is using the Nvidia 9400M GPU, which isn’t available running Linux (maybe you’re able to use both GPUs if you boot using EFI? I don’t know).

If nvidia driver is able to change the frequency of GPU and memory, can I set it from “Maximum Performance” to “Maximum Powersave” or something like that? Sure. Nvidia driver is changing the frequency as needed. But if you want to have maximum battery life, you can set an option in xorg.conf.

You’re able to set three different modes:

mode=1 – Maximum performance
mode=2 – Balanced
mode=3 – Maximum power saving

You can also set different modes for running on battery and AC:

1
0x[Battery source strategy][AC source strategy]

This will set the mode to powersaving on battery and adaptive on AC:

1
"PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

To set this mode, add the following line to your device section in xorg.conf:

1
Option “RegistryDwords” “PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

If you want, you can enable another option entry in nvidia-settings for choosing the frequency by adding another line to the Screen section of your xorg.conf:

1
Option “Coolbits” “1″

More information:
nVidia PowerMizer powersaving in Linux
enable nVidia CoolBits (frequency tuner)
NVIDIA™ driver for X.org: performance and power saving hints

Mar
25
2009
2

Fix “Missing a temporary folder” in WordPress 2.7

As I was writing my article about the installation process of Openfire, I’ve tried to upload a file but got an error message instead of my file :( wordpress/wp-content/2009/03/wordpress_27_missing_tmp_directory-300×124.png” alt=”wordpress_27_missing_tmp_directory” width=”300″ height=”124″ />

Because I wasn’t able to upload a file, I’ve done a quick google search and found this blog entry
.

The problem was easy to fix: the upload_tmp_dir is not set in php.ini.

After adding

1
php_admin_value upload_tmp_dir /var/www/domain/php/upload

to my Apache Vhost-configuration and doing a reload, everything worked as expected.

Thanks, Dwight Jack!

Written by saz in: Apache2, Linux | Tags: , ,
Mar
25
2009
6

Install Openfire on Debian Lenny

If you’re looking for a good jabber/XMPP server with LDAP/Active Directory integration. Have a look at Openfire. It’s working really great and you can push contacts to your clients. No need for adding every employee of your company on your users client.

I’ve installed Openfire on Debian Lenny. Here is a short description, of what you have to do.

1. Enable non-free sources.list
You have to add the non-free repository to your /etc/apt/sources.list, because you have to install sun-java6-jre
(You can also use sun-java5-jre, but on my freshly installed Lenny, sun-java6-jre has less dependencies).

Here is my /etc/apt/sources.list:

1
2
3
4
5
#
# lenny
#
deb     http://ftp-stud.fht-esslingen.de/debian/     lenny main contrib non-free
deb-src http://ftp-stud.fht-esslingen.de/debian/     lenny main contrib non-free
1
2
3
4
5
#
#  Security updates
#
deb     http://security.debian.org/ lenny/updates  main contrib non-free
deb-src http://security.debian.org/ lenny/updates  main contrib non-free

After adding the non-free repository, run apt-get update.

2. Install SUN Java 6 JRE

1
apt-get install sun-java6-jre

3. Download latest version of Openfire as .deb
You can find more information about versions here.

1
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.6.3_all.deb

4. Install Openfire

1
dpkg -i openfire_3.6.3_all.deb

5. Fixing missing LSB information (not required)
During installation of the Openfire packet, update-rc.d is reporting, that LSB information is missing from init-script.
As I don’t like such warnings, I’ve created a patch for adding the LSB information.

Note: You need the ‘patch’ program installed (apt-get install patch).

1
patch -p0 &lt; openfire_3.6.3_fix_missing_LSB_information.patch

I will soon write an article about configuring Openfire for Active Directory connection.

Mar
23
2009
2

Repair all MySQL databases

If you need to check and repair all MySQL databases you can use

1
mysqlcheck -u USER -p -Ar

If you also want to optimize them, use

1
mysqlcheck -u USER -p -Aor

-A: all databases
-o: optimize
-r: repair

Have a look at the man page of mysqlcheck for more information.

Written by saz in: MySQL | Tags: , , , ,
Mar
22
2009
0

ArchLinux, encrypted root and a MacBook Pro

Ok, so I’ve installed ArchLinux on my MacBook Pro (it’s a 5,1) with encrypted root disk, and I’m not able to enter my passphrase. This is a really ‘nice’ bug, because the MacBook Pro is useless, if it’s not booting :(

But where is the problem? After searching some time, I’ve found it out. The keyboard on my MacBook Pro is connected through USB and needs a kernel module ‘hid_apple’ to work. If this module is not integrated in the initrd, you’re unable to enter the passphrase.

But there is a solution: modify the file “/etc/mkinitcpio.conf” and add the following modules to the MODULES line:

1
hid usbhid uhci_hcd ehci_hcd hid_apple

On my system, this line looks like this:

1
MODULES="hid usbhid uhci_hcd ehci_hcd hid_apple"

After changing mkinitcpio.conf rebuild the initrd with the following command:

1
mkinitcpio -v

Reboot your system, and now you should be able to enter your passphrase.

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com