Updating synergy, “invalid shell library”

Just got problem, when tried to update synergy on my 64bit Win7 box. Seemed that installation went well, but when synergy started one line showed:

ERROR: invalid shell library, use a newer synwinxt.dll

Tried reinstall, and clicked on “Show details” on installer window. There was an interesting line, that told “synwinxt.dll already existed” (or something similar). So, I did uninstall, and whoa – there still was existing c:\Program Files\Synergy\synwinxt.dll” file. Tried to delete, but no success – window$ said, this file was used by explorer.


* Uninstall synergy
* restart windows
* delete c:\Program Files\Synergy
* install synergy

Posted in Uncategorized | Leave a comment

PHP One Line Gallery

Just created new sub-page – Php One Line Gallery. It will be home of my short version of gallery code written in PHP.

Posted in Uncategorized | Leave a comment

Gentoo: conflict between usbutils and hwids

[blocks B      ] <sys-apps/usbutils-005-r1 ("<sys-apps/usbutils-005-r1" is blocking sys-apps/hwids-20120922)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-apps/usbutils-004::gentoo, installed) pulled in by
    >=sys-apps/usbutils-0.82 required by (sys-fs/udev-171-r6::gentoo, installed)
    sys-apps/usbutils required by (kde-base/kinfocenter-4.9.2::gentoo, ebuild scheduled for merge)

  (sys-apps/hwids-20120922::gentoo, ebuild scheduled for merge) pulled in by
    sys-apps/hwids required by (sys-apps/pciutils-3.1.10::gentoo, ebuild scheduled for merge)
    sys-apps/hwids required by (sys-fs/udev-171-r6::gentoo, installed)

For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

* remove usbutils

emerge -Ca sys-apps/usbutils

* as at this point emerging usbutils is still impossible (now conflict with pciutils) remerge it

emerge -a sys-apps/pciutils

* and now emerge usbutils

emerge -a sys-apps/usbutils
Posted in Uncategorized | 2 Comments

Linux Mint 13 and sunoracle java

Although I’m on the way to move away from Linux Mint (epic shortage of functionality – it is a modern OS but you CAN’t dist-upgrade, in the same time – all other OS’es CAN do it) it still run’s on few of my boxes and it (MATE version) runs nicely on older hardware. So.. there is not anymore sun’s jdk and oracle’s jdk not available in (default) package management. Yeah, there is few alternatives, but they are not… wokring well. For example this won’t play with no other jdk but sunoracle’s.

Here’s three commands to fix it:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Posted in Uncategorized | Leave a comment

Kate and replace with regular expressions

Just got good experience with KDE’s Kate editor and must share it.

You have piece of code, which looks like this

    // still empty..

and now you need to put those initializations of var’s to the first block also, getting variables from GET or POST supervariables. What to do? Doing hunderd times of “delete null, paste get_var(”), copy-paste ‘name of variable'” and the day is going to be sooooo long …

Now, in Kate you can do it by one click. Copy all lines “$var..=null;” to first block, select those lines and “ctrl+r” (replace) and put values:

Find: \$(.*)=null;
Replace: \$\1=get_var('\1');
Mode: Regular expression
[V] Selection Only (just incase)

and press “Replace All”. And it’s done:


and explained:
In Find expression you see (.*) – content of parentheses are treated as parameter “one” and referenced later as \1. That what you see in Replace expression \$\1 – will get replaced as “$var1” and get_var(‘\1’) gets get_var(‘var1’)

Posted in Uncategorized | 2 Comments

Force Moodle to put Dataroot under website root

Had to help install Moodle today. Pretty ugly experience comparing for example to wordpress installation.

Main problem was that Moodle forces you to put dataroot directory outside of webroot directory. Not going to argue is it magic cure against all evil and bad or not, but two things are sure:

a) User needs options, and decision should be he’s (just warning should be ok, and default restricting .htaccess file)
b) If you are using some hostingserver or have some-kind setup which doesn’t allow your php script to access files outside from wwwroot, then you are in deep problems.

But, there is atleast one good solution 😀 And that’s directly related to power of open source – if you don’t like something, CHANGE IT!


* Open in your favorite editor file MOODLE_INSTALL_DIR/lib/adminlib.php
* find function is_dataroot_insecure
* add return false; directly after function header, so it looks like this

function is_dataroot_insecure($fetchtest=false) {
    return false;
    global $CFG;

it allows you to put datadir wherever you want and test or use it on your own risk.

Other problems were somehow related to installer, and seems that it thinks, that you have all power on database you ever can (in other words – you have root-like permissions). So lot of messages “table already exists” and so on. And later.. some magical message “DDL sql execution error” – whatta hek is that?

As it happes on import, it is related to creation of temporary tables. WHY can’t it be cheked in installation time or given some HUMAN-readable message. Fix it:

GRANT CREATE TEMPORARY TABLES ON `database`.* TO 'username';
Posted in Uncategorized | Leave a comment

Linux Mint installation dvd asks username and password?

Downloaded and tried to install Linux Mint 12 today.

After burning DVD and booting up it in my laptop I got username and password prompt in graphical interface. At first I tried mint/[no password], mint/mint, install/[no password] and so on and on. Even tought that maybe it asks user and password of existing installation on disk. After that I tried search installation manual but no reference to username and password. So.. whatta hek?

but after lots of googling I found this and got next idea to check md5sum of iso and burned disk. but..

How to checksum already burned DVD?
Okay, before I got to DVD I already discovered that iso on disk is not good anymore, md5sum was different from that was said on Mint’s page. But how did that happen, as I already controlled iso and it WAS ok!? Problem was that during download computer crashed, and later I started new download before I discovered that old download was resumed by firefox. Anyway.. smth was broken. Third DVD was already success:)

but back to question. You can check your iso file md5 by running command (note, this is correct iso)

$ md5sum linuxmint-12-gnome-dvd-64bit.iso
548f0ac303fea840ef138e5669880a74  linuxmint-12-gnome-dvd-64bit.iso

to check already burned DVD or CD, you must know the size, as for one way I figured out. With “ls -l” you get 1066518528, and now it must be divided with 2048 as block size: 1066518528/2048=520761

# calculate md5sum on invalid file:
$ md5sum linuxmint-12-gnome-dvd-64bit.iso 
86788cd20f20f1f370c833c650c16838  linuxmint-12-gnome-dvd-64bit.iso

# check md5sum of DVD
$ dd if=/dev/cdrom4 bs=2048 count=520761 | md5sum 
520761+0 records in
520761+0 records out
1066518528 bytes (1.1 GB) copied, 125.79 s, 8.5 MB/s
86788cd20f20f1f370c833c650c16838  -

why is this impotrant, or why you can’t just sum whole device? Some additional burining info is added to DVD…

Posted in Uncategorized | Leave a comment

rdesktop: how to switch off from fullscreen?

Looked for that solution alrady long time, but no acively – just thought about it – if using remote connection in Windows, there is additional bar on top of screen, but whatabout rdesktop?

And as I found out, there is nice solution. Just press ctrl + alt + enter – it switces off or on fullscreen mode.

Posted in Uncategorized | Leave a comment

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