Posts tagged ‘Windows’

adjusting temp- and swap-path in GIMPportable on windows

By default, GIMP-portable tries to use a folder below the one it has been started from for temp and swap. That’s just fine if you use it on your usb-stick, but it bugs you with an error message if GIMP is supplied from a read-only network drive: “Unable to open a test swap file.”

This can be fixed by editing (or creating) the system-wide gimprc file, which is located in \Data\settings\

First, I tried to use the windows-style %APPDATA% variable, but GIMP does not interpret it correctly. Digging a bit in the web revealed the way how to do it, they have to be used in shell-style including curly brackets like this:

(temp-path "${APPDATA}\\gimp-2.6")
(swap-path "${APPDATA}\\gimp-2.6")
 
(undo-size 512M)

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

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*)"

if you *have* to run windows (ctd.)

here’s a nifty list of commands to start the relevant control-panel / mmc-plugins in wondiws (in german): MSC/CPL-Referenz

to e.g. run the printer control-panel, use this command:

control.exe printers

calling native windows programs from cygwin with a sane path environment

some things fail if they’re called from within cygwin due to the path adjustments that are necessary for cygwin.

to call them with a sane (clean) windows-environment, do the following:

OLDPATH="$PATH"
export PATH="$(echo $PATH | tr ':' '\n' | grep /cygdrive | tr '\n' ':')"
 
call your windows tool here
 
export PATH="$OLDPATH"

VisualStudio linking error when re-compiling

Well, I don’t want to lose to many words about VisualStudio compared to any professionally acting development tool, but there seem to be (non-)surprisingly many people out there suffering from the same insane problem…

When re-compiling a project, with the intention of only processing those files that have been changed since the last run (or those depending on such files), the linker fails in a miserable way:

1>CVTRES : fatal error CVT1100: duplicate resource.  type:ICON, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

As common when using tools from Redmond, the error message is of almost no real help, since it does not tell anything about the file(s) that caused this problem. BTW, you won’t find any more details in the oh-so-detailed build-log either…

Well, the relly bad problem here is the linker itself, who tries to incorporate a given icon file into the executable binary, and thus runs the visual studio resource compiler (“RC.EXE” iirc), which in turn terribly cries out noticing there is already a compiled resource file where it would like to create a new one so desperately… Having left you standing there in the rain, compilation fails. It doesn’t even consider to tell you which files conflict or simply override the old resource file.

To avoid this, navigate to the topmost folder in your destination tree, and look for files having a “.res“ suffix. Using a sane cygwin shell, simply do something like:

find | grep ".res$" | xargs rm -v

Having removed the .res-files, recompiling works like a charm. Well, I’m going home into the GNU-zoo now, enough of this annoyance…

YAY, install cygwin-packages from the cmdline

Migrating a cygwin-installation to a new machine was a real PITA to me, since I always have to run the installer many many times to have all the tools I forgot in the previous runs. And this terrible way of having to search them by clicking through the whole package-tree…

Since cygwin-1.7 it is possible to install packages from the commandline, without a single mouseclick:

setup.exe -q -P wget,make,patchutils,psmisc,git,git-svn,bc

Now to get a ready-to-use list of installed packages on an existing cygwin-installation, have a look in /etc/setup/installed.db:

tail -n +2 /etc/setup/installed.db  | cut -d ' ' -f 1 | xargs echo | sed 's/ /,/g'

which yields the following packages on my current system:

alternatives autossh base-cygwin base-files base-passwd bash bash-completion bc binutils bzip2 cmake cogito colordiff coreutils corkscrew cpio crypt csih cvs cvsps cygrunsrv cygutils cygwin cygwin-doc dash ddrescue diffutils e2fsprogs editrights expat file findutils gawk gettext git git-completion git-gui git-svn gitk grep groff gzip httptunnel ipc-utils less libapr1 libaprutil1 libbz2_1 libcurl4 libdb4.2 libdb4.5 libexpat1 libexpat1-devel libgcc1 libgdbm4 libgmp3 libiconv2 libidn11 libintl2 libintl3 libintl8 liblzma1 libncurses8 libncurses9 libneon27 libopenldap2_3_0 libpcre0 libpopt0 libpq5 libreadline6 libreadline7 libsasl2 libserf0_0 libsqlite3_0 libssh2_1 libssp0 libstdc++6 libwrap0 login make man minires multitail ncftp netcat openssh openssl patch patchutils perl perl-Error ping psmisc rebase rsync run rxvt sed subversion subversion-perl tar tcltk termcap terminfo terminfo0 texinfo tig time tzcode unison2.27 unison2.31 util-linux vim wget which whois xz zip zlib zlib-devel zlib0 zsync _update-info-dir

[UPDATE:]

while the above command works, there is a better alternative to obtain the list of installed packages – including their version: cygcheck

cygcheck -cd

batch/cmd programming

Compared to powerful command line interpreters like bash, ksh or similar, Microsoft’s cmd is a real pain. But sometimes you can’t avoid using it, so here’s some help:

Terry Newton’s Batch Guide
An A-Z Index of the Windows XP command line

if you *have* to run windows

lightning in thunderbird-3

what’s the point in complaining about beta-releases? well, the hope for a better final version…

currently, not only TB-3 has a lot of bugs, but also the latest lightning-plugin: Bug 523555

most confusing to me is the fact that importing a certificate is insufficient to make this work, you also have to select every certificate and edit its trust-properties to make it work. how daffy…