Mihai's links about computing environment setup

 Computing environment tips found the hard way

NOTE: These notes describe personal experience with various computing issues. I make no claim that the tips described here will work for other people or that they are harmless. Use at own risk. See also liability disclaimer at bottom-left of the page.


  • Excellent unix-feel environment for Windows, includes X server, emacs, ssh, cvs, svn, etc ...
  • copy-paste in the cygwin X works with a 2 button mouse, for copy select using left button, for paste use shift-insert.
  • Use "/bin/rebaseall -v" from "ash" (itself invoked from Windows command prompt or "Run" prompt) to avoid errors when PID generation errors from "fork"  appear.
  • be sure to create the appropriate /etc/passwd and /etc/group files by using the "mkpasswd" and "mkgroup" commnads.
  • to avoid some ssh errors, be sure that /etc/passwd contains the path to your home directory (ssh reads it from there and not from the $HOME variable unlike the other cygwin apps).
  • If "latex" does not work, run "texconfig" and reconstruct databases for the latex configuration.
  • "bash --login" may be better than bash since it sources more stuff, and it gets rid of the broken error messages problem.
  • Before posting a mail message to any mailing list of cygwin, concerning any command that does not behave as you expect, run "cygcheck -srv" and "strace <offending command>" and save and attach the outputs (sometime a problem can be solved by the users themselves by examining those files). And consult the mailing lists at http://www.cygwin.com 


  • Bibtool: a set of free tools to manipulate, search and beautify bib files.
  • Bibutils: a series of tools that convert between various bib formats, in particular ris->xml->bib.
  • Jabref is an excellent free gui manager of bibs. Some details here.
  • Installing new fonts is a complete pain. But if you need it, some details here.

Microsoft Office

  • MathType 4.0 Button can be used in Ms Word 2003 and above, with a bit of manual massaging (though one has to enable macros at every Word startup). The following worked for me. I copied manually "Math Type commands for Word 2000" from "C:\Program Files\MathType\Office Support" to   "C:\Program Files\Microsoft Office\OFFICE11\STARTUP"
  • Repairing badly damaged Outlook pst files. One of the ugliest things I ever had to do. Sometimes the repair utility (scanpst.exe) does not find all orphaned messages. To force it to do a more thorough search, I took a  hex editor (I used a demo version of cygnus) and change the first two entries from 21 to 00. That has increased the number of recover messages by a factor of 10. I ABSOLUTELY DO NOT RECOMMEND THIS AS A STRATEGY. ONLY AS LAST RESORT. Do backups (my sys guys saved me in the end since some messages I could never have otherwise recovered), or migrate fully to IMAP.
  • MSMAPI stuff in outlook.  After uninstalling Office 2007 I attempted to open Outlook 2003 and received this error message:Cannot start Microsoft Outlook. MAPI32.DLL is corrupt or the wrong version.  This could have been caused by installing other messaging system. Please reinstall Outlook. Solution (for me): rename MSMAPI32.dll to *anything* (it was in Program Files/Common Files/System/1033) and reinstall outlook.

Power Point

  • I use TexPoint for my PowerPoint slides, with MikTex for windows, especially when I have a latex source file and I am in a hurry.
  • TexPoint:
  • In the notepad editor window, the right mouse button cut pasted does not work. But the icon buttons above the text window do.
  • Sometime equations seem not to be displayed. (empty) even if no error was prompted. "Select" the objects on slide with mouse and left button, and the equation handle will appear, it just needs to be resized.
  • It will not be supported for Mac starting with Office 08 since Microsoft has discontinued VB macro support. On my MAC I run it with the VMWARE virtual machine (not free :-(, but not expensive either and quite robust )


  • There is a free multiuser (>2) video conference tool, festoon.
  • There is a free Skype whiteboard app, "TalkAndWrite" at the Skype extras site.

Favorite free tools for Windows.

  • SyncToy, a utility for Synchronizing Folders in Windows. Available for free from Microsoft's web site.
  • Remove Empty Directories, what it says. It is useful with Sync Toy , since the latter leaves empty subdirectories behind
  • Microsoft Visual C++ 2005 Express, very suitable compiler/debugger/development env for beginners who rely on visual cues.
    • Microsoft claims the tool will be free "perpetually".
    • My only beef with it is the absence of the MPI Debugger, which is provided only with the pricy Professional version. 
    • In addition, from 2005 edition onwards, it no longer supports "Export a Makefile option" from the regular project. The only alternative, is to create a project with a makefile from the get go (which is allowed).
  • True Crypt is an utility for rapid encription, especially useful with USB drives. 
  • TortoiseSVN and TortoiseCVS concurrent version tools.
    • If using putty with the latter, I found that converting the private key generated by open ssh to work much better than generating a new key with puttygen (something having to do with the structure of the file "authorized_keys").
    • TortoiseCVS does not allow one to create a sandbox in a nework file be default, that must be specifically checked at Preferences in the interface.
    • I found it useful (and incredibly painless) to use pageant.ext from the putty suite. Start it, click on its icon in tray, add your key. 
    • I use WinMerge as a visual difference and merging tool.
    • Sometimes, when using the repo, both on windows and unix architectures, some files get corrupted with the usual ^M issue. Doing dos2unix solves a lot of these problems, I found.
  • For exploring DLLs I use dependencywalker.
  • A good, free, multiple desktop manager is Deskpot. I prefer it to MSVDM, microsofts free toll (though the latter is not bad, either).
  • Diffdoc is a good free Word Visual Difference tool.
  • Virtual CD is an good unsupported Microsof ttool to mount ISO as virtual CDs.
  • To create iso (including DVD) I use NCH Express Burn basic.
  • I like AllToAvi as a free tool to convert any movie format to avi.
  • DVDVideoSoft has a series of free tools for conversion between movie formats, including to Flash. Sadly, embedding them in pdf is not yet free :-) I use Acrobat for that purpose.
  • Process Explorer, and other Sysinternal tools give info about processes that is not normally found in Task Manager.
  • SyncDocs is a free tool for syncing with Google Docs (it can fetch the whole repo)

Developer Studio 2005

  • Debugging memory issues.
    •  ApVerifier is a tool included with DevSt05. One can start debugging from it (in the Debug menu) and it will break on memory corruption issues.
    • The C Real Time Library includes several function that can help relatively painlessly with identifying memory leaks (and other memory errors). An example of how that can be done in a C code is the following example (which will not run since I am not including the entire app code, but it shows how to use some of the notions. In that code WINDOWS is a preprocessor definition). In my coding
      •  I use #define _CRTDBG_MAP_ALLOC  and #include <crtdbg.h> in any file under suspicion.
      • You must use a debug run time library, such as LIBCMTD.lib.(/MTd) To select it, go to Project Properties -> Config properties -> C/C++->Code Generation -> Runtime Library and select it (Multi-threaded debug).
      • I use "disable optimization" (/Od) (I cannot swear you need that, but it works for me). Project Properties -> Config properties -> C/C++->Code Generation ->Optimization->Optimization and select Disabled.
      • Then after building, start the debugging the project. When debugging is done, in output window you will have memory violation info. It is integrated with DevStudio (i.e. click on it sends you to a relevant line, generally where the handle for that memory was defined). 
  • If compiling in the "No Language Extensions Allowed" you may have to add a line at the end of the file (especially if ending with a pragma) or else you may get "Unexpected end of file".


Pocket PC tips

  • Setting up a VPN. Unfortunately, the default in Pocket PC is to set up the VPN only with the "my work" connection.  In many such devices, only the "my Internet service provider" connection is actually set with the  username and password and the parameters of the connection.  You can either enter the same parameters in the "my work" connection, or what I have found work is that if you connect to the Internet service provider and set the VPN at the time you are connected, it will actually work correctly and anytime VPN is needed it will actually connect through the "my Internet service provider"
  • If your workplace supports ssl imap and smtp services, those will typically not need VPN, and one can set Pocket Outlook to work with them (there is an advanced tab in options where one can choose ssl access).
  • For many pocket pc devices, such as the Samsing I730 of verizon the Bluetooth stack is not fully functional. There is a free program for pocket PC, BTModem, that once run provides full functionality. If you use that to access the modem by bluetooth, the one version I have, as a minor inconvenience; it may not work if the modem is already connected. So disconnect first, and then use it.

Windows Odds and Ends

  • Remote Desktop Sometimes destroys the desktop icons on the screen of the controlled computer. I have found the following fix to work for me: I click the computer icon, press on view, folder options, and choose the file types tab. Choose one of the file types, that already exists on the desktop, press advanced and reselect the respective icon. After I close the "My Computer" pane the icons reappear.
  • The open file menus are painfully slow. It happens when I have a network drive defined, inaccesible but not disconnected. Disconnecting it makes it all work much faster.
  • The context (right button of mouse) is slow. Turn off thumbnail caching in  Control Panel -> Folder Options->View. Some people contend that to have this button appear one must enable it with the group policy tool, gpedit.msc (enter it in start->run).I have never needed it.
  • Sometime ago I encountered the strangest problem, following the instalation of Paint Shop Pro. No matter what I did, when I clicked on a new folder it would open in a new window, and no setting available to me would change that. A solution is here. Basically, you open My Computer-> View-> Folder Options -> File types, double click folder icon, click advanced and enter a fake action ("blablabla" did it for me. Enter "Explorer.Exe" as program to execute it). Then you search in registry (Start->run->regedit) for "blablabla". Once you find it, you delete all entries (folder) at same level with "blablabla". I cannot guarantee it works, and I get a cold sweat playing around with registry, but that is the only thing it worked for me.
  • To copy partially damaged disks, I use unstopcp (search on the web) which simply skips over  damaged areas and comes back later trying to fix them if requited. But it does not "stick"
  • To use an email certificate with outlook, I needed to explicitly make my private key readable by me. It looks like the Microsoft Security Layer does not do that by default. The key is in $WindowsFolder:\Documents and Settings\$UserName\Application Data\Microsoft\Crypto\RSA\$NumericHandle
  • Some of the shell versions work incorrectly if one has blanks in path before or after the semicolomn separating various paths.

Porting to Windows 64 bit

  • Irrlicht library.
    • Select directX version you want to use in IrrCompileConfig.h by commenting out the appropriate directive (this took a while, not perfectly documented).
    • In oss.cpp do the pointer casting by hand (Visual Studio gives you an error and suggestion).
    • In Project properties, change Win32 with Win64
    • In the compiler directives, change WIN32 with WIN64.
    • In the "other command line options" delete /MACHINE:I386, and select the X64 architecture in the link options (that was also a while to chase).
  • SpiderMonkey Javascript. You have to replace the /MACHINE commands, plus a couple other fixes.
  • dlltool. In its original form, it does not create a 64 bit machine version. Actually, even the current (March 31) binutils version as message of available architectures it has hardwired only 32 bit architectures. So I use the dlltool from the MinGW 64 bit port on sourceforge; that seems to work fine.

MAC software/issues.

  • Scplugin is a good subversion tool integrated with Finder
  • Murky is a good front end for Mercurial.
  • SmartSVN and SmartCVS are excellent free tools for MAC for either CVS or SVN with a good GUI.
    • To enable "Reveal in Finder" functionality, Open SmartSvn->Preferences->External Tools->Directory Command. Enter "/Volumes/Macintosh HD/System/Library/CoreServices/Finder.app" in Command and "${directoryPath}" in arguments.
  • Yahoo Zimbra Desktop is a free email client integrates zimbra, yahoo and gmail accounts. One can add zimlets to it. To do that,
    • 1. save zimlet zips into <install>/zimlets
    • 2. cd into <install> from terminal
    • 3. run the following line for each zimlet: java -cp jetty/lib/log4j-1.2.8.jar:jetty/common/lib/commons-httpclient 3.0.jar:jetty/common/lib/mail.jar:jetty/common/lib/commons-logging.jar:jetty/common/lib/commons-codec-1.3.jar:jetty/common/lib/json.jar:jetty/common/lib/dom4j-1.5.jar:jetty/common/lib/zimbracommon.jar:jetty/webapps/service/WEB-INF/lib/zimbrastore.jar -Dzimbra.config=conf/localconfig.xml com.zimbra.cs.zimlet.ZimletUtil deploy zimlets/<zimlet_name>.zip
    • 4. restart zdesktop backend server
  • A good zimlet from the zimbra web site is "contact cleaner". It merges similar contacts, which appear as a result of multiple types of sync.
  • To change font size (or other preferences in Zimbra Desktop), one has to edit the file (on Mac) ~/zimbra/zdesktop/profile/profile.js. For instance, font preferences can be changed by adding (or modifying) the following lines.
    • user_pref("font.default.x-unicode", "sans-serif");
      user_pref("font.default.x-user-def", "sans-serif");
      user_pref("font.default.x-western", "sans-serif");
      user_pref("font.language.group", "x-western");
      user_pref("font.minimum-size.x-unicode", 14);
      user_pref("font.minimum-size.x-user-def", 14);
      user_pref("font.minimum-size.x-western", 14);
  • cifs is better than smb when mounting network drives. (it works better for me :-)
  • The keyboard shorcut for the "apple" menu is Fn-Ctrl-F2.
  • To print screen do Apple-Shift-3 and mouse-click on screen.
  • Truecrypt (see my windows bullet) is now available for MAC as well.
  • Perian and WmComponents are good codec packages to have, particularly for powerpoint presentations with movies.
  • Imaging Old Hard Drive to new one: When using the Mac Installation Disk Hard Drive Utility tool, if you do not need info on new disk, I do copy "with erase" this way this is block copy and not file copy and it is much faster.
  • VMware Fusion hard drive resizing is a pain. I found a good document online -- in the vmware forums--from Pat Lee on how to do it. I provide it here for convenience, I MAKE ABSOLUTELY NO CLAIM that it will work for who tries it or that it is otherwise harmless. I will just say it has worked for me.
  • The floating clock support has disapperared in Leopard. A decent sub is "Simple Floating Clock" , found here on Jan 25 09.
  • To enlarge all fonts on Leopard, open QuartzDebug->Tools->User Interface.
  • Prism is a free and decent video format converter.
  • iExtractMP3 is a free sound extracter from flv movie
  • To re-index in spotlight, assuming indexing is enabled on the volume in question:
    1. Open Terminal, located in the Macintosh HD > Applications > Utilities folder.
    2. At the Terminal prompt, type the following command: * sudo mdutil -E /path_to_volume where /path_to_volume is the path of the volume whose Spotlight indices you wish to rebuild. For example, to rebuild the Spotlight indices for your Mac OS X startup disk, the command is: * sudo mdutil -E /
    3. Press Return. You will receive a confirmation message indicating that the index will be rebuilt automatically. Indexing will begin shortly thereafter.
    4. At the Terminal prompt, type exit and press Return.
    5. Quit (Command-Q) Terminal.
  • ProjectGantt is free cross-platform project management software.
  • grsync is a free GUI for rsync.
  • firefox sometimes does not display the google or other toolbars. Delete the profiles (in MacOS in ~Library/Application Support/Firefox/Profiles) or similar.
  • I find Dreamweaver to be a good tool for creating Web Sites (it is not free, but I find the price worth it). It is extensible, one of my favorite extensions is Neonix Change Case.
  • ffmpegx is a great front end for video conversion, based on the free libraries menconde and mplayer.
  • TivoDecoder is a great free tool to decode the tivo format. For me it works using (tivodecode -- compile from sourceforge) following by ffmpegx to convert to XVID the avi codec for mac.
  • Tivo has a builtin server. It can be accessed at (https://tivoip). Login is 'tivo' and pasword is your mak.
  • On mac, I found VLC capable of playing almost anything.
  • Preview (tested under SnowLeopard) can create multipage tiffs
  • Installing new fonts under MacTex: It is better in ~/Library/texmf; one does not run into administration issues. Better be sure you have a *.ins package, otherwise it will prove difficult. Also, new style files can be put in ~/Library/texmf/tex/latex/texinputs and will be properly read by latex.
  • CUPS-PDF is a virtual printer for MAC OSX.
  • Syncplicity is a "free for small use" tool to synchronize with google docs, but only doc, ppt, and other few files (i.e not .tex).
  • Word Counter is an excelent free text analyzer for mac.
  • File Sync is a free utility to sync folders (though slow, thus good for relatively small jobs).
  • Enthought Python has an excellent free dmg distribution version of Python for mac, on the i386 architecture (32 bit only). It has a lot of good packages including numpy, scipy,matlibplot.
  • Eclipse is a terrific, developmnet environment, free. To make it would with Enthought Python, just add it to the interpreter preferences by location, Eclipse is smart enough to figure out the paths. Be sure to make it the preferred interpreted by switching it in the interpreters pane.
  • Eclipse has some issues with pydev, that needs the right Java to be installed. (e.g 3.2 requires JDK 1.7). Run /usr/libexec/java_home -v 1.7 to find the path to feed in eclipse
  • In acrobat, Choosing "Examine Document" can strip ALL metadata from PDFs
  • To create a multipage tiff in BW if one has Acrobat; one can (1) use "Print Production" / "Convert Color" options with "Grayscale" turned on under "Color Type". Then(2) preview can save as a multiscale tiff compressed and with specified bit rate. Sometimes that still leaves RGB encoding, which can be fixed with "convert" in the imageMagick package, run with the options "convert file.tiff -alpha Off -colorspace Gray -strip file.tif" which will produce a proper grayscale multipage tif.
  • to pass environment information as superuser need to do sudo -E
  • macports allows the fairly painless installation of many unix packages


  • todoist: good integrated app
  • davmail is a great calendar sharing back end.


  • Can be configured by editing ipython_config.py that is found after "ipython locate" a few doors down.
  • To export a data frame in R use: write.table(<data>,"<filename>",sep="\t"); to read in python as data frame use <framename>=pandas.read_table("<filename>")
  • Good ipython start: ipython notebook --profile profname --pylab=inline. Profile should be in dir "profile_profname" under ".ipython" directory
  • macports could install its own version of pip as well. E.g:
    • sudo port install py27-pip
    • sudo pip-2.7 install praw