andLinux “Cannot open display” problems…

make it short:

-> open windows firewall, tcp port 6000
-> adjust the Xming startup command, include a full path for the logfile, e.g. “C:\Temp\Xming.log” instead of a filename only

Monitoring MySQL queries

Monitor All SQL Queries in MySQL is a very nice (though short) posting about how to debug and monitor what’s going on inside your DBMS. There’s supposed to exist a similar tool for MSSQL called “Profiler”.

how is the nautilus thumbnail-filename related with the file it belongs to?

found it somewhere in ubuntuforums.org:

echo -n 'file:///path/to/file/name.jpg' | md5sum

list obsolete and/or locally installed packages in debian/ubuntu

aptitude has a specific list-category to display those when using the curses-GUI, but I do not like it. fortunately, you can use the search-command from the cli-interface with the appropriate search-pattern:

aptitude search "?obsolete"

or as a shorthand:

aptitude search "~o"

See the aptitude Reference Guide for more information.

enable debug logging in mozilla lightning

add the following lines (or adjust if already there) in your thunderbird-profile’s “prefs.js”

user_pref("calendar.debug.log", true);
user_pref("calendar.debug.log.verbose", true);

lightning-plugin for ubuntu’s 64-bit thunderbird in 10.04

http://www.secudb.de/~seuffert/mozilla/

where to locate purchased music on an iPod Touch / iPhone

it’s in /var/mobile/Media/Purchases/

ActiveDirectory and the global catalog

At work, we’re running a 2008R2 AD forest containing 5 sub-domains. now to query the LDAP can be a pity if you don’t know in which one of the overall 6 domains the queried object is located.

After months of helplessness and various (unsuccessful) experiments with meta-directories, ldap-proxies etc. we discovered that the problem is already solved. the solution is to use a different port, ActiveDirectory provides the so-called “global catalog” (containing all the information from the whole forest) on port 3268.

Assume, your username is “un321” and your account is located in the “it” subdomain of the “ads.forest.private” domain. To query for a user called “ab123” use the following ldapsearch-command:

ldapsearch -x -b "dc=ads,dc=forest,dc=private" -D 'un321@it.ads.forest.private' \\
        -h ads.forest.private -p 3268 -W  "(userPrincipalName=ab123*)"

10.04 countdown

restoring a MySQL dump on a freshly installed debian/ubuntu system

to restore a dump from a MySQL database created on a debianish Linux system, just feed the dumped SQL to the command-line mysql client like this:

mysql -u root -p < mysql-all-2010-03-28-0515.sql

since the whole content of all MySQL databases are overwritten with that stored in the dump, credentials are affected as well. that’s the reason why debian’s system tools won’t work any more after restoring the old dump, since debian creates a maintenance-user called “debian-sys-maint” during the installation and stores the randomly generated credentials in “/etc/mysql/debian.cnf” so it’s sufficient to just copy the “password” values from the old file into the new one and restart mysql. otherwise, you will run into an error like this:

/etc/mysql/debian-start[3181]: Running 'mysqlcheck'...
/etc/mysql/debian-start[3181]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) when trying to connect
/etc/mysql/debian-start[3181]: FATAL ERROR: Upgrade failed