Posts filed under ‘Computer’

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.

2013/05/16 at 15:41

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:

cd $from
if [ $ret -gt 0 ]; then
echo "*** Error: Camera not mounted ***"
rsync --times --verbose --update --chmod=ug+w $from/*.jpg $to_fotos/
if [ $ret -eq 0 ]; then
echo "*** Success: All pictures copied ***"
rsync --times --verbose --update --chmod=ug+w $from/*.mp4 $to_videos/
if [ $ret -eq 0 ]; then
echo "*** Success: All videos copied ***"
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
2013/04/04 12:39:21 fetched "20130403_212628.jpg", 835851 bytes in 96 ms. 8.7 MB/s
2013/04/04 12:39:21 fetched "20130403_212645.jpg", 1044704 bytes in 79 ms. 13.1 MB/s

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
2013/04/04 12:39:26 fetched "20130403_212841.mp4", 25465650 bytes in 2193 ms. 11.6 MB/s

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.

2013/04/04 at 12:48

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.

2013/03/21 at 11:53

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.

2012/08/02 at 15:51

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:Akonadi options on KDE 4.x

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:

Google calendar links

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!

2012/05/10 at 11:58

DocBook export and import round trip with Confluence wiki

DocBook export and import round trip with Confluence wiki by Sarah Maddox of Atlassian. I’ve seen lots of attempts to combine Wikis and more sophisticated methods of writing documentation (e.g. using DocBook) over the years, but all were cumbersome and errorprone. The import/export roundtrip illustrated by Sarah looks like the first approach at combining Wiki and DocBook in an “out-of-the-box” way. From reading her post, it’s not error-free, and also uses tools from various companies (Scroll Wiki DocBook Exporter for Confluence, by K15t, and DocBook Import for Confluence, by RedHat), but still it’s encouraging to see that there seems to be progress in that field.

2012/03/01 at 10:57

KOrganizer doesn’t show calendars

Newer versions of KOrganizer rely on Akonadi, a system-wide KDE service that was created to annoy users. Without Akonadi running, KOrganizer won’t display any resources, that is, calendars. They’ll show up as configured in the KOrganizer settings, and also in the KDE system settings, which can be quite confusing when you try to find out why the heck KOrganizer won’t display the calendars when they’re obviously there.
I must have disabled Akonadi while disabling Nepomuk, an indexing service in KDE that was invented to annoy users even more. (I was fine with the “locate” command. It was fast, reliable, and didn’t eat resources without end.) Anyway, enabling Akonadi once it’s disabled isn’t particularly easy, since you cannot do it from the system settings. You need to run this command (as user, not root):


And voilà – Akonadi is back again. Kill all KOrganizer instances (it loves to live on after terminating it with File, Quit):

ps aux | grep korg
(look at the process IDs)
kill -9 <process-id>
kill -9 <process-id>

Then start it again. Resources (calendars) will show up; just tick those you want to display.

2012/02/01 at 15:17

Ältere Beiträge

November 2014
« Jan    

Aktuelle Beiträge

Enter your email address to follow this blog and receive notifications of new posts by email.

Schließe dich 270 Followern an


Erhalte jeden neuen Beitrag in deinen Posteingang.

Schließe dich 270 Followern an