Cleaning up Windows & Ubuntu

February 10th, 2015

Windows 8 logoThanks to some helpful tips from Wichard, I’ve cleaned up my Win8 installation. Funny thing: I’ve hardly used it (time I spent actively using it is measured in minutes, not in hours), yet Windows had managed to accumulate a lot of garbage. Probably most is due to upgrading from 8.0 to 8.1, but still…

Tips

  • Turn hibernation off – that saves the diskspace for the hibernation file (several gigabytes).
    Open a command prompt as an administrator (open command prompt, right-click on icon and select “Run as Administrator” and type powercfg -h off (for powerconfiguration hybernation off).
    Space won:±5GB
  • Do a disk cleanup.
    Regular disk cleanup will catch some things, but go into the advanced settings to get rid of all system restore points but the last one. You can even turn off system restore points, though I’m not sure you’d want to.
    Space won (regular disk cleanup): ±1.5GB.
    Space won (advanced disk cleanup): ±8GB.
  • Turn off the memory dump when crashing.
    I have no clue any longer where this is found (probably “My computer > Properties” and then click around somewhere), but if you have a lot of memory in your computer, and it crashed once, you now have several gigs of hard disk space filled.

I went from roughly 14 GB free space to roughly 27.5GB free space.
Keep in mind that I’ve mostly run windows to install updates… :s

Seriously, MS, my disk isn’t so big and I’m dual-booting. Could you kindly stop gorging on the disk space buffet?

PS: Two more things to try:

  1. Reduce the size of the WinSXS folder.
    Apparently, this one stores system restore points or somesuch, so maybe that was included in the “drop all system restore points but the last one”. Still, it can be a huge dir (was 15 gig before we started cleaning, didn’t check afterwards).
    Edit: 7.9 GB. That’s worth cleaning up.
  2. enable compression.
    I don’t really use windows anyway. Moreover, my laptop is pretty kick-ass in the power department. Nothing fantastic, but it should be more than enough to enable disk compression… which will probably gain some more space.

Edit: I’ve also cleaned up the Ubuntu partition a bit: got rid of all photos from my phone (gain: 7 GB) and everything in the Videos folder (gain: 3 GB). Then I cleaned up old kernels following this advice, in a nutshell:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get purge
Gain: 3 GB.

I now have:
– 14 GB of free space in /home,
– 11 GB in /,
– 27 GB on the Windows partition.
So provisional plan:

  1. Clean up WinSXS folder to gain more GBs.
  2. Reduce windows partition by 15 GB or so.
  3. Increase Linux-/ partition by 10 or so GB.
  4. Increase Linux-/home partition by 5 GB or so.
    Problem: this is an encrypted partition. So I might also just go for the SD slot option (see below).

As Wichard pointed out, I do have a slot for SD cards, so I might also use that for movies/photos/whatever. To ponder.

Printing running; NTLM authentication 1 step closer

February 6th, 2015

With some help of the OU IT staff, I got one step closer to two things!

NTLM authentication

This was my goof-up. The cntlm config file was only readable by root. Le doh!
So:

  1. install cntlm
  2. config /etc/cntlm.conf as:

    Username hjo
    Domain www.intranet.ou.nl

    # List of parent proxies to use. More proxies can be defined
    # one per line in format : Proxy 145.20.126.12:8080
    #Proxy 10.0.0.42:8080

    # List addresses you do not want to pass to parent proxies
    # * and ? wildcards can be used
    #
    NoProxy localhost, 127.0.0.*, 10.*, 192.168.*

    # Specify the port cntlm will listen on
    # You can bind cntlm to specific interface by specifying
    # the appropriate IP address also in format :
    # Cntlm listens on 127.0.0.1:3128 by default
    #
    Listen 3128
    Listen 3310

  3. run chmod go+r /etc/cntlm.conf
  4. Generate the password hashes for authentication: cntlm -H and enter your password. Example:

    $ cntlm -H
    Password:
    PassLM FE03A594184396D6552C4BCA4AEBFB11
    PassNT F3496B77FA086840D57D7F868C476AC8
    PassNTLMv2 9AB19C7C88EADFC4DE62B818E2878131 # Only for user ‘hjo’, domain ‘www.intranet.ou.nl’

  5. copy the password hash lines to //etc/cntlm.conf below username/domain.

That’s where I’m at now. It still doesn’t work, but we jumped through another hoop! :)

Printing

I followed now the Mac instructions again:

  1. Go to the “add printer” dialog
  2. Choose LPD printer, add the name.
    Name is something like MFP-XXX-A0YYYY. XXX for my building is HLR – my printer is MFP-HLR-A09550.
  3. Download the C360 printer driver (PPD) from the Konica Minolta website (I found multiple options, ended up using the file KOC360UX.ppd)
  4. Use this printer driver. Configuration:
    • paper source unit: PC-408
    • Finisher: FS-529
    • Punch Unit: none
    • Saddle kit: none
  5. Now you need to set up authentication. I’m not clear on how to do this (doesn’t work yet), but good info seems to be available from:
    • here for printers in the same class (Konica Minolta C220/280/360 share the same printer driver, apparently)
    • here for other printers.
      This explanation includes a link to an explanation on how to send the correct printer commands apparently.

This actually works!

PS: I was running this while using the Java Juniper client, so I was on the VPN.

Connecting to VPN (Juniper) on Ubuntu 14.04 64 bit

February 4th, 2015

The OU is using a VPN. You can connect with a Java applet, unfortunately, we’re still running an older version that relies on the 32 bit java version.

Instructions for working around that can be found
here.
Moreover, my home dir is encrypted, which apparently a problem (see comment about encrypted home dirs).
Solution to that one from here:
move the setuid binaries somewhere else and symlink them.
I.e.:

  • sudo mv $HOME/.juniper_networks/network_connect/ncsvc /opt/juniper-vpn/ncsvc
  • ln -s /opt/juniper-vpn/ncsvc $home/.juniper_networks/network_connect/ncsvc

This gets it working. Funnily enough, I still cannot connect directly to intranet – so what is Juniper now doing for me anyway? :)

Edit
Note that you should *ONLY* link the SUID binary. If you symlink the whole directory, it doesn’t work and Juniper crashes.
(Thanks Juniper, for that fun-filled 45 minutes of hunting the internet on why you crashed!)

Exchange + Google calendars in Thunderbird

February 2nd, 2015

Thunderbird logoPart 2 of getting set up. Obviously, I have an Exchange calendar. Obviously, people are going to be using that to gauge when I’m available. So I need to manage that calendar in a way that works.

Enter the Lightning plugin for Thunderbird! With the previously mentioned DavMail, you can get your exchange calendar in Thunderbird. Which kind of beats Microsoft’s web interface – though not by much.

I also added a Google calendar via CalDav (which works directly with Lightning). Adding and deleting events is nicely synchronized :) Adding another (big) Google calendar, however, borked the overview (appointments no longer shown), though the list above the calendar still showed correct info.

Connecting Thunderbird to an Exchange (Outlook) server

February 2nd, 2015

Thunderbird logoSo, my new employer uses Exchange servers for email (i.e. Outlook for clients). I’m not on an Outlook-supported platform, so that’s not ideal.

DavMail to the rescue! It’s a piece of software that runs under Windows, Unix and OSX. What it does: it translates the secret Exchange-Outlook mail protocol into public protocols (POP, IMAP, SMTP, CalDav, LDAP, …).
And it works quite beautifully! Though you’ll need openjdk-7-jre for it to run.

Next, you can set up Thunderbird to get your Exchange mail via DavMail (username at the OU: XXX@pwo.ou.nl). And it works beautifully!

In related news: it seems you cannot stop Thunderbird from checking an account: if you’re online, it’s trying to check that account. Annoying if you have an old account to which you no longer have access (but have a local archived copy).

WiFi op de Open Universiteit

February 2nd, 2015

OU logoEen verbinding maken met de medewerkers-wifi van de OU onder Ubuntu gebruikt de volgende settings:

  • WiFi naam: ou-medewerker
  • Security: WPA & WPA2 Enterprise
  • Authentication: Protected EAP
  • Inner authentication: MSCHAPv2
  • Username: XXX@pwo.ou.nl (met XXX = je login naam)
  • Password: je wachtwoord

Zo kom je op OU-medewerker. Om op intranet te kunnen, moet je NTLM authenticatie opzetten en configureren onder Ubuntu – zie een volgende post.

Buying a car in Luxembourg

January 25th, 2015

With the new circumstances (job this far away from family), getting a car was becoming a necessity. So, I bit the bullet and went for it!

In a nutshell
I bought a Peugot 3008, and it’s awesome! Also: get your secondhand car in Luxembourg from Peugeot – Occasions du Lion. They’re genuinely helpful and friendly.

The full version
I had found a small apartment near work. It was unfurnished, so I went to look for the same sleeping couch as I had bought in 2009. The store didn’t have those anymore, and the ones that came close comfort-wise were ugly. So I went to Roller, a nearby furniture store. Turns out that there’s a Volkswagen dealer right next to Roller. Well, I needed a car in the near future anyway, and they were open, so let’s have a look!

Peugeot 307 (2007, 56.000 km)There was a Peugeot 307 outside for about €8.500. Price seemed reasonable, car was a bit old (2007), but mileage was relatively low (56.000km). I went in to ask to see it. The salesperson I spoke to was… let’s say “less than enthusiastic”. Renault Scenic (2010)I sat in it, and found it surprisingly nice – a quite high seat. I asked if they had other secondhand cars. The only other occasion was a Renault Scenic from 2010. I sat in that one as well. It was quite a bit bigger, and seemed comfortable too – but half again as expensive. So hmmms.

I hesitated, took Aga & Antoś to see the cars, and the day after, my parents came. My mom to play with Antoś and my dad to go car-shopping with me. First, we stopped by a former colleague of a friend of ours, who had a BMW for sale. It turned out to be a car from 2002. That was really quite old. Moreover, the couple’s attitude towards keeping the car in shape was basically to have it hauled over in the garage yearly. That’s a good attitude, but it might become expensive for a car this old… those two things made this a less-than-desirable solution. I need something reliable, not something that will give me worries.

So onwards. My dad & I stopped at the Volkswagen dealer, and both cars met taciturn approval from my dad. Not enthusiasm, more acquiesance. Well, okay. Then we went back home, and stopped at a secondhand cars dealer near our home. This dealer was not connected to any brand, and sold all sorts of secondhand cars: relatively new, rather old, big, small, executive-class, etc. That was just great – walking around helped very much to get an idea what kind of car and what kind of quality you can get for your money. This helped me to accept what the kind of car I would like will cost.

Then we stopped quickly at another Volkswagen dealer (even closer to home), to look at their small selection of secondhand cars. Most were quite over my planned budget, one or two would be a stretch but perhaps. We skipped the BMW secondhand dealer (Aga & I had already checked it out — all over budget), and went home. Then my parents went home, dropping me off to test-drive the Peugeot 307. It was a bit of a hassle. I almost felt like I had to apologise. In the end, after some forms and copying of driver’s license, we were off. “We” indeed – I was not allowed by myself in the car, and there was a prescribed route.

Anyway, having driven it, I remained unconvinced. To have a point of reference, I asked to test the Scenic. It was too close to closing however, so no more test-drives. However, they did allow a quick (accompanied) drive over the parking lot. That cemented one thing clearly: I did not like the Scenic.

I now was ready to buy the Peugeot. The salesman, however, was not ready to sell it. Still busy with another customer. The mechanic who had accompanied me suggested I just hang around and wait. Me, I had other plans though. I had passed a Peugeot secondhand garage three times, only 5 minutes down the street. So I figured I’d stroll over and tell them (basically) “Hi, I’m about to buy a secondhand peugeot, and not from you. Can you show me why I’m wrong?”

So I strolled down the street. In the stroll I managed to put some words to my uneasy feeling about the 307. Basically, once I no longer needed the car to get to Luxembourg every week, I would want to get rid of it as soon as possible. I would not want to keep it any second longer than absolutely necessary. That was a clear message: this was the wrong car. So before I walked into the parking lot with secondhand cars, I was already looking for other options.

Citroen C3 (2013, 35.000km)
Peugeot 308 (2013, 23.200km)

On the parking lot, I saw three interesting offers: a Citroën C3, a Peugeot 208, and a Peugeot 308. Peugeot 208 (2014, 46.750km)Prices were roughly comparable, sizes were somewhat comparable. I went in, to find two salesmen chatting. They immediately turned to me and were ready to help me. I said I’d seen a few cars which interested me. “Which ones?” “… errr… I can point them out…”. Up the salesman jumped and pulled on a jacket. “Let’s go then!”.

Talk about a different attitude! I think that was the point where I decided to buy from him.

We looked at the three cars, and made an appointment for a testdrive the next day. I came in Saturday with the buggy – kind of important to see if it fits in the back. It worked more or less in all three. But then the salesman said “You know, you’re a familyman. I’ve got 2 Renault Megane’s in the back. They have roughly the same mileage, price is roughly the same, but you get a lot more car for your money.”

Renault MeganeSo I figured we can have a look. And sure enough, that was quite a bit more car for your money – color me interested! So I asked to testdrive it. He drove it around, got out, passed me the keys and said, “see you in 10 to 15!”

Talk about a different attitude! Again! I felt genuinely supported by him. I test-drove it, and it was quite nice. I came back, ready to buy it. The salesman came out with news. The Peugeot 3008, which I had seen outside for a good price, was indeed for sale (apparently, it was an impounded vehicle which could not be sold before the bank okay’d it). I asked to test-drive it. We went there, but couldn’t jumpstart the car. (for insurance reasons, batteries of all cars parked outside have to be drained.) So he just passed me the keys to another 3008, and off I went.

Within the first 200 metres, a smile made its way to my face. I came back, smiling, content. This is the kind of car you drive for fun! I walked into the office and exclaimed “LA VACHE! Vachement chouette!” – my best way of sharing my enthusiasm in French :)

So that’s the one I ended up buying:
Peugeot 3008
Peugeot 3008 inside view

Movie watching

November 27th, 2014

Over the last few months, Aga and I have picked up the habit of watching movies and series in the evening. I’ve been leveraging it to introduce some typical “cultural icons” to Aga, and also to watch some “classics” that I haven’t seen in a while / at all. Here’s a short and incomplete list with my thoughts:

  • Buffy the Vampire Slayer:
    I’ve watched this with Bras, Diana & the gang way back when, and now wanted to revisit and introduce it to Aga.
    Result: Fun! First season is rather dated now, though. Most episodes still work Some of the episodes I was looking forward to didn’t quite reach the dizzying hights I had edified them to. On the other hand, some episodes I expected to be throw-away monster-of-the-week ones were surprisingly good. Of course, Technology Marches On: the lack of mobile phones is sort of silly.
    Bras: you can have your DVD set back, we have finished now :)
  • The Breakfast Club:
    I thought this was a classic — in my mind, it was a classic. We watched it, me full of anticipation. Was rather a let-down. I suspect it’s a case of Seinfeld is Unfunny: the movie was probably groundbreaking in its day, setting new plots and exploring new venues in storytelling, movie making, etc. However, it was so good everyone copied it, and guess what? 35 years later, all of it has been done better. Still, it probably set the stage for a lot of things.
  • Footloose:
    Surprise to me! Here I expected something like “The Breakfast Club”, only less well-known. Turns out this movie aged a lot better. My guess why: where Breakfast Club was innovative just for setting the stage with “bunch of teenagers who initially hate each other but find they’re similar” (done a lot more since then), Footloose was memorable just for iconic music and a story that’s okay.
    Let’s not make it out to be more than it is: if you go in expecting another episode of Star Wars, you’ll come out feeling like you’ve just seen episode one ;-)
  • The emperor’s new groove:
    Long time no see. Seriously, the story is quite pedestrian and mediocre, but the way the characters keep breaking out of the story just to interject more fun is brilliant! See below :)
  • Notting Hill:
    One of Aga’s picks. Surprisingly entertaining! I didn’t really know much about the story, but it’s clear: Julia Roberts is really great for this romantic comedy thing :)
  • You’ve got Mail:
    Another one of Aga’s picks. I thought I knew some key points in the story (such as who finds out who the other is first). Turns out I was wrong. The movie was okay, but something that really irked me was how both main characters are behaving while they’re in a relationship. Sure, their relationship may not be all that great, but still. Both of them make big steps to ensure their significant others do not find out about the emailing. Tom Hanks’ character is the moral loser here, as far as I am concerned: while Meg Ryan’s character may feel dubiously, she’s not acting on her feelings in any inappropriate way. On the other hand, Tom Hanks proposes a date, and right outside the restaurant, before meeting her, he basically proclaims he’s madly in love and wants to marry this woman he’s only ever mailed with. Dude: that same evening you go to bed in the same bed as a woman who thinks she’s your girlfriend!!
    That basically ruined the movie for me
  • The Terminal:
    More Tom Hanks. Old movie that was a gift (to me) years ago, and we never came round to watching — mostly because of my gut feelings about it :)
    It was surprisingly entertaining. Goes to show: expect crap and you can be pleased by little (this movie, footloose), expect a lot and you’re in for disappointment by the same or even more (Breakfast Club).
  • The Sound Of Music:
    Introducing Aga to the wonderful world of Julie Andrews Christmas movies! I recalled the movie as being a classic, but a bit dark. Lessons learned: the movie does have its dark parts, but most of it is a joy-fest of laughter and singing. It’s a classic for a good reason – much more enjoyable than I recalled :)
  • Mary Poppins:
    More Julie Andrews goodness! And yes, it’s good :) We thoroughly enjoyed this one. Funny thing, this recalls to me movies that I enjoyed around the same time (like Herbie, or Witches and Broomsticks), which I’m not inclined to see. Mostly because I don’t expect them to hold up this well
  • Dracula Untold:
    Last movie Aga and I saw in the cinema. I did not have great expectations going in – basically, I expected some mindless entertainment. I was positively surprised.
    Not that it’s an intellectual giant of a film, but it was more than a little entertaining, and I wouldn’t mind watching it again.
  • The wizard of Oz (1939):
    The Judy Garland version. At first, I thought it was the wrong movie since it started in black and white – I was about to take out the DVD and return it :) Turns out that the color part was a major thing in this movie, and very novel at the time. It’s more or less suddenly thrusted upon the audience. Silly me :)
    The movie is more than a little enjoyable, and is warmly recommended.
  • Wreck-it Ralph:
    Highly enjoyable feel-good animated movie. However, I don’t think it has a large re-watch value.
  • Hotel Transsylvania:
    Similar: highly enjoyable feel-good animated movie. However, I don’t think it has a large re-watch value.
  • Monsters, Inc:
    I used to love this movie, but fell out of love after watching it a few years ago. It just wasn’t as good as I remembered it back then.
    Being all disappointed in advance works wonders: the movie was quite enjoyable this time through :)
  • Cocoon:
    I vaguely remembered having seen this on TV and being enamoured by it. So we picked up the DVD when we came across it.
    The movie is surprisingly entertaining. It was better than I anticipated, though it’s by no means a great movie.
  • The importance of being Ernest:
    Another Aga pick. I start fidgeting during such movies, although I do enjoy them. Same for this one: enjoyable, but expect me to fidget :)
  • Kung Fu Panda:
    One of Aga’s favourites. We’ve watched it a few times now (we’re wearing out the DVD I think ;-). Somehow, a lot comes together well in that movie.
  • Kung Fu Panda 2:
    Another of Aga’s favourites. We’ve watched it also a few times, though less. While it suffers a bit from “unnecessarily-tacked-on-sequelitis”, it definitely is entertaining.
  • Shakespear in Love:
    A rewatch for the both of us. Again, a romantic comedy, but again one that is somehow much more palatable for men. We both enjoyed the movie once again, and I noticed some things I hadn’t seen (or had forgotten).
  • The artist:
    Superbly interesting concept for me. And an enjoyable movie. The last line of the movie is fantastic :)
  • Singin’ in the Rain:
    Was shown outdoors, in front of the Grand Ducal palace. I hadn’t seen it before. And yes, though this list is in random order, I did see it after seeing the artist. Turns out the underlying premise is rather similar.
    Again, a very enjoyable movie, with plenty of musical highlights.
  • Shoot ‘Em Up:
    I keep on loving that movie, but Aga couldn’t quite get in the spirit and didn’t like it at all.
    Hey, whenever I’m sitting on a bench late at night in a downright nasty neighborhood eating a carrot, when a pregnant woman walks by chased by an aggressive fellow with a gun, I also think “not again” ;-)
  • Frozen:
    Okay-ish. I don’t get all the hype around it – then again, I’m not the target audience. (okay, so I do get the hype, I’m just not target audience ;-)
  • The Thomas Crown Affair:
    Watched it twice, once with my brother and then once with my brother and Aga. It’s just quite a nice movie — although my mind made the ending scene far better than it actually was (still good, just not as brilliant as I vaguely recalled).
  • The Italian Job (2003):
    Half-saw this one. Typical mediocre movie: entertaining while it lasts, but you don’t miss out by not watching it.
  • Mulan:
    Another animated movie. Aga likes animated movies, as do I, so that’s an easy pick. Mulan remains entertaining, even after the third watching.

Plenty of options left though. Some from my ‘todo’ list:

  • The Wiz
  • The Great Gatsby (2013)
  • Turbo (animated movie) – though from what I read, not that good…
  • The Boondock Saints
    This is going to be a re-watch. Aga hasn’t seen it yet, so I’m curious what she’ll think about it.
  • … and others!

Ubuntu and WiFiMax as access point!

October 21st, 2014

Years ago, I bought a “WifiMAX” usb dongle that (under Windows, with the packed CD) would coax your computer into creating a wifi network to share with your Wii.

I dug it out to check if I could get that working under Unix.
The problem I ran into way back when was that the WiFi driver could not switch the USB stick to Master Mode (read: become an access point). Now, I found out
how to do that. Hooray for me!

Of course, I’m not there yet – the phone can find the network, but now it still needs to forward everything from its normal Internet connection (i.e. bridge ppp0).

To prevent failure in case of linkrot, below is a recap of the partial solution provided by the above link.

You need:
– sudo apt-get install hostapd
– sudo apt-get install isc-dhcp-server

# turn the wifi off - can also just click "Enable WiFi"
sudo nmcli nm wifi off
# deblock Wifi with rfkill
sudo rfkill unblock wlan

# bring the wifi back up & wait a bit
sudo ifconfig wlan0 10.15.0.1/24 up
sleep 1
# start the DHCP server
sudo service isc-dhcp-server restart
# start the Access Point server
sudo service hostapd restart

Remaining challenges:
– get an IP (somehow not working)
– setup WPA2 (if I try, I get authentication errors)

Edit: the main challenge is that I’m using a 3G usb modem as my internet connection. That modem does not speak IP (but ThreeGeese). So standard bridging solutions don’t work – the packets arriving at the computer are not in ThreeGeese and thus cannot be forwarded.
Pointers to investigate:
https://help.ubuntu.com/community/SharingMobileBroadband
http://ubuntuforums.org/showthread.php?t=1822957

Android says “Currently unable to download”…

October 21st, 2014

Well doh, my phone hardly ever has a connection.
Funny thing, the problem persists even after it was connected to the Internet.
It seems to be caused by trying to download an MMS. You cannot download MMS’s over the Internet – they’re not on there, they are on the cellular network. Moreover, I had actually turned off MMS downloading (never use it, so prevent accidents).

To prevent the popup message from appearing at random times, go to the Messages app, settings -> MMS, and uncheck “auto-retrieve” (or similar named setting).