subota, 11. siječnja 2014.

Install MPD server on Raspberry Pi - Music Player Daemon


Install MPD server on Raspberry Pi
Music Player Daemon
http://www.musicpd.org/

$ sudo apt-get update
$ sudo apt-get upgrade
$ mkdir ~/Music
$ sudo apt-get install mpd nano
$ sudo apt-get install alsa-utils
$ sudo modprobe snd_bcm2835
$ sudo nano /etc/rc.local
$ sudo amixer cset numid=3 1
Set Audio output from Raspberry Pi: 0=auto, 1=analog, 2=hdmi
I put analog output from Raspberry Pi > Hi-Fi.

$ sudo alsamixer



$ sudo nano /etc/mpd.conf

Change the following lines:

 music_directory         "/home/pi/music"
 playlist_directory      "/home/pi/Music/mpd/playlists"
 bind_to_address         "your static IP, example 192.168.1.16"
or
 bind_to_address       "127.0.0.1"
 mixer_type               "software"

$ sudo chmod g+w /var/lib/mpd/music/ /var/lib/mpd/playlists/
$ sudo chgrp audio /var/lib/mpd/music/ /var/lib/mpd/playlists/
$ sudo service mpd restart

--------------------

MPD Client install on Mint, Xubuntu, Ubuntu

$ sudo apt-get install ufw ario gmpc

$ sudo ufw disable

You must allow port 6600 in firewall.

$ sudo ufw proto tcp from 192.168.1.16 to any port 6600

192.168.1.16 is only my example, you must put your Raspberry Pi IP address !!!

$ sudo ufw enable


Ario
$ ario
Configure Ario, Edit > Preferences > Host "Raspberry Pi IP exp. 192.168.1.16"



















Gnome Music Player Client
$ gmpc
Configure gmpc, Music > Preferences > Host "Raspberry Pi IP exp. 192.168.1.16" > Music directory > /home/pi/Music






MPDroid client for Android:
https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid

--------------------


petak, 10. siječnja 2014.

Raspberry Pi - Raspbian ,LANGUAGE = (unset), LC_ALL = (unset)

$ sudo apt-get update

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "en_IE.UTF-8",
    LC_MONETARY = "en_IE.UTF-8",
    LC_ADDRESS = "en_IE.UTF-8",
    LC_TELEPHONE = "en_IE.UTF-8",
    LC_NAME = "en_IE.UTF-8",
    LC_MEASUREMENT = "en_IE.UTF-8",
    LC_IDENTIFICATION = "en_IE.UTF-8",
    LC_NUMERIC = "en_IE.UTF-8",
    LC_PAPER = "en_IE.UTF-8",
    LANG = "hr_HR.UTF-8"

$ sudo apt-get install locales-all

$ sudo raspi-config
















$ sudo apt-get update

srijeda, 17. travnja 2013.

New improvements in terms of laptop power management for Xubuntu, Ubuntu, Mint.


New improvements in terms of laptop power management for Xubuntu, Ubuntu, Mint.

http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html#installation

TLP is a pure command line tool with automated background tasks. It does not contain a GUI.

First open CLI, Terminal, Terminator or any command line.
And add the lines:

$ sudo apt-get remove laptop-mode-tools
$ sudo add-apt-repository ppa:linrunner/tlp
$ sudo apt-get update
$ sudo apt-get install tlp tlp-rdw smartmontools ethtool
$ sudo tlp start


četvrtak, 14. veljače 2013.

No result when attempting to repaire battery in freezer


I read on a forum, it is possible to repaire a battery when you freeze it in the freezer.
I packed the battery in a plastic bag (zip-lock) and I put the battery in the freezer for 24 hours.
The temperature in the freezer is -18ºC.
After 24 hours I took out the battery from the freezer, I unpacked it from the plastic bag, and cleaned it.

I inserted the battery into my computer and charged it for 8 hours.
After 8 hours of charging, my battery still worked for 20 minutes as before.

The myth to repaire a battery in a freezer is not possible.
It does not work for me.

nedjelja, 10. veljače 2013.

Restart ssh-agent



Restart ssh-agent

$ ssh-add
Could not open a connection to your authentication agent.

$ killall ssh-agent; eval `ssh-agent`
Agent pid

$ env | grep ^SSH
SSH_AGENT_PID=
SSH_CLIENT=192.168.1.1
SSH_TTY=/dev/
SSH_AUTH_SOCK=/tmp/
SSH_CONNECTION=192.168.1.1

$ ssh-add
Enter passphrase for /home/user/.ssh/id_rsa:
Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa)


subota, 9. veljače 2013.

Transparent desktop text icons xubuntu 12.04

Create a file named .gtkrc-2.0 in your home directory.
Open this file in a text editor and fill it with the text:


style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0

fg[NORMAL] = "#ffffff"
fg[SELECTED] = "#ffffff"
fg[ACTIVE] = "#ffffff"
}


widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"



If you want to change the text colour as well, just edit the file replacing ffffff with the desired colour's code (tip: you can use Gcolor2 to help you determine the colour code).
For the changes to take effect either log out and log in or run the command:

$ killall xfdesktop

And wait for xfdesktop to restart.