Category: The Linux Archives

Pi and I
Pi and I
19 October 2019

Setting up my Raspberry Pi. Experiences with crunchbang, ubunutu, bunsenlabs help, but in Raspbian some things still are slightly different, namely:

[ecae_button]

(1) Autostart

Autostart file is at /etc/xdg/lxsession/LXDE-pi/auto. Add programmes preceded by “@”

(2) dmenu

To use Alt+F3 for demnu install xbindkeys, then see Xah Lees tutorial

(3) Firefox

sudo apt-get install firefox-esr

(4) VeraCrypt

Diy… Sigh. https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=90895#p1426321https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=90895#p1426321

(a) take care you do download the tar-file, not the signature.

(b) to this day, not a single make install worked for me. Ever. But today, on the second attempt, I got where I wanted.

(5) Kodi

Composer in Kodi: [1] and [2] and [3]

(6) Remote

Yet to try: http://raspi.tv/2012/install-and-use-tightvnc-remote-desktop-on-raspberry-pi-through-windows-android-or-ios

[Client 1] and [Client 2]

(7) Spotify

https://github.com/dtcooper/raspotify

Premium only according to https://discourse.osmc.tv/t/howto-spotify-connect-support-via-raspotify-librespot/38348

(8) Netflix and the likes

Want DRM? Easy (if you’re comfortable with running some script an open source script you might or might not understand from some website in mother Russia the US of A. Worked for me. Head over to https://blog.vpetkov.net/2020/03/30/raspberry-pi-netflix-one-line-easy-install-along-with-hulu-amazon-prime-disney-plus-hbo-spotify-pandora-and-many-others/ and off you go.

Weiterlesen
How to Stream Music from Linux PC to iPhone over Wifi
1 July 2017

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.

Option 2: DAAP

Easy, cheap, but flawed.

  • Server: Install Rhythmbox → open plugins → enable “DAAP Music Sharing” (obviously install if it is not there) → right click → properties → enter name and tick “Share my music”. Done.
  • Client: Install “Simple DAAP” from app store. Open, find your server, done. I keep getting error -1004 and even though the phone can see the server it does not connect. Since DAAP is a proprietary protocol invented by…Apple, you would expect that there are options. But as there’s no native app that can do it and Simple DAAP is the only lonely player in the field, there aren’t. Except of course you find a broken android phone, install Music Pump (costs) or DAAP media player (free) and in under the minute you’re dancing around the house streaming.

Hat tip: Lifewire

Video

Interestingly it was easier to setup video streaming than audio (use vlcstreamer, see upubuntu).

Weiterlesen
Mendeley Migration
23 February 2017

Alreet.Sometimes Mendeley content has to move. There’s no easy way to tell Mendeley that. So.

  1. sudo apt-get install sqlitebrowser
  2. cd ~/.local/share/data/Mendeley\ Ltd./Mendeley\ Desktop/
  3. sqlitebrowser <you@whatever>@www.mendeley.com.sqlite
  4. Go to »Execute sql«-tab
  5. update Files set
    localUrl = replace(localUrl, 'file:///old/path/‘, 'file:///media/new/path/‘);
  6. click »Execute« (or F5 or ctrl+return)
  7. click »Write changes«
  8. Done. Easy, right?

Thanks to 3.14a and jordi’s comment there. For related Mendeley grievances see khufkens, who can tell you how to sync Mendeley to your own server (instead of feeding Elsevier’s questionable pricing model).

Weiterlesen
Connect Crunchbang Linux to Bluetooth Speaker
8 July 2016

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
  2. How to switch the sink in pulse audio: http://askubuntu.com/a/108882/80611
  3. How to clean up after you screw up (which I did), i.e. reinstall pulseaudio: http://askubuntu.com/a/435221/80611
  4. How to improve the sound once it works but reminds you of a telephone: http://askubuntu.com/a/520384/80611 and https://wiki.ubuntu.com/UbuntuStudio/rtirq

 

Weiterlesen
Automatically batch rename photo files
11 July 2014

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 &quot;basepath + parameter 1&quot;
BASEPATH='/media/data/photo/';
cd $BASEPATH$1

# add &quot;EXIF creation time&quot; as prefix to original file names
exiv2 mv -r %Y%m%d-%H%M%S:basename: *.NEF
# Now we have files with names like 20140630-235958_DSC1234.NEF.

# final rename
i=10000
for x in *.NEF; do
   i=$((i+1))
   mv &quot;$x&quot; &quot;${x%-*}_$2-${i#1}_Copyright-Jan-Soehlke.NEF&quot;
done

 

Walkthrough

Line 4: Here we set our base path. We choose the highest directory ever useed to store pictures.

Line 5: Navigate to base path + parameter 1. If our script is called rename and the pictures are in /media/data/photo/weddings/adam+eve, then we call the script through

./rename weddings/adam+eve

Line 8: In a first iteration we add EXIF-creation time as a prefix to the original file names. We use exiv2 for this operation. -r is for rename and we use YYYYMMDD-hhmmss, which is %Y%m%d-%H%M%S in strftime(3), plus :basename: to keep the original filename after the time stamp.

Through creation time as a prefix we now sort files by age, even if the files would sort differently by name. This could happen if during a shoot we reach 9999 and the camera’s counter continues at 0000 or if we shot with two different cameras.

By also retaining the original file name for now, we make sure that in case there are multiple files with the same time stamp, they still have individual names. EXIF time’s finest unit is a second, so if we fire bursts of images (Nikon’s D4s for example shoots at 11 frames/second), we have multiple files with the same creation date and thus potentially 11 files with the same name.

Line 12: The counter variable i counts from 10000 and is used with the leading 1 digit stripped; this is a trick to get the leading zeros so that all counter values have the same number. If you want more (or less) than four digits, set i accordingly.

Line 15: ${x%-*} removes everything that follows the - character, in our case it is hours, minutes and seconds as well as the original filename. ${i#1} writes the new four digit file number.

$2 provides a second variable, which we use for the shoot name. In this case we want it to be WeddingAdamAndEve, so we call the script through

./rename weddings/adam+eve WeddingAdamAndEve

Finally, I added _Copyright-Jan-Soehlke. It not only reminds someone who downloads the file that it is indeed copyrighted, it also helps with SEO as my name is automatically associated with each image I upload.

 

Possible Problems

a) The original file names already have a - in place. In this case change the  - in line 8 to something different (like _) and use the same character in the ${x%-*}-part in line 15 (in this case ${x%_*}, otherwise the script will not work as intended.

b) A burst of images reaches across the 9999/0000-mark. These specific files will not be in order after renaming – but they weren’t in order in the first place, so I have no idea how to tackle this rare scenario other than by setting your camera’s counter to reset to 0000 after each formatting.

c) Your files do not contain EXIF data. In this case see mikeserv’s solution which uses a different angle of attack and is thoroughly and well explained.

 

___________________________

* Stackexchange uses the CC-BY-SA license, so all the code in this example is naturally also CC-BY-SA.

Weiterlesen
Crunchbang on x200s
26 April 2014

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;amp;&amp;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)

Weiterlesen
MTPFS FAIL
26 October 2013

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 programme to mount my one Linux device on my other Linux device while windows works out of the box…

Weiterlesen
Network Sync
2 June 2013

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

Unison

Alternatives

 

[article started in January 2013; final, rewritten version from January 2014]

Weiterlesen
Overheating Thinkpad T60
27 September 2012

Since 12.04 my thinkpad (T60) regularly shuts down due to heat. I don’t like it and I am afraid of damage – to hard drives or to the system.

The problem is described in many places and many different fixes, remedies and work arounds exist. Most of them lack proper documentation, so I am reluctant to try them. Even thinkfan, which is quite popular, scares me more than it helps.

Here is a collection of relevant information I found:

  1. Bug report at launchpad
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/751689
  2. Show temperatures of all sensors
    cat /proc/acpi/ibm/thermal
  3. Show Speed of fan
    cat /proc/acpi/ibm/fan
  4. Thermal Sensors
    http://www.thinkwiki.org/wiki/Thermal_sensors
  5. List of ways to control fan speeds at Thinkwiki.org
    http://www.thinkwiki.org/wiki/How_to_control_fan_speed
  6. Thread at askubuntu
    http://askubuntu.com/questions/178467/thinkpad-fan-control-error
  7. Howto at NeoLocus
    http://blog.neolocus.com/2012/07/lenovo-thinkpad-x61-temperature-and-fan.html
  8. Howto at thinkwiki.de [in German]:
    http://thinkwiki.de/Thinkfan

For now I went with #7 (thinkfan howto by Neolocus), and I do hear a substantial difference in fan activity – but I am still scared.

Weiterlesen
xubuntu 12.04
9 August 2012

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   4000MB
3. logical   ext4   <rest>   /

2. Dual Screen under xubuntu

sudo apt-get install arandr

It does the trick.

3. Picasa

Followed webupd8 again. Again no IE6 for me.

4. Configuring Menu

»Add Seperator« in Alacarte still crashes Alacarte. Alacarte is a piece of junk.

Wine still sits at the very top of the main menu and still does not show under alacarte. I do not like alacarte.

5. LaTeX

This time I went straight for texlive 2012 and texlive-full and had no problems. The only warning I get is

LaTeX Warning: You have requested, on input line 149, version `2007/10/02′ of package kvoptions, but only version `2006/08/22 v2.4 Connects package keyval with LaTeX options (HO) ‘ is available.

I’ll deal with that later. Maybe.

Also, locations changed slightly it seems. If I am not mistaken, stuff now sits in

/usr/share/texlive/texmf-dist/

6. Getting rid of the lake

Xubuntu’s standard theme wallpaper is, humahem, not my cup of tea. So I try to replace it wherever it shows:

1. Boot-splash
Apparently it is possible to change the boot splash by picking another plymouth-theme. There are several in the reositories. After downloading you have to

sudo update-alternatives –config default.plymouth

follow the instructions and when done

sudo update-initramfs -u

Pretty straightforward, I picked kubuntu-logo.plymouth.

In case you only want to change the image, Joes3029 knows the location

2. login background
It is set in

/etc/lightdm/lightdm-gtk-greeter.conf

so change it there.

3. post login

Ever so briefly the lake flashes over the screen after login. No idea where to change it yet – yet after fixing the boot splash it seems gone, too.

4. Desktop Background

The easiest: right-click on desktop –> desktop settings –> pick your desired one, done.

 

That’s it. All in all it took me a long afternoon to install and customise – and that’s how I expect a Linux installation to go down in 2012!

 

A little postscript:

7. Shut up KDE-Apps

sudo apt-get install systemsettings

Open it up (type »systemsettings« in a terminal) and go to Application and System Notifications -> Player Settings -> No audio output. Thanks skfd.

8. Hibernate Fail

After years of pretty good hibernation and ok suspend functionality on my T60, hibernation finally does not work anymore. I see

»Shutdown failed. Failed to hibernate session. Not authorized.« when I try.

Turns out it is now turned off by default and one must follow the official »How do I hibernate my computer«-guide to turn it on. Pity.

Weiterlesen
Cross-Distro Live-USB
28 May 2011

Want to create a Fedora live USB from ubuntu or make a pen drive with ubuntu in Fedora? Sick of instaling liveusb-creator under ubuntu or usb-creator in Fedora?

Here is your way out: UNetbootin

  1. Download
  2. sudo chmod +x <downloaded file>
  3. Optional: install p7zip and p7zip-plugins
  4. ./<downloaded file>
  5. Happy
Weiterlesen
Deny Internet in Ubuntu
7 February 2010

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 access to this user. I tried various other things to deny access to network and web and finally found something useful at ubuntuusers.org (German):

create a file in /etc/init.d (filename doesn’t matter)

sudo touch /etc/init.d/iptab-filter.sh

Open the file you created:

sudo gedit /etc/init.d/iptab-filter.sh

and paste the following code:

#!/bin/bash iptables -A OUTPUT -m owner –uid-owner USERNAME -j DROP

Replace USERNAME with the desired user’s user name, save, close and run

ln -s /etc/init.d/iptab-filter.sh /etc/rc2.d/S99iptab-filter

Done.

Result:

The script that prevents user USERNAME to access the internet runs at start up, so user USERNAME is denied access to the tubez for good. 

 

Weiterlesen
ffmpeg-GUI
11 November 2009

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 quickly told me that ffmpeg could do the trick. But being unfamiliar with bitrates and stuff I was happy indeed when I found Mobile Media Converter, which is a neat and lean GUI for ffmpeg (Mac, Linux and Win). It even sports convenient batch process via drag & drop. Have fun.

Weiterlesen
Wir verwenden Cookies: Datenschutzerklärung. This website uses cookies. Privacy Policy.

My Portfolios

Industrial & Academic Portfolio

With more than a decade of experience, I  strengthen the visual identity of my clients through industrial, academic, and corporate photography. 

I also headed communications departments in both the corporate and the academic world and this background enables me to get you the visuals you need – every time!

Product Portfolio

What I enjoy about product photography is that through spending time with an object that otherwise gets overlooked as a mere utility, beauty can be found in unexpected places.

Making the extraordinary within the ordinary visible for others always is a very exciting process.

Portrait Portfolio

In the words of Arnold Newman, Portrait photography is 10% inspiration and 90% moving furniture.

It never seizes to amaze me how, by moving some furniture around and thus creating a carefully designed context for the subject, photography can condense the many facets of a personality into a still image.