How to Stream Music from Linux PC to iPhone over Wifi

posted in: Linux | 1

There are endless possiblities to stream music from your computer to your phone over wifi, but few dedicated howtos that walk you through the process step by step.

Option 1: UPnP

Universal Plug and Play (UpnP) is developed by the Digital Living Network Alliance (DLNA) and has interoperateability in mind. See Make Use Of for a list of possibilities.

Connect Crunchbang Linux to Bluetooth Speaker

posted in: Linux, Technicalities | 0

I got myself one of these and after setting it up properly I must say that while I am a bit disappointed by the reach, I am very impressed with the sound quality for this kind of money (a white label apparently as »C26« sells under various brands and for different prices).

Anyway, the whole setup was a true Linux afternoon, reminding me of my NDISwrapper-days, just like it was 2006 again.

First, It took me a while to get crunchbang to discover the device and connect [1] (Blueman works much better as a bluetooth manager). Then apparently I manually needed to let pulseaudio know where to send the audio [2]. Atfer fiddling with some files, pulseaudio was broken, so I needed to reinstall [3]. Finally, the sound was much poorer than via my phone. I don’t know if I overlooked it or if loading rtirq changed something [4], but in the volume control center of pulseaudio there is a tab called »configuration« where I had to choose »High Fidelity Playback (A2DP)« to get decent sound (instead of »Telephony Duplex (HSP/HFP)« or »off«). Now most of the times it changes to the Bluetooth-device automatically once I switch it on and back when I switch it off. Sometimes not. But hey.

The sources I used were these:

  1. How to make pulseaudio bluetooth-ready: http://askubuntu.com/a/223203/80611

...   READ MORE

Automatically batch rename photo files

Following Robert Seale’s advice, I was looking for a solution to batch rename photo files. After my last shoot I used digikam and while the results were as desired, it took a second or more per image, which I thought a bit long. After not finding a different suitable solution I asked the question on unix.stackexchange and was overwhelmed by two people’s in-depth answers. I learned a lot from both mikserv and Gilles and in the end settled with Gilles’ suggestion. I take zero credit for the solution, I don’t even understand parts of what is going on, but I amended it a little bit nonetheless and thought the extended version might help someone.*

Preliminaries

What I get when I come home is file names looking like this: _DSC1234.NEF. What I wanted instead was

  1. date-shot in YYYYMMDD-format plus
  2. a descriptive shoot-name plus
  3. image-number

looking like this: 20140708_WeddingAdamAndEve_0001.NEF

There are a few issues with this:

ad 1. Date Shot: sometimes I can only copy and rename the files a few days after shooting, so the date should reflect the date the picture was taken, not the date it was copied. Getting date-shot from the file itself is difficult as there is no birth time recorded. The closest is mtime which is the time the file’s content has last been modified. However, creation date is stored in image file’s EXIF data.

ad 2: Name of Shoot: Ideally I wanted this to be a variable I could set as a parameter when calling the script.

ad 3. Number of Image: This should reflect the age of the image with the oldest one having the lowest number. The problem is that cameras usually restart numbering at  0000 once they hit  9999. So images n-9999 can potentially be older than 0000-n. I needed a solution that would cater for this special case.

 

The code

# original solution by @Gilles (http://unix.stackexchange.com/questions/141138/)

# set base path and navigate to "basepath + parameter 1"
BASEPATH='/media/data/photo/';
cd $BASEPATH$1

#

...   READ MORE

Crunchbang on x200s

posted in: Linux, Technicalities | 0

Through a few very lucky coincidences I received a Thinkpad x200s a few days ago and set it up with Crunchbang which must have been the most straightforward os-installation ever. Two Three Four things though:

Rawtherapee

A slightly outdated version is in debian’s repositories, but if you want a newer one, go to »Kbyte’s Hideout«. Download .deb package and dpkg -i rawtherapee_<xxx>.deb

If there are unsolved dependencies: apt-get install -f and then  dpkg -i rawtherapee_<xxx>.deb

Picasa

Well.

It still is the most straightforward programme I know for editing, simple retouches and exporting smaller sizes. I’m not happy with wine, I’m not happy with a google tool, but I cannot and cannot find an alternative (see here). Hence:

before following the webupd8 tutorial I needed
apt-get install libwine-cms:i386
After installation, use
cd ~/.wine/drive_c/Program\ Files/Google/Picasa3 && wine Picasa3.exe
to launch it.

If you would then create a script called »picasa« somewhere, say in ~/scripts containing the following:

#!/bin/bash

cd ~/.wine/drive_c/Program\ Files/Google/Picasa3 &amp;&amp; wine Picasa3.exe

exit 0

Picasa can then be launched from command-line with a simple »picasa« after a final
sudo ln -s ~/scripts/picasa /usr/bin/picasa

Clock

To change the format from Hour:Minute open ~/.config/tint2/tint2rc and consult strftime-man to change to your liking.

Change Key Bindings

Keyboard shortcuts can be changed in ~/.config/openbox/rc.xml

After saving, go to Openbox menu > Preferences > Openbox Config > Reconfigure. (Thanks, MysteryMember)

MTPFS FAIL

posted in: Linux, Technicalities | 2

My ubuntu 12.04 computer cannot see my Android 4.1.2 phone, instead I must install go-mtpfs and control it via command line. Thankfully, Andrew over at webupd8 provides all the necessary tools (all credit goes to him, for long version see there):

sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs

Optional:

sudo apt-get install go-mtpfs-unity

Mount:

go-mtpfs /media/MyAndroid

Unmount:

fusermount -u /media/MyAndroid

Ironic that I should now need a special...   READ MORE

Network Sync

posted in: Linux, Technicalities | 0

I recently got my hands on a shiny eee-PC for surprisingly little money. As I am travelling a fair bit at the moment, the opportunity was more than welcome. Now, mobility comes at a price and the price is called »multiple instances of files«. When the files in question are your PhD, it has the potential for a fantastic nightmare. Most people use dropbox to tackle this, but for one reason and another, I neither want to use that, nor ubuntu one. I have owncloud [see here], and after resolving some issues, the sync client works, but I still would like to keep more data in tune then I could possibly channel through my shared hosting plan. Unison (via ssh) seems the way to go.

Setting it up was a lot easier then I though. All it took was rbgeek’s exccellent article »File Synchronization Between Two Ubuntu Servers using Unison«.

Falko Timme’s article »Setting Up Unison File Synchronization Between Two Servers On Debian Squeeze« at howtoforge was also helpful. Another insightful article is Chris Lale’s »Synchronising laptop and desktop files using Unison« at Sourceforge.

One issue: normally your device gets an IP address automatically from your router. Unison settings depend on the IP address (for ssh connection), so if the IP address changes, Unison gets confused. Thus, we want a static IP address on the remote machine. Johnathan Hobson’s »Networking Tips and Tricks« are a good start. The settings that finally worked for me I got via chili555’s post on ubuntuforums. Using Netman’s GUI, I set:

Method: Manual

Address: 192.168.0.9

Netmask: 255.255.255.0

Gateway: 192.168.0.1

DNS Servers: 8.8.8.8, 192.168.0.1

Search domains:

I understand little, but what I do understand is this:

  • »address« needs to be outside the router’s scope. Mine is configured to start at 10, so I picked 9.
  • »gateway« simply seems to be the router’s ip-address
  • »DNS-Servers«: no clue why 8.8.8.8, the other again seems to be router’s ip address

You can easily determine the router’s ip-address and the scope for auto DHCP from the router’s admin interface.

Other useful information and resources

SSH

...   READ MORE

xubuntu 12.04

posted in: Linux, Technicalities | 0

Way too many issues with a first attempt drove me to the decission to reinstall. I had a look around and made eye contact with fedora, arch and debian but in the end thought I’d give a clean xubuntu installation a second chance – and I did not regret it. Here goes:

1. Installation from LiveUSB

First surprise:No issues. Only: apparently all of a sudden my computer needs a /boot partition, so my partition map looks like this:

1. primary   ext2    254MB   /boot
2. logical   swap  ...   READ MORE

Deny Internet in Ubuntu

posted in: Linux, Technicalities | 0

I have phases in my work cycle, where I want to limit internet access to myself. Thus, I created a »work-user« and in the user’s properties I unticked the boxes 

  • Connect to internet using a modem
  • Connect to wireless and ethernet networks
  • Use modems

I thought that should do the trick, yet it didn’t restrict internet...   READ MORE

ffmpeg-GUI

posted in: Linux, Technicalities | 0

I was somewhat flabberghasted when I found out my mobile phone (Sony Ericsson Cyber-shot) was unable to play .mp4, .flv, .avi and what else I tried. It refuses to play all video formats save .3gp.

I was unable to convert to this with avidemux. Google...   READ MORE