Tuesday, December 22, 2009

Sunday, December 20, 2009

Ich versteigere meine Canon PowerShot SX200 IS!

[Sorry, German only today!]

Aus gegebenem Anlass poste ich heute ausnahmsweise in Deutsch!

Ersteigern Sie meine nur zwei Monate alte Canon PowerShot SX200 IS in bestem Zustand OVP inkl. Zubeh├Âr:

http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&item=300379576981

Monday, December 14, 2009

My new new camera

I recently purchased a new camera.

You think I already wrote about this in my last blog post? Nope, that's my now old camera. I bought a new camera, again!

Why?

The Canon PowerShot SX200 IS is a great digicam. I enjoyed it a lot. Especially after installing the Canon Hacker's Development Kit.

It has the power of a bridge camera (or even a DSLR, thanks to the CHDK) and the size of a compact camera. But it's its size that made me reconsider my purchase.

It's exactly in the middle between a small cam that I can always keep in my pocket and a big cam which supports useful extensions like flashes or lenses. It's too big to always have it around, that's why I sometimes forgot it and had to take photos with my iPhone (which the camera was supposed to completely replace for photo taking). It's too small to let me add a flash or exchange the lens.

I thought about getting a more advanced bridge camera like the SX1, SX10 or SX20. They would certainly be better, but also much more expensive. The price and size difference between such a high-end bridge camera and a low-end Digital Single-Lens Reflex camera would be almost negligible.

Of course, a DSLR camera body wouldn't be enough, I'd also need some accessories like a good lens. That's both an advantage and a disadvantage. But I think so many accessories being available is more of a blessing than a curse.

Since it's a substantial investment, I thoroughly researched DSLR cameras. It turned out to be pretty easy to figure out which DSLR camera would be the right one for me.

Canon is the market leader and I'm already familiar with their cameras. Plus almost all of my friends and colleagues who own a DSLR have a Canon EOS 450D. That's why I chose Canon.

The cheapest entry-level EOS camera is the 1000D. The 450D costs just a little bit more, but the difference in features doesn't really matter (at least, to me), and the 1000D is supposed to take even better photos than the 450D because of its fewer megapixels (since both cameras share the same sensor size).

So I chose the Canon EOS 1000D! If you'd like to know what else I ordered, here's my list: Meine Fotoausr├╝stung

Sunday, December 6, 2009

CHDK - a Canon PowerShot power user's dream cam come true

I recently purchased the Canon PowerShot SX200 IS as my new main camera. I wanted a digicam which would support both automatic and manual modes to get more seriously into photography.

After thoroughly researching all current digital cameras in the targeted price range, it was the one that always came up as my best match. Here's a link to a highly informative resource (in German):
http://www.testberichte.de/p/canon-tests/powershot-sx200-is-testbericht.html

And it really turned out to be a great cam: With its smart Easy and Auto modes, it couldn't be any easier to use. On the other hand, it includes semi-automatic Tv (Time value) and Av (Aperture value) modes as well as a full Manual mode.

Then I followed a free online course about photography where I learned a lot. Here's the link (in German, too): http://www.striewisch-fotodesign.de/lehrgang/lehrg.htm

So far, so good. But then, equipped with better knowledge, my equipment's limitations suddenly became obvious to me.

Having learned about focal length, depth of field and hyperfocal distance, I couldn't use that knowledge with my camera. It simply didn't display those values in any meaningful way. My hope to do HDR imaging also appeared to be lost since the camera lacked saving RAW images and bracketing. I even thought about getting another camera, possibly a DSLR, although that would have been out of budget.

But then I stumbled upon an acronym in some forum. And now I have a new camera for free. No, I didn't get a new one, I basically upgraded the old one. With a free open source software project called CHDK (Canon Hacker's Development Kit).

This modification is simply installed onto the SD card which is then made bootable. When the camera boots off the card, its firmware is extended with an Alt mode that provides many, many great new features. The camera's actual firmware is not modified physically, the extension is just a program it runs, so it doesn't void the warranty or damage the system. Everything is well documented and easy to set up, and when it's done, it's almost as if you got a new, better cam.

I can't speak highly enough of this project! I can't recommend it highly enough! This is one of the coolest hacks I've ever seen. I'm amazed by how much it adds to an already powerful camera.

Here's what it does for me:
  • Shows zoom value as 35 mm equivalent focal length - unmodified, the cam only showed a zoom bar, without focal length.
  • Shows depth of field (distance of subject, nearest distance in focus, farthest distance in focus, depth of field, and hyperfocal distance) - unmodified, the cam only showed a focus bar, with little information.
  • Adds shortcut to automatically set manual focus to hyperfocal distance - unmodified, hyperfocal distance was pretty much useless, with depth of field information not being displayed.
  • Shows live histogram (before taking a picture) - unmodified, a histogram was only available when viewing an already taken picture.
  • Shows over- and underexposed areas live (before taking a picture) - unmodified, only overexposed areas were shown when viewing the histogram.
  • Optionally saves pictures as RAW/DNG (in addition to JPEG) - unmodified, only the JPEG format was available.
  • Bracketing modes (Tv, Av, MF, and ISO) - unmodified, automatic bracketing wasn't supported.
  • Plus other extras like battery status displayed with remaining charge as a percentage, optical zoom during video recording, and much more - in fact, custom scripts can be loaded which provide even more capabilities and features.
As you can see, if you're a fellow Canon cam owner (PowerShot or not), this is truly something big! I'm rarely that excited about some kind of software, but CHDK certainly deserves all the attention. It's continuously improved by some very skilled and even more generous hackers, so a great big THANK YOU to you all!

Here's a link to the project's wiki where you can get much more information about it: http://chdk.wikia.com/

German-speaking users should also take a look at the German forums here: http://www.wirklemms.de/

There's even a further improved German version, CHDK-DE, check it out there as well: http://www.wirklemms.de/chdk/forum/viewtopic.php?t=1559

I'm sure you'll enjoy it. Keep spreading the word. Free open source software is even improving digital camera firmware now! Thank you all very much!

Thursday, November 26, 2009

sudo without password

"Sudo" is a great security enhancement: Instead of having an active root account that could possibly be exploited, even remotely, and another password that could be forgotten, sudo lets you run specific commands with root privileges. There's a lot more to it, so I highly recommend you read the man pages for sudo, sudo_root and sudoers.

On some systems, under certain circumstances, a tradeoff between security and convenience can be made by lowering security a little to raise convenience a bit - by allowing sudo usage for specific users without requiring a password. For example, on a secure server without passwords (accessed only through SSH with pubkey authentication), sudo without password is an interesting option.

The normal way to set it up would be to edit the sudo configuration file /etc/sudoers using the visudo command (which would be run with sudo: sudo visudo). There's already an uncommented section which would allow members of the group "sudo" to not need a password, but it's overriden by the later entry which lets members of the "admin" group gain root privileges, so it needs to be added at the very end of this file.

Using visudo to edit /etc/sudoers is recommended because it properly locks the file to prevent simultaneous edits and does basic sanity checking (a corrupt sudoers file could prevent you from gaining root privileges and lock you out of your system if the root account is locked - as it should be). However, I prefer to enable sudo without password running a one-liner command:

sudo sed -i~ '$a\\n%sudo ALL=NOPASSWD: ALL' /etc/sudoers

This command appends "%sudo ALL=NOPASSWD: ALL" to the end of /etc/sudoers - which you would otherwise have to do manually.

Now all members of the group "sudo" will be able to use sudo without a password. By default, the "sudo" group is empty, so you'll want to at least add yourself to this group:

sudo adduser "$USER" sudo

Another possibility would be to use the "admin" group instead of the group "sudo" - then the one-liner would look like this:

sudo sed -i~ 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD: ALL/' /etc/sudoers

Since you're already part of the "admin" group, that's the only command you'd need to run.

Thursday, November 19, 2009

Remove Old Kernels

When Ubuntu upgrades the kernel, a new version is installed alongside the old one. At the grub boot prompt, you can select which kernel to use.

That's great if for some reason a new kernel doesn't work as well as an old one, but there's not much use for keeping old kernels around forever. Since Ubuntu doesn't yet automatically offer obsolete kernels for uninstallation, I wrote a one-liner to remove old kernels:

sudo apt-get remove --purge `dpkg --get-selections 'linux-*.*' | awk '$2 == "install" { print $1 }' | grep -v "$(uname -r | sed 's/\(.*\)-.*/\1/')"`

Since Linux kernels can take up a lot of disk space, you should regularly clean up your system to free space by manually running the one-liner after upgrading your kernel and rebooting. Make sure that you rebooted into your new kernel once a kernel upgrade has been installed, otherwise you'd remove the new kernel instead of the old one which most likely isn't what you want.

Wednesday, November 18, 2009

Ubuntu Shell Tweaks

I already told you that my favorite operating system is Ubuntu. I run it on my laptop, I run it on my desktop, and I run it on most of the servers I administer.

Since I spend most of my working hours in a terminal, staring at the shell, I need a comfortable environment. Thankfully, Ubuntu ships with bash-completion enabled, which makes Tab completion truly awesome. (If it's not enabled for you, make sure that the package bash-completion is installed and /etc/bash_completion is sourced in your ~/.bashrc.)


Here's a couple of other highly recommended tweaks to improve your shell usage:

Colored Shell Prompt:

Unfortunately a colored prompt isn't turned on by default, but fortunately it's easily activated by uncommenting force_color_prompt=yes in ~/.bashrc. Although it's claimed that "the focus in a terminal window should be on the output of commands, not on the prompt", with which I generally agree, I think the best way to focus on the output is by clearly differentiating it from the prompt.

Here's a one-liner which enables the color prompt:

sed -ri~ '/#(force_color_prompt|if|    |fi|alias .?grep)/s/#//' ~/.bashrc

Custom Bash Aliases:

When working within a shell, the most common commands tend to be changing directories and listing directory contents. And when operating on files or directories with potentially dangerous commands, you normally don't get asked "Are you sure?" by default.

That's why I always add some custom aliases to make working with the shell easier and safer. The above command which enabled a color prompt also ensures that an existing alias definition file will be used (since previous versions of Ubuntu sadly had the source command commented out).

You can simply create such a file and save it as ~/.bash_aliases. Here's what mine contains as a minimum:

# some more ls aliases
alias l='ls -CF'
alias la='ls -Al'
alias ll='ls -l'
alias c='clear'
alias cla='c;la'
alias cll='c;ll'
alias cls='c;ls'

# Some more aliases to avoid making mistakes:
alias cp='cp -i'
alias ln='ln -i'
alias mv='mv -i'
alias rm='rm -i'

As you can see, aliases are a great way to create shortcuts for common commands (and command combinations) or to set new default options.

I like to create aliases for ssh connections, e. g. alias servername='ssh servername', so I only have to type a server's name to securely connect to it. (You could also add server-specific options, for instance which username or port to use, but that should better be specified in ~/.ssh/config.)

Tuesday, November 17, 2009

My current workplace

As a professional system and network administrator, I spend most of my working hours in front of a computer screen, or three:


So that's where I work. And this is where I live:

Boring, huh? Not a bit! All I see now is blondes, brunettes, redheads... ;-)

Seriously, though, I only use three or four (GUI) programs most of the time: Firefox (my favorite web browser), Kate (my favorite text editor), Konsole (my favorite terminal emulator), and Pidgin (my messenger).

And if you didn't already guess it already, my favorite operating system is Ubuntu!

Sunday, November 15, 2009

About my blog

This is my new blog. It's a personal blog, first and foremost, but it may also contain information that's at least of some interest to a certain audience. Well, hopefully.

So the first question is, what am I going to write about? Since that will determine who the audience might be. Other than me, of course.

Yes, I'm going to use the blog for notes and reminders for myself, too. I'll also document my research and progress regarding the varied interests that I have. Topics will probably change regularly, just like my focus changes among my various interests.

Another important factor influencing the possible audience is the choice of language. As a German, blogging in German would be obvious, but it would likely limit my audience to a national one. Choosing English instead, I can address an international audience, so that's why I'll (mainly) post in English.

Right now I don't have a fixed schedule for this blog, so I'll just post whenever I have something I consider worth sharing. I strive to keep quality above quantity. This also applies to comments, so I won't tolerate any kind of nonsense that could distract from the actual topics.

That said I certainly value constructive criticism and am looking forward to get new and interesting input from anyone who cares to comment. If and when I post something of use to you, let me know, and I'll see if there's more like it I can share. And if you have something interesting to share, let me know as well, and I'll mention it here.

Well, enough for now, that's my introduction to this new blog. We'll see how and where it goes. Thanks for reading, now stay tuned, more is soon to come.

See ya!
-- Stefan Daniel Schwarz

Friday, November 13, 2009

Hello World!

Welcome to my new weblog. This is my first post. Merry Meet!