Author Archive
Linux photo frame revisited
by mikez0r on Apr.07, 2012, under Uncategorized
Thanks to a hard drive crash, I’m recreating the Ubuntu-based photo frame for my parents.
Here’s the setup this time:
- Lubuntu 11.10 as the base
- Wally as the wallpaper changer ( http://www.becrux.com/index.php?page=projects&name=wally )
- fluxbox as the window manager, replacing LXDE. I like LXDE, but Wally can’t change the wallpaper under LXDE.
- unclutter to hide the cursor when it is idle
- a few customizations to the fluxbox startup:
in ~/.fluxbox/startup:
add the following lines just before the “exec fluxbox” line:
xset -dpms
xset s off
unclutter &
wally &
Those turn off the auto-power saving monitor feature, and disable the screensaver, hide the mouse cursor when idle, and finally starts wally at startup.
- one customization to make fluxbox load instead of LXDE:
in /etc/lxdm/default.conf, change:
session=/usr/bin/startlubuntu
to
session=/usr/bin/startfluxbox
Note: the wally icon does not show up in the system tray this way. If you start wally manually from the command line and save your settings, they stick.
UK Retrospective
by mikez0r on Jan.04, 2012, under Uncategorized
It’s been about a month now since leaving the UK, and I’ve been meaning to reflect a bit on my experience. I’m definitely glad to be back in California – my goodness, the sun is great! During my time in the UK, I was very negative about the place. Looking back, I’ve seen some redeeming and somewhat interesting qualities that I’d like to record here. Unfortunately, I’ve put this off for so long that only a couple of particular comments come to mind:
The relationship of (car) drivers in the UK is like the relationship of pedestrians in the US. I found drivers there to be generally extremely skilled (aware of their space) and very polite. In the US, when you’re walking around somewhere, most of the time people will be very polite about space, and apologize for running into you. Interestingly, the converse is also true – US drivers are comparatively awful relative to the UK, though pedestrians are extremely assertive about space there, and a trip to the store can be quite stressful for an introvert like me.
Of course, my time at the lab stands out as a high point – the SuperSTEM family was really something special to be part of.
More later, if I remember.
Letter to UC Davis Chancellor Katehi
by mikez0r on Nov.19, 2011, under Uncategorized
A letter to the UCD chancellor, in response to the police brutality that occurred on November 18:
=========================================
Chancellor Katehi,
The events at the student rally on November 18 have deeply saddened and upset me. The police – your police – demonstrated wanton and dispassionate abuse of peaceful protestors. These are not acceptable actions for any human being, let alone representatives of a world-class facility for intellectual development and exploration. I am appalled to be associated with a place that is host to such brutality.
I will be watching your reaction to these crimes carefully, and I hope your future actions and the actions of the University will sincerely reflect your supposed commitment to the Principles of Community.
Sincerely,
Michael C Sarahan, PhD
UCD Alumnus, 2010
Installing OpenCV with EPD on Ubuntu 11.04
by mikez0r on May.18, 2011, under Uncategorized
Quick note to self on getting OpenCV up on Linux with EPD.
When you run cmake (ccmake for the curses gui), toggle the advanced options. The python includes, binary, and lib directories are options that only show as advanced options. Change these to reflect your location for EPD. After running make, the cv.so library that python gets its functions from gets installed by default to /usr/local/lib/python2.7/site-packages/cv.so. Copy it instead to EPD_INSTALL_DIR/lib/python2.7/site-packages. You should be good to go, now.
Also, one other problem:
Ubuntu 11.04 has pulled the old switcheroo on library locations. If you’ve installed all the dev versions of the necessary libraries (libjpeg, libpng, libtiff, libzip were my problem libraries), you also need to create symlinks from their new locations to the locations that OpenCV’s make/CMake is expecting to find them:
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
ln -s /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/libpng.so
ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.4 /usr/lib/libtiff.so
ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/libz.so
This hint courtesy of:
http://www.nigeldunn.com/2011/05/14/ubuntu-11-04-libjpeg-so-libpng-so-php-installation-issues/
Renaming Visual Studio 2003 projects
by mikez0r on Apr.13, 2011, under Nerd
Edit, Nov 19, 2011
NOTE: this post is out of date. Instead, please see the project here:
DM plugin – serial communication
This project uses relative paths everywhere, and sets output filenames dynamically based on the project name. To use it, extract/sync the github repository to an installation of the DMSDK, then rename the project in Visual Studio. You should be able to safely rename the project folder without breaking anything.
======================= Original post below ===================================
Yes, VS 2003 is out of date. I use it to compile C++ extension plugins for Gatan Digital Micrograph (DM), which we use to control our microscopes and acquire/process data. The SDK for DM is designed for Visual Studio 2003 (or older).
Part of the problem of doing something that very few others do is that the documentation is usually poor. This is very much the case with the SDK.
Here was my problem:
- I don’t know how to create a new project and have it compile. The SDK is sufficiently complicated and different from any standard Visual Studio project that it is difficult to take this path.
- I don’t know how to rename my VS 2003 project files without breaking the project. Thus, I am unwilling to distribute the source code to my project, since it is named something completely unrelated.
Here’s my solution:
- In Windows Explorer:
- Rename the project folder in the filesystem.
- Rename the .sln and .rc files in the project folder. DO NOT rename the .vcproj file.
- In VS2003:
- Open the project by picking the .sln file to open.
- Rename the project in the solution explorer (right click, and select rename)
- Select the project in the solution explorer, and then click the File menu. Select Save as… and enter the new filename for your .vcproj file. You can now delete the old .vcproj file from the folder.
- For old source files to be excluded, right click them in the solution explorer, and click remove.
- For new files to be included, right click on the project or folder in the solution explorer, and select Add… -> Add existing item…
- In the project properties (right click the project, and select properties):
- Under C/C++, pick the Precompiled Header options, and rename the Precompiled header file appropriately (not entirely necessary, this is a cosmetic change since this file gets (re)generated automatically when necessary)
- Under Linker, in the General options, change the Output File.
- Under Linker, Debugging: update the “Generate Program Database File” option
- Under Linker, Advanced: update the “Import Library” option
Now you should no longer have any files popping up with the old name.
Good luck with your DM plugins and renamed VS 2003 projects!
Windows command prompt here
by mikez0r on Feb.28, 2011, under Uncategorized
Learned a really handy trick today. To open a windows command prompt from Windows Explorer, you can click in the address bar (the cookie crumb trail in Windows 7). It will turn into your full path. Delete the whole path, and type cmd, then hit enter.
Linux wins again!
by mikez0r on Jan.25, 2011, under Uncategorized
I’ve been cursing the wireless card in my computer since I pieced it together last week. It’s an Asus PCE-N13. It didn’t require any extra driver installation under either Windows 7 x64 or Ubuntu 10.10. However, the signal was very poor in Windows, with constant drop-outs, and it would not detect any networks at all in Ubuntu.
I haven’t found a solution to Windows problems yet, but I blacklisted a few modules in Ubuntu, namely by adding these lines in /etc/modprobe.d/blacklist.conf:
blacklist rt2800pci
blacklist rt2800usb
blacklist rt2x00lib
blacklist rt2x00pci
blacklist rt2x00usb
Now Ubuntu is connecting like a champ. Blazing fast, and reliable. It seems to be using the rt 2860sta driver instead of the blacklisted ones now.
I originally found this information on the Ubuntu forums: http://www.uluga.ubuntuforums.org/showthread.php?t=1579053&page=2
Put that mouse down!
by mikez0r on Sep.02, 2010, under Nerd
In the name of ergonomics, I’m training myself to not touch the mouse and keep hand movement to a minimum. Here’s a few tips that have been the most helpful to me:
- changing tabs in firefox: use alt-numbers. I keep gmail open in tab 1, so switching to it would be alt-1. mostly, my most recent tab is the furthest one out in my bloated tab bar. To get to the last tab, press alt-9. Great for quickly checking any email, then switching back to whatever else I was reading.
- Code editing with emacs/vimpulse. I’m no pro, but I have used vim for about 5 years, thanks mostly to Gentoo Linux tutorials. I admit to being the typical noob, and staying almost exclusively in insert mode. As part of my experimentation, I followed the superb vimtutor tutorial (just type in vimtutor at your command prompt if vim is installed). vim is awesome! you can move about so easily! However, all of my internet reading suggested that the architecture of emacs would get me a little further in the long run. In emacs, moving around in files is not quite as easy. This is where vimpulse (or viper) comes into play. It lets me use vim commands to move around, but allows me to do so within the framework of emacs. Best of both worlds!
I’m out for now, but I’ll update this post or make new ones as I explore.
UK bank suggestions
by mikez0r on May.27, 2010, under Uncategorized
For anyone thinking about moving to the UK (or maybe any European country), here’s some tips that I wish I had when I came over.
The banks that have been the most helpful:
NatWest required proof of address, and suggested that I get my bank at home to mail a statement to my temporary address here in the UK. Had I known that earlier, this would have been the best option.
HSBC has an account for incoming international people. You can (and should) apply for it before you come to the UK. They call it the Passport account. They do some background checks that took about a week for me. They then required me to prove my address back in the States. Unlike other banks, they accepted my proof of employment letters as proof of address (they had my US address on them.) The one down side is that their account costs 8 pounds per month. When you can’t get an account any other way, that doesn’t sound like so much.
The bank that sort of considered helping me, but screwed up with paperwork and cost me 3 weeks:
The co-operative bank
The banks that outright denied me any consideration:
Lloyd’s TSB
Royal Bank of Scotland
To the UK Bank system
by mikez0r on May.20, 2010, under Uncategorized
Dear UK Bank system,
In case you were wondering, I hate you. Your absolute refusal to even consider any piece of reasonable evidence that I am worthy of an account (aside from proof of address) is ignorant, irrational and most of all irritating. You acknowledge that I cannot obtain an apartment (and thus an address) without a bank account, yet you insist on proof of address. This is in spite of my proof of employment, proof of clean background check for entry to your national laboratory, and proof that I have paid over 1500 pounds as a deposit on an apartment, which I cannot move into until I have a bank account. Truly your stubbornness puts even retarded donkeys to shame.
Sincerely,
An employed American with a Ph.D. who has zero debt, has made one late credit card payment in 10 years, and now would prefer to put his money beneath his mattress, if only he could actually be paid without your slimy services.