ownCloud unable to add new users – A user with that name already exists.

Using owncloud 8.2, when adding a new user it can error saying that the user already exists, regardless what username you put in.

owncloud user already exists

This turned out to be a problem with an App called “User backend using remote HTTP servers”, disabling this resolved this error for me.

If you are using the standard ownCloud authentication method then this App should not need to be enabled.

Reduce Pipelight/Netflix CPU usage on Intel HD graphics by disabling hardware acceleration

I have been trying to solve a problem viewing Netflix on my laptop. I was annoyed by the laptop fan running high while playing video making it difficult to hear the audio from Netflix.

The laptop has a current generation Intel Haswell i5 4340M CPU with Intel HD4600 graphics and I’m running Linux kernel 3.16 on Kubuntu 14.04 although this problem existed on kernel versions 3.14 and 3.15. I mention this because YMMV particularly with different GPU makes.

The solution I found is to disable GPU hardware acceleration on Pipelight, this drops the CPU usage from 30-40% to under 20% allowing the laptop to run cooler and use less power, meaning a quieter laptop and longer battery life.

Before, GPU acceleration on:

sysmon_netflix_ss_gpuhwaccel_on

After, GPU acceleration off:

sysmon_netflix_ss_gpuhwaccel_off

It is possible to disable hardware acceleration permanently using the instructions on the Pipelight website here, however I prefer to be more selective and have created myself an application launcher to start a new Firefox Window that opens Netflix immediately, the launcher command line is:

PIPELIGHT_GPUACCELERATION=0 firefox -new-window http://www.netflix.com

I would normally expect hardware acceleration to reduce CPU load because this hands off the video decoding work onto the GPU but the opposite appears to be happening here, I don’t know why this is the case, the CPU seems barely notice that it’s decoding 1080p video so it might be some magic built into integrated Intel chips but if anyone has any better theories I’d be interested to know!

The end of XP

Be honest now, are you still using Windows XP? There’s no need to be embarrassed if you are, you aren’t alone, 12 years after it was released Windows XP is still the 2nd most popular operating system in the world with 17% of the market share.

For many years now Microsoft have been encouraging their users onto newer Windows versions such as Vista, 7 and 8, but a lot of people are still very happy with Windows XP and are refusing to budge.

The recession is no doubt partly to blame, new computers are expensive and Windows XP works well on older hardware so why change? Another reason is Microsoft’s own variable release quality, Vista was highly criticised, Windows 7 fixed Vista’s issues and became very popular, but Microsoft moved quickly onto Windows 8 with its new touch interface and bold colours that has put many people off.

However, the problem we now face is that on April 8th 2014 Microsoft will stop supporting Windows XP and many millions of users will be left out in the cold, but what does this mean?

The second Tuesday of the month is marked on many IT professionals calendars as “patch Tuesday“. This is the day when new updates are published to fix bugs and security vulnerabilities recently discovered in Windows operating systems. April 8th 2014 is the last patch Tuesday that will include Windows XP, after this date new vulnerabilities discovered in Windows XP will never be fixed and your computer will be exposed to these vulnerabilities until you upgrade to a newer version of Windows.

What is worse is that black hat hackers watch Microsoft’s movements in the security world with great interest. Often Microsoft are responding to exploits discovered “in the wild”, other times these vulnerabilities are discovered by Microsoft first and so have limited effectiveness against supported operating systems because many will be quickly fixed. However hackers can now look at what is being fixed in Windows Vista/7/8 and you can be guaranteed they will be testing Windows XP to see whether it too is vulnerable.

So what can you do? Ultimately, you will need to upgrade from Windows XP, ideally before April 8th 2014 lands. In some cases this won’t be possible so if you are stuck with Windows XP for the time being then you must be extra vigilant against security threats

Keep your anti-virus updated, make sure you are using 3rd party anti-virus because Microsoft is also ending support for XP in Windows Security Essentials.

Be extra wary of using software from untrusted sources either via downloads or physical media such as USB pen drives. These can carry viruses exploiting XP’s growing number of unpatched vulnerabilities.

Finally, bear in mind that your computer is now overdue for an upgrade.

Growing the root filesystem on Arch Linux ARM for the Raspberry Pi

Changes to the partition layout in the July 2013 image invalidate the information in this post, please see the comment section for details.

I run Arch Linux on my Raspberry Pi, this defaults to creating a 2GB partition for it’s data which I needed to extend to access the remaining space on my 16GB SD card. I’ll explain how I did this below but only do this on a newly installed Arch installation so if anything goes wrong you do not lose any data.

To start I’m assuming you’ve installed Arch on your SD card, if you haven’t follow this guide to show you how.

Boot Arch on your Raspberry Pi, log in as root on the console or via SSH, either way works fine. To start we will remove the partition containing Arch and replace it with another partition starting in the same location but ending at the end of the SD Card, this will vary depending on the size of the card you have.

[root@alarmpi ~]# fdisk /dev/mmcblk0

In fdisk,

  1. Press ‘p’ to print the partition table, take note of the number in the Start column of the row starting ‘/dev/mmcblk0p2’
  2. Press ‘d’ to delete a partition then enter ‘2’ to choose the second partition
  3. Press ‘n’ to create a new partition, all the default options are fine:
  • Choose ‘primary’ partition type
  • Partition number 2
  • The starting block should be same number you took note of in step 1
  • The default ending block should be the last available block on the SD card, this will vary depending on what size SD card you have

4. Press ‘w’ to write the new partition table and return to the bash prompt

Reboot now to force the kernel to recognise the new partition table.

[root@alarmpi ~]# reboot

After reboot we now we have the same two partitions we started with except that the second partition containing the root filesystem is now larger. However, the root filesystem is still only 2GB so we now need to resize the filesystem in order to fill the partition.

[root@alarmpi ~]# resize2fs /dev/mmcblk0p2

And there you go, you can now run ‘df -h’ to view your new partition sizes! Here’s mine…

[root@alarmpi ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  457M   14G   4% /
devtmpfs         51M     0   51M   0% /dev
tmpfs           105M     0  105M   0% /dev/shm
tmpfs           105M  260K  105M   1% /run
tmpfs           105M     0  105M   0% /sys/fs/cgroup
tmpfs           105M     0  105M   0% /tmp
/dev/mmcblk0p1   90M   24M   67M  27% /boot

GTK theming QT apps

It’s becoming more common to run a mixture of apps using the QT toolkit (as seen in the KDE desktop) and the GTK toolkit (as seen in GNOME desktop). When using a GTK-based desktop, QT apps may appear out of place by not following the GTK theme settings, this can be fixed using ‘qtconfig’ as follows:

From a console run:

qtconfig qt4

From the graphical menu pull down the “Select GUI style” option and select “GTK+”. Click ‘file’ then ‘save’ and any running QT apps should instantly re-theme and look a lot better!

If ‘qtconfig’ is not installed, it can be installed on apt-based systems by entering:

sudo apt-get install qt4-qtconfig

Owncloud: csync failed to create a lock file

I use the Owncloud client to synchronise important files between my laptop and desktop computers. Recently the client failed immediately on start-up with the error “csync failed to create a lock file”. To resolve this issue, locate and remove the lock file.

On version 1.2.x the lock file can be found in the following locations, depending on which OS you are using.

Linux:

~/.local/share/data/ownCloud/lock

Mac OSX

~/Library/Application Support/ownCloud/lock

Windows:

TBC

Take heed: Left-over “stale” lock files are usually safe to remove, however if multiple instances of the same program are running, such as in a separate user session, removing the lock file can cause write-conflicts and corrupt your data, so be warned! Only remove the file if you’re sure it’s not being used by another running instance of the Owncloud app.

Update

Thanks to Markus for providing the Mac OSX location