Monday, 10 March 2014

Enable Retina support in Eclipse

To enable retina support locate the Then right click and select "Show package contents". Open Contents/Info.plist in a text editor. In the bottom just above


add the following


Then make a copy of the Delete the original and rename the copy to This will force the Info.plist to be recreated in case OS X has cached it.

Tuesday, 15 October 2013

Music Player Remote finally on Google Play

For about half a year I have been working on and Android app called Music Player Remote. Music Player Remote is a remote control for Music Player Daemon (MPD). Music Player Remote can be found on Google Play as a free version and as a paid version.

Music Player Remote still has a long way to go before it reaches a level where I consider it good enough. But at some point you just have to get it out there, even though there still is a lot of features waiting to be implemented. So if you are up for trying a new remote control for your Music Player Daemon setup, try out the free version. If you still think it has some feature misses, please be patient. More features will be added over the next period of time.

Thursday, 5 September 2013

Setup Git server on Raspberry Pi

Install required packages by typing:
sudo apt-get install git git-core

add a user git:
sudo adduser --system --shell /bin/bash --gecos 'git version control user' --group --home /home/git git

set the password for the new user
sudo passwd git

in git home folder create the git directory
mkdir myrepo.git

alternatively place the git repository somewhere else and make a symlink to it. Just ensure that the git user is the owner of the directory.
chown -R git:git myrepo.git

cd into the myrepo.git folder and initialize it by typing:
git --bare init

On the client, use the following URL to access the git repository:

Setup USB sound card on Raspberry Pi

sudo nano /etc/modprobe.d/alsa-base.conf

at the end, add the following line to prevent a lot of debugging information to be written to the syslog file.

options snd-usb-audio nrpacks=1

Volume can be changed by typing: alsamixer

Sometimes it seems people is having problems getting the volume and other settings saved. If having troubles try running alsamixer as root and after exit type:
sudo alsactl store

Then reboot.

Sunday, 1 September 2013

Installing Minidlna on Raspberry Pi

sudo apt-get install minidlna

sudo nano /etc/minidlna.conf

Find the following line:

Comment this line out and replace/add the following lines instead:

To start Minidlna at boot type:
sudo update-rc.d minidlna defaults

To disable start at boot type:
sudo update-rc.d -f minidlna remove

Then start the Minidlna server without rebooting by typing:
sudo service minidlna start

If it becomes necessary to do a full database rebuild type:
sudo service minidlna force-reload

Thursday, 15 August 2013

Install a SMB server on Raspberry Pi

First Samba needs to be installed, to do this type:

sudo apt-get install samba

Then we want to install various helper tools. Do this by typing:

sudo apt-get install samba-common-bin

Before we can run the SMB server we need to make some configurations to it. First we need to configure access for some user(s). I personally like to have two users that is only used to access the SMB server. One with read/write access, and one with read access only. Do this by running the following commands:

sudo useradd -M usbowner
sudo passwd usbowner
sudo useradd -M usbguest
sudo passwd usbguest

This will create a two users. One named usbowner and one named usbguest. The -M switch is to prevent a home directory from being created.

My SMB path is a USB drive mounted at /media/USB. Now we need to make usbowner the owner of /media/USB. To do this type:

sudo chown -R usbowner:usbowner /media/USB/

Also ensure that usbguest has read but not write access rights.

Now that we have our users configured, we can start to change the smb.conf file.

sudo nano /etc/samba/smb.conf

Then i would comment out the following lines by adding a ; to the front of the item as this makes initial setup and testing easier.
; comment = Home Directories
; browseable = no
; create mask = 0700
; directory mask = 0700
; valid users = %S
; comment = All Printers
; browseable = no
; path = /var/spool/samba
; printable = yes
; guest ok = no
; read only = yes
; create mask = 0700
; comment = Printer Drivers
; path = /var/lib/samba/printers
; browseable = yes
; read only = yes
; guest ok = no
; comment = Samba server's CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

Then at the end of the file add
comment = raspi
path = /media/USB
valid users = usbowner usbguest
browseable = yes
public = no
writable = yes

Then run:

sudo smbpasswd -a usbowner
sudo smbpasswd -a usbguest

to add those two users to smbpasswd file

Then finally restart the samba service by typing:

sudo service samba restart

Wednesday, 3 July 2013

Disable OS X file read access time

When OS X reads a file, a timestamp is written to the drive. Disabling the read access time will reduce the number writes to you hard drive. Personally I really don't care about read access time, so I prefer to disable it. To do this create the file /Library/LaunchDaemons/noatime.system.plist with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

(the first v in the -vuwo argument is for verbose and is optional)

After the file has been created, run the following three commands in the terminal.
sudo chown root:wheel /Library/LaunchDaemons/noatime.system.plist
sudo chmod 644 /Library/LaunchDaemons/noatime.system.plist
sudo launchctl load -w /Library/LaunchDaemons/noatime.system.plist

To verify the modification, run the command mount in the terminal and look for the line /dev/disk0s2 on / (hfs, local, journaled, noatime). If the last entry in the parentheses are noatime, the changes has been applied successfully.

If you have more then one partition on your disk, create a plist file for each drive and change the <string>/</string> argument to match the mount point for that partition.