Install openoffice.org in Ubuntu

Unfortunately it is not anymore possible through package management. Searching for openoffice in Synaptic Package Manager or apt-get, you will find openoffice but it will install libreoffice not openoffice. Only way, as I know currently, is install by hand.

To installation we need package and you can get it from here http://download.openoffice.org/other.html

$ tar xvfz downloaded_file.tar.gz
$ apt-get remove libreoffice*.*
$ dpkg -i unpacked_dir/DEBS/*.deb
$ dpkg -i unpacked_dir/DEBS/desktop-integration/*.deb
Posted in Uncategorized | Leave a comment

And gone again – Adsense account closed

abut week ago I got message from Google Adsense Team:

While going through our records recently, we found that your AdSense
account has posed a significant risk to our AdWords advertisers. Since
keeping your account in our publisher network may financially damage
our advertisers in the future, we’ve decided to disable your account.

As they provide no details, and that was my third try to use their service I’m giving up. Don’t know what’s going on in their heads?

* I didn’t click by myself nor was forcing anyone to click any banner
* wrote unique content
* in english

So, why I still see googles ads everywhere on pages which clearly doesn’t create unique content? Probably I will never know.

Trying now banners from others but it seems that they are even more pointless, as atleast in Estonia they provide no clicks and no money..

Posted in Uncategorized | Leave a comment

Open gzipped file with vi?

If you are using latest (and greatest) vi/vim then it can open gzipped files (those with extension .gz) automagically, but it’s not so easy if you must use some old/outdated system where is also old vi/vim.

So, what to do? Gunzipping is sometimes impossible (no gunzip? not enough free space? readonly system? too many files to just search through…). Use zcat!

$ zcat filename.gz | vi -

That’s not all!
gzip package (on Gentoo : app-arch/gzip) contains many more commands useful with .gz files, for example:

* zcmp – binary-compare two gzipped files
* zdiff – compare two gzipped files
* zgrep, zegrep, zfgrep – grep in gzipped files
* zless, zmore – do less and more on gzipped files

Posted in Uncategorized | Leave a comment

KDE and empty “Open With…” menu

Updated to KDE 4.6.2 on one computer and weird problem happened. When tried automount usb disk and open it with dolphin instead I got dialog to choose program to do it with. Strange. Later discovered, that right-click on file “Open With” dialog was empty. Just like all mime-related info was gone.

To fix it, just remove /var/tmp/kdecache-[username] and just relogin to KDE.

Posted in Uncategorized | Leave a comment

Errors in wordpress after php upgrade

Got an interesting problem few days ago. Just updated php (and apache and some other programs) and did “/etc/init.d/apache2 graceful” when suddenly got errors in wordpress blogs like this

Warning: preg_replace() [function.preg-replace]: Compilation failed: unknown option bit(s) set at offset 0 in /path/to/wp-install/wp-includes/shortcodes.php on line 228

Code-repo showed that there were no changes for long time in shortcodes.php file, so there was like two possibilities – some new problem with php or some weird error in my server.

Got also two links from wordpress bugtracker
http://wordpress.org/support/topic/warning-preg_match-functionpreg-match-errors
http://wordpress.org/support/topic/plugin-contact-form-7-problem-with-preg

from where I found out, that it might be releated to libpcre. I created test.php with phpinfo(); inside and found out that php was using pcre 7.9 when in system was actually installed 8.12.

final step to discovery of problem was some page where some user complained, that he has different output of phpinfo(); in apache and on commandline. So, inspired of that, I checked out and got interesting result:

$ php --info|grep -i pcre
/.../
PCRE Library Version => 8.12 2011-01-15
/.../

also were both files pointing to right place

$ ldd /usr/bin/php | grep pcre
        libpcre.so.0 => /lib/libpcre.so.0 (0xb7230000)

and

$ ldd /usr/lib/php5.3/apache2/libphp5.so | grep -i pcre
        libpcre.so.0 => /lib/libpcre.so.0 (0xb6aba000)

So, only possible explanation could be, that apache graceful restart was not enough. When I did restart, it complained about configuration (yeah, two changes in same time, bad-bad!) – ssl port was already taken), and when I fixxed apache start-flags it started and also showed php right pcre version and problem in wordpress dissapeared.

Posted in Uncategorized | 6 Comments

How to find out uptime in windows?

If you are looking answer for that, you will soon discover that there is no way to find out this from default GUI programs

Run this in “cmd” :

net statistics server

or shorter

net stats srv
Posted in Uncategorized | Leave a comment

vi: case insensitive search

By default, vi / vim searches are case sensitive. This mode can be toggled with next commands

:set ignorecase

or shorter version

:set ic

And turn case insensitive mode off again

:set noignorecase
Posted in Uncategorized | Leave a comment

Quick way to find out path’s in kernel config, part 2

As last time I wrote “how to find config locations” in kernel menuconfig, there is one more important thing to know. Sometimes kernel options are hidden (and they are even not greppable) because of dependencies.

For example, I tried to turn on CONFIG_USB_SUSPEND but didn’t find it where it shoult be. Here comes another site to help, in current case http://cateee.net/lkddb/web-lkddb/USB_SUSPEND.html. There you find depends on: line, and all you should to do is confirm, that those linked options are also enabled.

http://cateee.net/lkddb/ -> http://cateee.net/lkddb/web-lkddb/

Posted in Uncategorized | Leave a comment

Linux and VirtualBox – no sound in guest OS

Recently something happened – when starting guest-os, I got error saying “No audio devices could be opened” :

and in log was such data:

00:00:05.542 Audio: Trying driver 'alsa'.
00:00:05.595 ALSA: Failed to apply audio parameters
00:00:05.595 HDAcodec: can't open in fmt(freq: 44100)
00:00:05.602 ALSA: Failed to apply audio parameters
00:00:05.608 ALSA: Failed to apply audio parameters
00:00:05.608 HDA: WARNING: Unable to open PCM IN!
00:00:05.608 HDA: WARNING: Unable to open PCM OUT!
00:00:05.608 Audio: Using NULL audio driver
00:00:05.608 VM: Raising runtime error 'HostAudioNotResponding' (fFlags=0x0)
00:00:05.608 Console: VM runtime error: fatal=false, errorID=HostAudioNotResponding message="No audio devices could be opened. Selecting the NULL audio backend with the consequence that no sound is audible"

After few weeks filled with recompiling and surfing I found this thread where I found hint about libsdl and and bug #26730 and #310793

It turns out, that there is conflict between how different software needs/wants to use some library. Although at first it seems, that problem is on gentoo’s and libsdl’s side, it is VirtualBox’es thing to fix.

Until it is not fixxed, one solution is not to use latest libsdl. Just add to /etc/portage/package.mask/monolithic following line:

>media-libs/libsdl-1.2.14

and reemerge media-libs/libsdl package

Posted in Uncategorized | Leave a comment

Quick way to find out path’s in kernel config

You are (Gentoo) linux-user.
You are building packages by yourself.

How many times you have got message “X_Y_Z not enabled in kernel config”, like this (trying to emerge iotop):

 * Checking for suitable kernel configuration options...
 *   CONFIG_TASK_IO_ACCOUNTING:  is not set when it should be.

And sometimes it is pretty hard to find out, exactly where in “make menuconfig” referred config-option lays. Google can give some times answer as first item, sometimes it is not even on 10th page.

There is solution for that : http://kernel.xc.net/
Just choose your kernel version (latest selected by default), and
arch at “Complete config for” and press “Go”

For example you get page like this. All config-options in one page (Help also available) and there you can search (in browser Ctrl+F) option you need and backtrace by indentations how to find it out from menuconfig.

Other, also very useful link is http://lxr.linux.no/ – Linux kernel code cross referenced (if you need to find out where is some type defined, just press link)

Posted in Uncategorized | 1 Comment