Category Archives: Desktop Usage

MiniDLNA configuration

MiniDLNA is a uPnP server that allow you to play Video, Picture and Music over LAN via IP broadcasting protocol.

I have installed it in my Raspberry Pi as a mini-server at home, to stream video to my TV and my XiaoMi TVBox.

By default, it runs with “minidlna” user, it may not be so convenient for use because it is not a usual user, I need to manually copy files to the Pi and subsequently to the folder accessible by minidlna. It is related to the user privilege issue. Funny enough, simply change on folder to 666 doesn’t solve the problem because minidlna requires to access the folder along the path from “/”

Therefore, the only solution is to configure MiniDLNA to run on another user account rather than the default minidlna user.

The minidlna.conf is as followed


# Specify the user name or uid to run as.
user=pi
....
#media_dir=/var/lib/minidlna
media_dir=/home/pi/DLNA
....
#db_dir=/var/cache/minidlna
db_dir=/home/pi/.dlnacache
....
#log_dir=/var/log
log_dir=/home/pi/.dlnalog

PGP with Thunderbird and Enigmail

PGP is a technique that you put encrypted mail content in a standard mail body, like Gmail and Hotmail, by using that technique, you can assure that only the intended recipient can receive and decrypt the mail.

The software we will use is Enigmail and Thunderbird. These two software is available for Mac, Linux and Windows.

PS. For Windows, there are some humor that NSA can decrypt the cipher in Windows, so it MAY not be safe to use PGP in Windows. As I am just a normal user, so no big deal at all.

1. Install Enigmail and Thunderbird (I use Ubuntu, not a big deal for the installation method)

sudo apt-get install enigmail thunderbird

2. Open Thunderbird, add your standard gmail account

If you are using Gmail, you may need to enable the “Less secured logon”, because Gmail has block you from using the classic mail client like Outlook and Thunderbird.

pgp1

3. Configure Enigmail and Generate the key

You may use Thunderbird, there is a Enigmail menu, Setup Wizard

pgp2

pgp3

pgp4

4. After you generate the key, we can send a PGP encrypted email. I have configured two email with PGP and play around with it.

pgp5

5. After I send out the mail, the mail body is encrypted, but not the Mail Subject (**** IMPORTANT ****). When I click on the sent mail, I don’t even able to retrieve the mail content as it is already encrypted with the recipient public key

pgp6

6. On the recipient side, we need to provide password to decrypt the mail body.

pgp8

7. If we look at the Web, The content is being encrypted.

pgp7

8. Finally, you should submit your public key to some public repository, so that other can send u encrypted email.

You may use the export function of Enigmail, publish your public key to key server and every one in the world can send you secured mail.

Install Shrew VPN on Linux or *nix

I need to connect to the SSG Router through VPN, however, the VPN functionality provided by the SSG Firewall is only available for Shrew VPN, so I have to install that in my Ubuntu 14.04. So, simply put, it includes two parts, 1. installing the dependencies through apt-get. 2. Compile and install the Shrew VPN.

1. Install the Dependencies In Ubuntu 14.04, we have to install the following dependencies, we can use the following command.


apt-get install cmake libqt4-core libqt4-dev libqt4-gui libedit-dev libssl-dev checkinstall bison flex

CMake: Cross Platform make tools
checkinstall: make file generator
Bison: Some parser?
Flex: another parser?
QT: the GUI Library

Next, we have to build it through the standard make process


sudo tar xvf ike-.tbz2
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES
sudo checkinstall -y
sudo cp /usr/local/src/ike/ike/source/iked/iked.conf.sample /etc/iked.conf
sudo iked
sudo qikea

ShrewVPN