Friday, August 30, 2013

Sync Orage and Google Calendar

I wrote in my previous post that Orage, the calendar application in XFCE, does not Sync with Google Calendar. This is true, but there is a way to enable Orage to sync with Google Calendar, so that events added to Google Calendar will appear in Orage, but not the other way round.

To sync Orage with Google Calendar, it's possible to download Google Calendar in iCalendar format and import this into Orage.

To download the file, go to calendar settings and right click the green ICAL button next to Private Address.

Select Save Link As (or similar, according to browser) and save the file.

To import into Orage, Go to File > Exchange data > Foreign files, click the Open button, navigate to the saved file (basic.ics) and click Add. Events from Google Calendar will be added to any local Orage events.

To automate the process, we can use a cron command.
wget -N
The -N parameter will overwrite the file if it is newer on the sever, rather than adding files bacis.ics.1, bacis.ics.2 etc etc which we don't want.

To get the calendar URL, right click on the green ICAL button again but this time select Copy Link Location (or similar, according to browser).

Paste the address into a text editor to see it. There is a problem here because the Google email address that the URL contains will have been transformed into HTML URL Encoding,  so joesmith@gmail.com will have become joesmith%40gmail.com (see: Try It Yourself) and the % character will not work in a cron command. Edit %40 back to @, so the full command looks like this:
wget -N https://www.google.com/calendar/ical/joesmith@gmail.com/private-/basic.ics
Now we need to run the command once a day. Corenominal has a cron tutorial which covers this. Note: it may be necessary to specify the full path to wget with this method: /usr/bin/wget. I used a GUI application which uses cron to schedule tasks: Gnome-schedule, where the above command worked OK. Although it's a Gnome app, it installs in XFCE without needing any dependencies, and is simple to use.


The Run button didn't seem to work for me, perhaps because it is a Gnome app and is not properly configured to launch a terminal in XFCE. If you want to check your cron command is working, change Date & Time to Every minute and watch the basic.ics file appear in your home directory, then reset to daily, of course.

Update Nov 2022.

Here's a nice script from Stuff, geeky stuff to handle the download from the new Google location. As the author suggested, I did need to edit the wget command to one line. I edited the script slightly to add Google calendar information as a foreign file so I could keep local calendar entries.

# mv ~/.local/share/orage/orage.ics ~/.local/share/orage/orage_old.ics
mv ~/calendar/basic.ics ~/.local/share/orage/basic.ics

I also added the header #!/bin/bash, which probably anybody familiar with scripting would take for granted, but I add for the benefit of people like me who only hack other people's code from time to time.

I tried Adam MacLeod's suggestion from the comments using davespagnol's guide, but Google seem to have made obtaining a CalDAV API even more complicated since that guide was written - I gave up when they asked me to enter credit card details. Access seems to be aimed at software developers or businesses or institutions. Syncing works in Thunderbird so why bother?

Thursday, August 29, 2013

Sync local calendar with Google Calendar in Debian XFCE

XFCE has a calendar, called Orage, but it doesn't sync with Google Calendar. For those of us with an Android mobile who like to get notifications of events from our PC calendar, there is an alternative in the Debian repositories.

Iceowl is a calendar extension for Icedove (Versions of Mozilla's Thunderbird and Lightning extension) and there's a Google Calendar add-on for Iceowl.


With these packages installed, open Icedove and check Calendar in Events and Tasks.

Navigate to File > New > Calendar and check On the Network.


Open Google Calendar in a browser and click the drop-down menu next to your calendar.


Select Calendar settings, then click on the XML button next to Calendar Address:


This will give you an address to copy and paste into the Location box in the On the Network dialogue box above.

Enter an event in your calendar, click on Synchronize,and it should appear in Google Calendar.

Tuesday, August 27, 2013

HP Deskjet 3050 j610 on Debian Wheezy XFCE

Installing this printer on Debian Wheezy was breezy. I went to Settings > Printing and the printer was discovered: all I had to do was choose the connection.

As I'd previously given the printer a static IP address, I didn't use the DNS setting.

This is in contrast to the installation in Debian Squeeze, where I had to install HP Linux Imaging and Printing (HPLIP) from the HP website.

Credit to HP for making support available for new printers in Linux, but it is nice to find that the latest version of Debian comes with that support built in.


Thursday, August 22, 2013

Keep system clock up to date in XFCE

There's no GUI in XFCE to synchronise the system with a time server, and synchronisation doesn't happen by default, but the installing the Debian NTP (Network Time Protocol) package will cause the system clock to be kept up do date.

Check system time before and after with the excellent time.is website.

Time in United Kingdom:

Cleaning a Compaq Presario 900 laptop fan

This laptop is ten years old now, so there can't be too many about, but if you do have one, here's how to clean it.

Not by taking out every screw on the bottom of the laptop, which is what I tried. Just take out the two screws in the back behind the multimedia keys panel and gently pop it out, then the keyboard will lift up to reveal the fan.



Or I should say fans, because there are actually two. There's one conventional fan which blows air through a grill connected to the heat sink, and another small circular propeller-type fan in the back on the right whose purpose was not clear to me.

The heat sink grill was not especially dirty considering it hadn't been cleaned in ten years, but enough to restrict air flow.


It's surprising considering the fact that  laptop fans need regular cleaning how difficult they can be to access, especially when you don't know what you're doing.

With a nice clean fan, the laptop runs Debian Linux just fine, even if it is ten years old. Dig out that old laptop, clean it up and give Linux a spin!


Esoteric mouse pointer issues in XFCE

I rather like the DMZ Black mouse pointer theme, even though it is very similar to the Adwaita theme, which comes installed on Debian Wheezy XFCE. In the optimistic hope that there may be a handful of people among the billions that inhabit the Earth who share the same taste, I'm going to describe a problem and document the solution I found.

After installing the DMZ theme from the Debian repository and choosing DMZ Black in settings, the mouse pointer appears black over some applications and white over others.

The solution is to look in /usr/share/icons/default and edit index.theme:
[Icon Theme] 
Inherits=DMZ-Black
As described here.

Liferea dark panel icons

I found some really good monochrome panel icons for Liferea a while ago, but after a recent reinstall, I couldn't remember where, so I made some of my own.
If anybody recognises the icons, please let me know where I found them originally, so I can give credit to the designer.

Meanwhile, here are my icons for anybody who want to use them, and for me if I lose them again.
(Panel icons are elementary-xfce-dark).

Edit: Copy the icons to /usr/share/liferea/pixamps.

Wednesday, August 14, 2013

Monday, August 12, 2013

Android adware

Zscaler ThreatLab has a interesting report on adware in Android, and the discrepancy in detection rates between AV companies.
Google has plenty of incentive to allow apps with aggressive advertising practices. AV vendors on the other hand have no such incentive but are instead under pressure to show that they are adding value by identifying malicious/suspicious/unwanted content. As such, there is a big gap between Google and AV vendors when it comes to adware. Ultimately, end users are stuck in the middle as they are left to decide if they will keep or delete the apps being flagged.
Zscaler reference Lookout in creating a definition of unacceptable behaviour in adware:
  • Harvests excessive personally identifiable information
  • Performs unexpected actions in response to ad clicks without appropriate user consent (appropriate user consent entails providing a clear alert in the application that the user can accept or decline before any behavior takes place)
  • Collects IMEI numbers, UDIDs or MAC addresses
  • Initiating phone calls and SMS messages
  • Changing wallpaper and ringtones
  • Leaks location information
  • Leaks email addresses
  • Leaks personal information such as contacts, birthdays, calendar appointments, etc
At the moment, as the Zscaler report highlights, Google may be allowing apps that exhibit unacceptable behaviour on Google Play, but AV companies are not consistent in their definition of what constitutes unacceptable behaviour, and it is left to the user to make a decision about what to install.

In relevant other news, Google has acquired VirusTotal, which, coincidentally or not, is now available as an Android app, so the paranoid Android user may check to see if any AV company detects their apps as adware or other malware.

Hat tip: GOT2.ME

Saturday, August 10, 2013

Tor browser served malware

The Tor browser (part of the Tor Browser Bundle) has been served malware on a compromised website as the result of a security vulnerability in the browser, a version of Firefox. US security services are allegedly responsible for the malware, which reports the user's IP address to a third party. The suggestion is that security services are trying to identify child pornography users.

Foss Force has the story, and repeats a claim made on eWeek that the browser in the Tor Browser Bundle was left insecure for weeks. The Tor blog rejects this claim, arguing that a security update was available.

To me it seems that Tor is correct here: only users who had not updated to the secure version were vulnerable. The Tor Browser Bundle had a warning on its start page advising users to get the security upgrade.

My own interest in the Tor network, I should point out, is the evasion of internet restrictions placed on users by countries which do not respect freedom of speech and information. I recently used it to evade a block on Blogger by the country I was staying in, a petty and profoundly undemocratic action, which I felt no compunction about evading. However, out of respect for my host nation, I won't reveal which country it was.

Linux Banking Trojan

With Windows computers beset with banking Trojans, and Linux seen as a secure alternative, it was never going to be long before similar malware appeared for Linux: the user base may be small, but with those users doing their banking on Linux, the reward was likely to be worth the effort.

The RSA blog has the story of the Hand of Thief Linux banking Trojan.

The Trojan's sales agent (yes, there is such a person) has very kindly let Linux users who bank online know what to watch out for.
[I]n a conversation with the malware’s sales agent, he himself suggested using email and social engineering as the infection vector.
I suppose the usual suspects will claim that this shows the need for an anti-virus program on Linux (again), but I still don't believe that is necessary. Not installing Linux executables from untrusted sources remains the key to security, and I have no information yet about detection rates for this Trojan.

Update: the avast! Blog has an analysis of the Trojan,  with links to a VirusTotal analysis, showing which AV programs detect the malware (avast! being one , of course).