Calendar doesn’t reload? Reload Akonadi!
Reminder to self: When KOrganizer refuses to reload your remote calendars, no matter how hard you press F5 (reload calendars), and when all hope is lost because even in the KDE system settings there’s no way to reload calendars, and when you’ve banged your head against the monitor often enough after reading all the good advice that suggests you should simply recreate your calendars with the same settings, then delete the old calendars: Wait. What you need to do is simple and straightforward, and if you weren’t a moron just like me, you’d have guessed it, anyway:
Reload Akonadi.
To do that, locate the funny little arrow up in the KDE system tray, right-click on the “Akonadi module” button, select “configure”, then select the “configuration of the Akonadi server” tab, and press the “restart” button. Go back to KOrganizer, reload your calendars, and voilá — they’re updated.
This is completely intuitive and perfectly easy to understand, but I keep forgetting it.
Workaround for copying things from an Android device on KDE 4.10
Here’s the only workaround (out of half a dozen suggestions found via Google) that actually works for me (KDE 4.10, Galaxy S2, Android 4.0.3).
First, install ‘go-mtpfs’ and dependencies needed on your system. ‘go-mtpfs’ is a program written in Go that can mount an Android device reliably. I call it like this:
go-mtpfs /media/s2 &
The output is something similar to this:
Error: Unable to open ~/.mtpz-data for reading.
2013/04/04 12:38:25 compiled against libmtp 1.1.6
Device 0 (VID=04e8 and PID=6865) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
2013/04/04 12:38:25 device unknown: unknown (04e8:6865) @ bus 2, dev 23
:
2013/04/04 12:38:25 storage ID 65537: Phone
2013/04/04 12:38:25 storage ID 131074: Card
2013/04/04 12:38:25 backing data /tmp/go-mtpfs161880298
2013/04/04 12:38:25 starting FUSE.
Once mounted, I call a script that copies images and videos from the device, and when done, unmounts the device. The script looks like this:
from="/media/s2/Phone/DCIM/Camera"
to_fotos="/mnt/mneme/backup/themis/fotovideo/fotos.2013.stefan"
to_videos="/mnt/mneme/backup/themis/fotovideo/videos.2013"
cd $from
ret=$?
if [ $ret -gt 0 ]; then
echo "*** Error: Camera not mounted ***"
exit
fi
rsync --times --verbose --update --chmod=ug+w $from/*.jpg $to_fotos/
ret=$?
if [ $ret -eq 0 ]; then
echo "*** Success: All pictures copied ***"
fi
rsync --times --verbose --update --chmod=ug+w $from/*.mp4 $to_videos/
ret=$?
if [ $ret -eq 0 ]; then
echo "*** Success: All videos copied ***"
fi
cd ~
fusermount -u /media/s2
The output of the script is something like this:
2013/04/04 12:39:21 fetched "20130403_212621.jpg", 914042 bytes in 245 ms. 3.7 MB/s
20130403_212621.jpg
2013/04/04 12:39:21 fetched "20130403_212628.jpg", 835851 bytes in 96 ms. 8.7 MB/s
20130403_212628.jpg
2013/04/04 12:39:21 fetched "20130403_212645.jpg", 1044704 bytes in 79 ms. 13.1 MB/s
20130403_212645.jpg
sent 2806681 bytes received 71 bytes 1122700.80 bytes/sec
total size is 707008144 speedup is 251.90
*** Success: All pictures copied ***
2013/04/04 12:39:23 fetched "20130403_212651.mp4", 16403453 bytes in 1259 ms. 13.0 MB/s
20130403_212651.mp4
2013/04/04 12:39:26 fetched "20130403_212841.mp4", 25465650 bytes in 2193 ms. 11.6 MB/s
20130403_212841.mp4
sent 41875298 bytes received 50 bytes 4407931.37 bytes/sec
total size is 3251470895 speedup is 77.65
*** Success: All videos copied ***
The performance of the ‘rsync’ operations is comparable to how it used to be with USB connections. Those have stopped functioning in KDE 4.10, that’s why I had to find an alternative way. With ‘go-mtpfs’, things are actually easier than before: Just plug in the Android device, call ‘go-mtpfs’, then the script that copies, and done.
Android via USB on openSuse 12.3
So I felt like a Windows user this morning, restarting my computer (openSuse 12.3) and my Galaxy S2 (Android 4.0.3), hoping this would fix the issue I was encountering. But it didn’t, so I had to activate my brain to fix it.
In previous versions of openSuse (and/or KDE, currently I’m on KDE 4.10), plugging in the Galaxy S2 via USB would make the Device Manager pop up, kind of telling me “the Android is mounted”. But this doesn’t happen any more; the S2 only shows up in the Device Manager when it’s NOT connected in USB mode (in which case it will show up as a “portable media player”). In the non-USB mode, I can’t copy any files unfortunately, because there’s a KDE bug that prevents me from doing so.
OK, so the S2 doesn’t show up in the Device Manager, but is it being mounted in USB mode, anyway? Well, once the brain was on, looking at the output of mount confirmed it was, but it’s mounted in a place completely different from previous openSuse versions. Previously, the photo and video folder used to be mounted on /media/9650-11FF/DCIM/Camera, while now it is /var/run/media/stefan/9650-11FF/DCIM/Camera. Just thought I’d do a quick post to save other openSuse users (or maybe this is KDE-specific even) some time.
Telekomiker, nicht ganz so komisch
Heute Nachmittag, kurz vor 15 Uhr, gut gekleideter Mensch an der Haustür. Hält mir seinen Telekom-Ausweis vor die Nase. “Sie wissen, dass Ihr Haus demnächst auf VDSL umgestellt wird?” – “Ja, hat mir Versatel schon gesagt. Meine Leitung wird auf 16.000 MBit/s umgestellt.” – “Das geht nicht automatisch. Versatel mietet die Leitungen ja von der Deutschen Telekom. Sollen wir Ihnen dabei behilflich sein?” – “Klar, warum nicht.” – “Dürfte ich kurz mal rein kommen?” Durfte er.
Als nächstes legte mir der gut gekleidete Herr einen Flyer der Telekom vor. “Für Sie bleibt es natürlich bei den bisherigen 34,90 €.” Gut informiert, der Mann. Ich zahle bei Versatel tatsächlich 34,90 € pro Monat. “Gut, dann brauchen Sie eigentlich nur hier unterschreiben, und wir regeln dann den Rest.” – “Äh, Moment mal, wollen Sie mir gerade einen Telekom-Vertrag verkaufen.” – “Ja, aber Sie sind ja eigentlich schon Kunde bei der Telekom, indirekt. Versatel mietet die Leitungen ja von uns.” – “Das will ich jetzt aber nicht.” – “Schon gut, dann regeln Sie das eben selbst. Ein schönes Fest noch, und danke fürs Gespräch.” Und schon war er wieder raus.
So was Blödes, ich habe mir nicht den Namen geben lassen. Wenn der Typ echt war, also von der Telekom, hätte er mir einen Vertrag angedreht, obwohl ich gerade bei Versatel verlängert hatte. Dann hätte ich zwei Verträge an der Backe gehabt und meine liebe Mühe, den Haustür-Vertrag bei der Telekom zu kündigen. Wenn er nicht echt war (wovon ich mal ausgehe), werde ich meine Haustür in der nächsten Zeit sorgsam verriegeln, auch wenn ich nur mal kurz aus dem Haus bin.
Android 4.0 makes usbStorage folder unavailable on Galaxy II
Upgrading to Android 4.0.3 got me this (as posted on this forum):
So I got a Galaxy II from my phone provider with Android 2.3.6 installed (IIRC). I recently upgraded to Android 4.0, as provided by Samsung. The phone didn’t blow up or anything, but I’ve got a nasty bug now.
When connecting the phone to the (Linux) PC with the USB cable, I can see the folders fine, including DCIM and usbStorage. I can copy files from the PC to the usbStorage or the DCIM folder, just like before. But after disconnecting USB, when looking at the folder I copied the files to (usbStorage or DCIM/some-subfolder), there’s nothing! Connecting to the PC again, I can see them in the PC’s file manager (Dolphin under KDE), or on the command line, where they’d show up like this:
atlas/media/9650-11FF> l usbStorage/ insgesamt 4480 -rw-r--r-- 1 stefan users 4582266 2. Aug 15:24 L001-LESSON.mp3 -rw-r--r-- 1 stefan users 1006 2. Aug 15:24 L001-LESSON.txt
But when looking from the Galaxy, no luck. Nothing.
Digging further, I keep finding lots of items in LOST.DIR (not sure though if they’re related, all 4 KB in size), and often enough items in .Trash-1000/files which are certainly related (sometimes even with the exact same file names). I guess there’s a bug in Samsung’s “File-Stor” Gadget. As said initially, the bug wasn’t there in the previous Android version.
Sway
Uploaded a fresh piece of music on Soundcloud. Note this is right off the tape, and still work in progress. The song comes to an immediate halt at about 20 minutes.
The song is called Sway, and as it says on Soundcloud, it’s meant to seesaw by, at 90 bpm (not sure if you can seesaw as fast, or as slow, depending on how you keep stroke on the swing).
Instruments used are drums (VST, 2 different sets), occasionally some electric bass, grand piano, Embracer (synth), Monologue (synth), Padshop (synth), Retrologue (synth), harmonica, mandolin, and guitar.
No change in rythm, Sway is in four-four time, so you won’t have to adjust your seesaw rhythm while listening. Most of the individual parts have 32 strokes, which makes them roughly one and a half minutes long.
I’m thinking of adding more instruments as I continued adding more parts, maybe some strings (viola, cello mostly), and possibly even some choir. Or maybe I’ll just stick with the current instrument set.
Calendaring on Linux and Android, again
One of the things I dearly hate about working on Linux is calendaring. There are many options for calendars, and over the years I’ve found they all work to some extent, but don’t support all my requirements. I think my requirements are fairly standard:
- Calendars must be available on all my machines, including my phones.
I was trying to think of more requirements to justify a bullet list, but really I can’t. When I say “available” I mean “out of the box”, without having to set up some fancy convoluted solution involving shell scripts that copy calendar files around, which is actually what I’ve seen too often as a suggested solution to overcome calendaring shortcomings on Linux.
Over the years, I’ve been using Sunbird (I liked it a lot, but it’s unfortunately a dead end and won’t run on my 64-bit boxes any more), Thunderbird Lightning, and KOrganizer. I looked at other stuff such as Kontact on KDE, but that simply, uh, won’t fit my needs.
KOrganizer was good enough for me, until I started using an Android phone this week. I bet there are zillions of apps for that phone that would support my WebDAV-based ICS calendars, but that’s exactly the problem. I tried a few, but they were either trial ones, or full of spam, or messed up my Android interface, and so on, and I don’t intend to spend my time investigating lots of crap, hoping I’ll stumble across a working solution some day.
So, once I had given up that idea, I converted my ICS calendars to Google calendars. I don’t feel overly comfortable doing this, because I’m one of the old fashioned crowd who believe that private data should be mostly on private machines that I have control of. Anyway, I did that, and my Google calendars display fine in the standard Android calendar app that came with my phone (Samsung Galaxy S2).
The next step was to make them show up in KOrganizer. Google uses CalDAV. KOrganizer uses Akonadi (on KDE 4.x) which is a service that runs in the background and is used to attach calendars and all kinds of similar stuff to “KDE”, in this case to make calendars available for KOrganizer. Akonadi features CalDAV and Google calendars, as you can see from this screen shot:
So there must be a way to attach my Google calendars in KOrganizer, right? Well, wrong, at least for me. I searched a lot, found a dozen blog or forum posts and stuff, but they were all referring to some slightly different setup than mine (why do developers change the interfaces all the time), or simply didn’t work. I was able to work around a “wrong password” error (guess what? the password was correct, it was some fancy openSuse proxy thing that could be fixed in the KDE system settings by selecting “direct internet connection”), and eventually had a Google calendar show up in KOrganizer, except it wouldn’t display any events. Long story short, I gave up after having wasted too much time on this already, and looked at Thunderbird Lightning again (which I had given up on several years ago when it developed a habit of resetting my ICS calendars to zero byte length).
Thunderbird Lightning 1.4 supports CalDAV calendars, and thus Google calendars, out of the box. At least in theory. In practice, it does pretty much the same I had just experienced with KOrganizer: calendars are there, but don’t display any events. With Lightning, I found that, when setting up a Google calendar, it wouldn’t prompt me for username and password (and no, most of my calendars are definitely not public). That can’t be right! So I searched more, and finally found that you’ll have to install yet another add-on in Thunderbird, called Provider for Google Calendar 0.9.
With that add-on, Google calendars work fine. And not just that, the developer’s web page points out which of the many Google calendar links you’ll have to use. In the Google calendar web interface, select “Calendar settings” from the little pull-down menu that appears when hovering the mouse over the calendar name in the left sidebar. On the next page, scroll down to the bottom, and here’s what you’ll have to select:
In the window that opens, copy the link address. That’s the one to be used for Lightning.
In Lightning, select “New calendar”, “calendar on the network”, select “Google calendar” (this is what the Provider for Google Calendar add-on provides), paste the link address, and done. Things can be so easy once you know your way around.
To wrap up, this is what I did to get Google calendars working in KDE:
- In Thunderbird, install the Lightning add-on.
- In Thunderbird, install the Provider for Google calendar add-on.
- In the Google Calendar web interface, edit the calendar, click the proper XML button, and copy the URL (link).
- In Lightning, create a new calendar “on the network”, type: “Google calendar”, and paste the URL (link) from the Google Calendar web interface. You’ll be prompted for your Google username and password.
- Do so for every Google calendar you wish to add to Lightning. Note that you’ll be prompted for your Google credentials for each calendar you add.
Some might wonder why I don’t simply stick to the Google Calendar web interface, which is really nice and configurable for my needs. Well, I don’t want my calendars to be just another browser tab. I have around 30 browser tabs (Firefox app tabs) open all the time, but calendars are simply too important for my daily (or should I say hourly) work, and I don’t want them to be even slightly buried in the browser.
Good luck with setting up your remote calendars on Linux!
