Categories
Linux

LibreOffice 4.0.3 on Debian 7 Wheezy

Debian Wheezy ships with Libreoffice 3.5.4 out of the box. However the newest version 4.0.3 offers numerous improvements over the previous version such as improved start up time etc.
Fortunately wheezy backports offer a way to install version 4.0.3 without “upgrading” your installation from stable to testing or even unstable.

Add the backports repository on Debian Wheezy:

$ sudo su  

# echo 'deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free' >> /etc/apt/sources.list

# echo 'deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free' >> /etc/apt/sources.list

Update package information:


# apt-get update

Install LibreOffice from backports repository


# apt-get -t wheezy-backports install libreoffice
Categories
Linux

Compile 3.9 Kernel on Debian 7 Wheezy for Lenovo X230

Reason for compiling your own kernel

Debian Wheezy out of the box installs the Linux 3.2 kernel which was released back in January 2012. The 3.2 kernel is marked as longterm by the kernel team and will be supported until 2016. That’s probably the reason why Debian chose to release Wheezy with the 3.2 Kernel. However most newer hardware (released after January 2012) will not properly be supported by this kernel. The Intel HD4000 graphics chip in my Lenovo X230 suffers from lock-ups while using the 3.2 kernel. These problems were fixed in the 3.4 kernel (Intel provided a new graphics chip driver). The following commands will compile and install the latest available kernel from kernel.org (v. 3.9.4 at the time of writing)

Prerequisites

The following packages are needed to compile your kernel

$ sudo apt-get install kernel-package fakeroot build-essential ncurses-dev

Download the new kernel from www.kernel.org

(replace 3.9.4 with current version number)

$ wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.9.4.tar.bz2

Extract the archive and cd into it

$ tar xvf linux-3.9.4.tar.bz2
$ cd linux-3.9.4/

Compile the kernel

Base the kernel config on your current configuration

$ cat /boot/config-`uname -r`>.config
## OR (depending on your current kernel)
$ cat /boot/config-3.2.0-4-amd64 > .config

$ make oldconfig

Remark: you’ll be asked quite a lot of questions (newer kernel contain more options and tweaks). If in doubt, choose the default answer.

Create the kernel related debian packages

$ make-kpkg clean

Compile the kernel

$ sudo time fakeroot make-kpkg -j4 --initrd kernel_image kernel_headers

replace 4 with the amount of available cpu-cores

Install the new kernel

$ sudo dpkg -i ../linux-image-3.9.4_3.9.4-10.00.Custom_amd64.deb ../linux-headers-3.9.4_3.9.4-10.00.Custom_amd64.deb

Reboot and select the new kernel in grub

Categories
Linux

Monitor HDD Temperatures in Debian

Modern storage drives (harddisk/ssd) support S.M.A.R.T (Self-Monitoring, Analysis, and Reporting Technology) and allow to examine the current drive status through a standardized interface. The design goal during S.M.A.R.T’s development was to anticipate drive failures before they actually happen. HDDTemp utility can read out the temperature of your hard drive by reading the data from S.M.A.R.T

Install hddtemp

To install hddtemp under Debian/Ubuntu enter the following command into a terminal.

$ sudo apt-get install hddtemp

You can also perform source code installation. Download the source code tar ball here.

$ tar -jxvf hddtemp-0.3-beta15.tar.bz2
$ cd hddtemp-0.3-beta15
$ ./configure
$ make
$ sudo make install

Monitor hard disk temperature

To see the temperature for /dev/sda, enter the following command:

# hddtemp /dev/sda

##Output
/dev/sda: Hitachi HDS723020BLA642: 36°C
# hddtemp /dev/sd[a-k]

##Output
/dev/sda: Hitachi HDS723020BLA642: 37°C
/dev/sdb: Hitachi HDS723020BLA642: 38°C
/dev/sdc: Hitachi HDS723020BLA642: 38°C
/dev/sdd: Corsair Force 3 SSD: 128°C
/dev/sde: WDC WD2003FYYS-02W0B1: 37°C
/dev/sdf: WDC WD2003FYYS-02W0B1: 37°C
/dev/sdg: WDC WD2003FYYS-02W0B1: 39°C
/dev/sdh: Hitachi HUA723020ALA640: 35°C
/dev/sdi: Hitachi HUA723020ALA640: 35°C
/dev/sdj: WDC WD2003FYYS-02W0B1: 41°C
/dev/sdk: WDC WD2003FYYS-02W0B1: 41°C
Categories
Linux

Dropbox error about monitoring file system

On Linux, the Dropbox client or in general all applications are subject to a default file system limit regarding the number of directories and files an application can monitor for changes.
Dropbox sooner or later will notify you with the following warning:

“Unable to monitor the filesystem – Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.”

The Linux version of the Dropbox desktop application is limited from monitoring more than 10000 folders by default. Anything over that is not watched and, therefore, ignored when syncing. There’s an easy fix for this.

# increases the max-file-watch limit


echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf

# to apply the changes without restarting


sudo sysctl -p
sudo dropbox stop
sudo dropbox start