Posts Tagged ‘ubuntu’

Copenhagen

November 18th, 2012

Recently I had some time to explore the streets of Copenhagen. It’s the capital of Denmark, an old seaside city with a distinctly fairy tale look. Every Dane is blond, blue eyed, in great shape, and is born with a bicycle in their hands. If you forget someone’s name, you can just call them “Christian Christiansen” and there’s a 95% chance you’ll be correct.

Important fact: Danes tend to speak English fluently. I had to ask people “Do you speak English?” now and then, but the answer was always “Of course!” The majority of the time Danes sized me up immediately and spoke to me in English before I could even say hello. Something to keep in mind if you’re unilingual.

 

Rune stone Round Tower ramp Cupid and the three graces Rosenborg Palace

Of the museums and such, I had a great time in the National Museum, the Round Tower, the Thorvaldsen museum, and the Rosenborg Palace. Of those, the National Museum is always free and has an impressive section on early human history. If you enjoy Romantic Era art, the Thorvaldsen museum is a must. Each sculpture contains enough symbolism to make a liberal arts major’s nipples explode with delight.

There’s two towers you can walk up in and get a view of the entire city: the Round Tower (RundetÃ¥rn) and the Church of Our Saviour (Vor Frelsers Kirke.) Since after a cramped airline flight and a lot of walking my knees were on their last legs (so to speak) I went with the Round Tower — for the first 3/4 of the way up the tower it’s a pleasant stroll up a winding ramp. After that there’s 2-3 flights of stairs and you’re out on a deck overlooking the city. Tickets are only a couple of bucks and the view is worth the price and hike.

 

Copenhagen airport bike pump OMG bikes!

The airport has a bicycle tire pump. I’d heard biking was big in Copenhagen and sure enough the airport bike pump was key evidence #1. There’s bike rental places are everywhere but it seems they welcome you to bring your own on the flight over.

It wasn’t until I saw rush hour during the week that I realized how many people bike in Copenhagen. The bike lanes fill up with congested traffic, bicyclists tailgating one another and riding side-by-side. But for the most part the lanes were clearly marked and people tended to obey the rules.

Bicycle fans, rejoice at the following facts about Copenhagen:

  • Mail is delivered via tricycle
  • The busiest bike lanes have their own traffic lights
  • Steep car and gas taxes encourage cycling
  • Second only to Amsterdam in terms of bicycle friendliness
  • Danish clothing companies design clothing for hipster bicyclists

 

Copenhagen Metro Mobile Tickets Copenhagen Metro

The first thing to notice about Copenhagen’s Metro is the drivers: there aren’t any. It’s like an airport tram, you can sit in the front and watch it move down the track on its own. The underground stations have interior doors for safety. (Coincidentally, we had two deaths on the subway tracks in San Francisco while I was away. Is this something we should be doing?)

90 minute transfers on the bus/Metro system are pricy at around $5-$6, but it’s cheap compared to a cab. The iOS/Android app makes it easy to buy an electronic ticket.

The system is entirely proof of payment. Only once did anyone check my ticket, a friendly older guy who looked well past “retirement” age and well into “Wal-Mart greeter” age.

Currently there’s a whole new Metro subway line under construction that makes a ring around the downtown area. The ring should be completed in the next couple of years. Oh, and did I mention that all Metro trains run 24/7? To put it bluntly, Copenhagen’s Metro makes Tomorrowland look like Frontierland.

 

Bella Center Valve at UDS

Ostensibly I was in Copenhagen for Ultra Dork Summit Ubuntu Developer Summit (UDS), held at Bella Center. The hotel convention center reminded me of the old Metreon, with its striking design and strikingly ill-conceived layout.

This was the event where Valve announced the beta of Steam for Linux. Soon, children might not need a copy of Microsoft Windows to play those damn video games.

 

Pumpkins Danish jack-o-lantern Halloween in Copenhagen

When I was in school we were taught that Halloween was an American holiday. While religious harvest holidays in the Fall dated back thousands of years, we were taught that Trick-or-treating and jack-o-lanterns were American traditions. But in recent years, I’ve heard of these traditions cropping up in places as far away as South America and the UK. And now I’ve seen American-style Halloween activities in Denmark with my own eyes.

At first I thought the jack-o-lanterns in near my hotel (the Nyhavn neighborhood) might be aimed at American tourists. But I didn’t see many American tourists. And I kept finding Halloween merchandise at local markets that were off the beaten path.

I visited my co-worker’s place on Halloween. He rented via AirBnB in a more suburban part of town. That night, the streets outside were crawling with costumed children going door to door! Who knew?!

 

Mural in Freetown Christiania You are now entering the EU

If you enjoy hippie communities, you won’t find many places that fit the bill better than Freetown Christiania. It’s an authentic 70′s hippie commune neighborhood that makes Haight Street feel like Union Square. Sure, there’s little boutiques and cafes, but there’s also a few genuinely dive-y beer gardens, stages with live music, and not to mention the “Green Zone” where people sell marijuana in an open market.

Christiania is a beautiful little neighborhood, with winding streets that you can aimlessly explore for at least an hour or two. Despite the laissez-faire attitude, they do have many rules, one of which is that photography is (understandably) only permitted in certain areas. I wish I could have taken more photos, but I think rules are a good thing for communities like this; self-policing means less interference from the government. As the sign says when you exit, “You are now entering the EU.”

 

Windmill boat View from Round Tower Windmill at Bella Center

Denmark is big on wind energy. My hotel claimed to be 100% wind powered. Given that the nearby winds often felt like being tackled, I can believe it.

The photo to the left above is a boat designed for installing offshore windmills. The thing is massive, about the size of an oil platform. The right photo is a view of the coast. The windmill installation boat in the middle. If you look at those small white pillars just offshore, each one of those is a windmill.

Denmark doesn’t have any oil so wind makes sense. But I suspect another reason behind all the bicycling and clean energy: the entire country is flat and nearly at sea level. If the sea were to rise two meters they’d have a Kevin Costner scenario.

 
 

If it wasn’t obvious from everything above, I really enjoyed Copenhagen. It’s one of those places that’s both welcoming and foreign at the same time. And most importantly, more often than not the Danes make a great cup of coffee.

Ubuntu as an OS X TimeMachine server

August 19th, 2012

One of the best features of Mac OS X is TimeMachine, a ridiculously easy to use backup system. The downside to TimeMachine is you either have to use an external hard drive or buy Apple’s TimeCapsule backup hardware.

Turns out there’s a third option — use a Linux PC as your backup server.

With Ubuntu Linux 12.04, I highly recommend following this guide, which explains the safest route. Keep in mind it’s completely unsupported by Apple, of course, so if your backups are overwritten with My Little Pony pictures, don’t go complaining to the Genuis Bar.

A couple notes on the guide:

  • Most users can safely ignore the part about Shorewall settings.
  • The guide glosses over user-level security. You could use your normal user account for backups, but you should consider setting up a special user account just for TimeMachine. That way if someone hacks into your Mac, they’ll only have access to your backups and not your entire Linux PC.

How to setup Rhythmbox 2.95 as an Ampache client

April 2nd, 2012

Ampache, for those who don’t know, is a personal streaming music service. It lets you play your MP3s anywhere there’s an internet connection.

You don’t need anything special to play music via Ampache, just a web browser. But certain music applications integrate full Ampache support, which means you can browse all your MP3s from within the app.

On Linux, I use Rhythmbox to play music. There’s an Ampache client for it, but it’s not as easy to install as it should be with newer versions of Rhythmbox.

Here’s what worked for me.

  1. If you have not done so, on your Ampache server set permission to allow XML RPC (Manual is here for complex setups.) For the most basic setup, log into Ampache as an admin. Click the Admin button, then “Add ACL.” In the box that pops up, enter the following:
    • Name: [whatever you like]
    • ACL Type: RPC
    • Start: 0.0.0.0
    • End: 255.255.255.255
    • User: All
    • Remote Key: [leave this blank]
    • Level: Read

    Now hit “Update.”

  2. Make sure Rhythmbox is not currently running.
  3. Install or upgrade to Rhythmbox 2.95 (or 2.96) if you don’t have it already. For Ubuntu Oneiric, you can grab it off this PPA.
  4. If you don’t have it, install Subversion. Check out the code for the Ampache plugin:

    svn checkout http://rhythmbox-ampache.googlecode.com/svn/branches/for_rhythmbox-gtk+3/ rhythmbox-ampache-read-only

  5. Copy the files.

    cd rhythmbox-ampache-read-only/
    mkdir ~/.local/share/rhythmbox/plugins/ampache
    mv * ~/.local/share/rhythmbox/plugins/ampache

  6. Run the installer.

    cd ~/.local/share/rhythmbox/plugins/ampache
    sudo python setup.py install

  7. Now open Rhythmbox.
    • Go to Edit -> Plugins
    • Check the box next to “Ampache Library”
    • With Ampache Library selected, click “Preferences”
    • Enter your server info here.
    • Now close the dialog and double-click Ampache in the Rhythmbox sidebar.

It may take some time to sync with your server, but once it does you should be good to go. Personally I find this plugin to work a lot better than the Amache plugins for Amarok and Banshee, but your mileage may vary.

Updated Aug 2012

Setting up Ubuntu as an iTunes music server

November 20th, 2011

If you’re like me, you’ve got a home network with a couple computers and a buttload of music in MP3, OGG, and FLAC format sitting on your Ubuntu server. You want to be able to keep all your music on that server, but play it from any computer.

What to do?

There’s a few solutions to this. If you want your music to play anywhere in the world, you can use Ampache. Ampache works great with Winamp and many other players. But on the downside, it requires some tricky setup and doesn’t work nicely with iTunes.

Another option is Forked-daapd, a strangely named piece of software that allows sharing your music with iTunes on a local network. It also works with iTunes compatible software such as Rhythmbox. Best of all, it’s super easy to setup.

This is all you have to do:

  1. Install the forked-daapd package. From the command line, you can do this:
    sudo apt-get install forked-daapd
  2. Edit /etc/forked-daapd.conf as root. Directions are in the file, but you’ll want to edit the directory to point to the path(s) of your music folders (it will recursively scan subfolders for mp3s, etc.) You may want to enable transcoding if you have OGG, FLAC or other formats that iTunes doesn’t like. Oh, and don’t forget to change the name of the share to something more fun.
  3. Restart forked-daapd with sudo /etc/init.d/forked-daapd restart

Now open iTunes and see if your server appears. It should show up on the sidebar. If you click on it, there will be a handful of songs almost immediately. It may take a while for Forked-daapd to index all your music, so be patient.

That’s it! Now you’re ready to party!

Fixing Linux when it “gave up waiting for a root device”

January 26th, 2010

Recently I was installing Kubuntu 9.10 (also known as Karmic Koala) when my system refused to boot. I was informed that my system had “given up waiting for a root device.”

But there’s a simple solution!

I suspect many of you may be in a similar situation and that’s why you’re here. Let’s first consider the “gave up waiting for root device” error.

What does it all mean? Well, your boot loader was trying to see if your main hard drive (i.e. “root device”) was starting up. But guess what? It didn’t start — probably because it wasn’t there.

“But I didn’t take it out!” you exclaim, because you’re not stupid enough to take your hard drive out of your computer and then be surprised when it doesn’t work.

No, the problem is because your computer couldn’t find your drive.

You’ve got to fix the boot loader, and you have two options. If you’re lucky like me, your computer drops to a “Busy box” shell on this type of error. This is a sort of bare minimum shell that does just enough to get your computer running. If this happens, you’ll see some instructions on the screen regarding Busy box.

Use Busy box to access your drive
Here’s what to do if you’re using the Busy box command line:

  1. Create a new folder to mount your hard drive.
  2. mkdir /drive

  3. Mount your hard drive to the folder you just made.
  4. mount /dev/sda1 /drive

  5. In my example, my hard drive was located at /dev/sda1 and I suspect this is pretty normal. Your drive may be sda2, sdb1, sdd0… who knows! It may take a few tries. If you guessed the number incorrectly, you can always try again by unmounting and then going back to step 2. Here’s how you unmount your drive:

    umount /drive

  6. Make your hard drive the root so we can fix it.
  7. chroot /drive

From here you can use nano, emacs, or vi to fix your problem. Skip below for more info.

Without Busy box
If you’re not lucky enough to get Busy box prompt, you can always boot off of a Linux Live boot CD. The regular Ubuntu install CD can be used in live boot mode, as can Knoppix. When you boot off of that CD you’ll be taken to a full-fledged Linux environment where you can fix your problem in the same way. Your hard drive should be easily accessible, probably with a nice GUI and everything. Just open the drive and you’re ready to go.

What to do next
If you have a similar problem as me, the official Ubuntu 9.10 KarmicUpgrades doc has a resolution.

Otherwise, try Googling around some more. It’s probably a very similar boot loader issue that can be fixed easily once you’ve completed the above steps.