27 May, 2017

Shotwell - well?

I just can't figure out how to import pictures ... so I googled. Just to find out: I'm not alone.

27 April, 2017

Mobile and Web - use the USB!

It's faster, and possibly more secure to use the USB rather than the WiFi-option. You'll need a cord. So what. The upside is the speed.

29 March, 2017

mplayer and .pls

A SomaFM stream in the shell.


Here's a how to play SomaFM's playlist "Groove Salad":

# mplayer -cache 1000 -cache-min 80 \
# -playlist http://somafm.com/groovesalad256.pls

NB: In the terminal it's just one line of code. The "\" marks the linebreak.

25 March, 2017

OGP test

My link on Blogger:

http://multimusen.dk/

Compared to pasting my link on Twitter:



For some reason the image isn't visible on Facebook.

Unfortunately Blogger doesn't use the OGP. Or at least so it seems.

01 March, 2017

Strange Pandoc Error Message

Got the error message: "Reference book not found" from citeproc. However the problem was not the reference. The problem was a code section. By mistake I had only three tildes. So I looked for the error, where the error was not.

26 February, 2017

g180 Orion Spectrum

Got this Logitech keyboard. Looking for Linux drivers for the keys. A workaround used by many: configure the keys via Windows. Perhaps wine? So far I'm looking for a better solution than Redmond's.

Installation on Ubuntu

Install this library: https://github.com/MatMoul/g810-led

Make sure, that dependencies are met. I had to:

# sudo apt install libhidapi-dev
# make
# sudo make install

Then g810-led ran by:

# g810-led

Load a profile

#g810-led -pp < /etc/g810-led/profile

This will load a profile. You can write your own. Here's a bash file:

# Profil: 20170227
# Tastatur G810 Orion Spectrum
#
g810-led -g logo 330033
g810-led -g indicators 4c9900
g810-led -g fkeys 990000
g810-led -g modifiers 990000
g810-led -g multimedia 4c9900
g810-led -g arrows 003300
g810-led -g functions ffffff
g810-led -g keys 4c0099
g810-led -g numeric ffffff
#
# save settings
g810-led -c

But it's more elegant to load a profile, the format is:

# Vars
var brun 993300
var groen 009933
var blaa 330099

# All green
a 006600

# Groups
# Set key groups
g logo $brun
g indicators $groen
g mute $brun
g multimedia $brun
g fkeys $blaa
g arrows $brun

# Keys
k space $brun
k win_left $brun
k alt_right $brun
k num5 $brun

# commit
c

The last c is important. It will execute the orders. Note the usage of variables. It's quite handy.


Load the g810-led keyboard on boot

This can be done in sevearal ways. It may be deprecated, but creating:

/etc/rc.local

With this content does the trick:

g810-led -pp < /etc/g810-led/profile

You can even restart the file as a service:

sudo service g810-led restart

So basicly this is all you need in order to have a cool layout at the boot time.


Issues

The library works .. that is sort of. Sometimes a key or two will miss. Restarting the service helps. So the library is still in a process of development.

Solution

I started the programs by rc.local. But that's a bad idea. Using the same code in the Ubuntu menu for upstart programs work like a charm!

g810-led -pp < /etc/g810-led/profile

Ubuntu's Startup Application.


Using the keyboard

It's high quality. You'll get addicted pretty fast. I really like this keyboard.

14 January, 2017

Could not mount shared folder on VirtualBox

Workaround: created a ssh connection with the host in Ubuntu's file manager:

ssh://192.168.0.xxx

There were many complex solutions. This is easy. The result is the same: you'll get files in and out of the box.

09 January, 2017

Screendump: Ubuntu 16.10 and partitions
During the weekend I've build a PC:


  • GA-Z170N-Wifi
  • Seasonic X-Series 750w Power Supply
  • 8GB RAM
The OS is Ubuntu 16.10 booting from a 120GB SSD and whith /home/ on a 2TB WD harddisk.


The Moderboard in the box 
CPU


Unboxing the motherbard

Antenna, SATA-cables, shield 
The motherboard


The CPU mounted on the board

Cooler

The cooler fan mounted

Oh, and with foreground RAM. Notice the nice bokeh.

The cabinet

The cabinet and wires

Here the shield is mounted on the cabinet.

The power supply. Seasonic X.

Harddisks

The cabinet with sides mounted

The first trialboot. Linux Mint worked from a DVD. But not on the harddrive.

Ubuntu ran like a charm.

The finished PC. Booted with Linux. To the left my trusty work laptop.

All systems up and running. Alertlevel Green.

08 January, 2017

Linux

Trying to config a new PC. Linux runs from a DVD, but the Mint / Ubuntu install crashes. I've tried all sorts of UEFI enable, diable and what not. Now I'm trying another distro: Ubuntu Studio.

Linux Mint kept crashing.

So I turned to Ubuntu 16.10. Noproblemo. Everything worked. However I did not set up the 2TB backup drive yet. That's for tomorrow.

The plan is to move /home/ to the 2GB drive.

Solution: drop mint, use Ubuntu 16.10

25 December, 2016

Make /var/www/html/ writable

From the history:

 76  sudo gpasswd -a "per" www-data
   77  sudo chown -R "$USER":www-data /var/www
   78  find /var/www -type f -exec chmod 0660 {} \;
   79  sudo find /var/www -type d -exec chmod 2770 {} \;
   80  touch x
   81  rm x

Line 80 - 81 is just a test. 

17 December, 2016

WordPress Localhost 404 errors

I had to change /etc/apache2/apache2.conf file. In these lines None were changed to All:

14 December, 2016

Speed Up Mint

I have used two simple steps:

  • Cinnamon: disable all visual effects
  • Install the MATE Desktop: good for old PCs
After a few minutes with MATE my reaction was: why on earth didn't I change before ...

21 November, 2016

Where is the anacrontab log?

You can access the anacrontab like this:

awk '/anacron/' /var/log/syslog | less

Result:

root@Odin:~# awk '/anacron/' /var/log/syslog
Nov 21 08:11:58 Odin anacron[877]: Job `cron.daily' terminated
Nov 21 08:11:58 Odin anacron[877]: Normal exit (1 job run)
Nov 21 18:42:13 Odin systemd[1]: Started Run anacron jobs.
Nov 21 18:42:13 Odin anacron[845]: Anacron 2.3 started on 2016-11-21
Nov 21 18:42:13 Odin anacron[845]: Normal exit (0 jobs run)
Nov 21 20:38:31 Odin systemd[1]: Started Run anacron jobs.
Nov 21 20:38:31 Odin anacron[770]: Anacron 2.3 started on 2016-11-21
Nov 21 20:38:31 Odin anacron[770]: Will run job `db.backup' in 60 min.
Nov 21 20:38:31 Odin anacron[770]: Will run job `daglig.backup' in 200 min.
Nov 21 20:38:31 Odin anacron[770]: Jobs will be executed sequentially
Nov 21 21:05:50 Odin systemd[1]: Started Run anacron jobs.
Nov 21 21:05:50 Odin anacron[833]: Anacron 2.3 started on 2016-11-21
Nov 21 21:05:50 Odin anacron[833]: Will run job `test' in 1 min.
Nov 21 21:05:50 Odin anacron[833]: Will run job `db.backup' in 60 min.
Nov 21 21:05:50 Odin anacron[833]: Will run job `daglig.backup' in 200 min.
Nov 21 21:05:50 Odin anacron[833]: Jobs will be executed sequentially
Nov 21 20:07:06 Odin anacron[833]: Job `test' started
Nov 21 20:07:06 Odin anacron[833]: Job `test' terminated
Nov 21 22:05:50 Odin anacron[833]: Job `db.backup' started

Nov 21 22:05:50 Odin anacron[833]: Job `db.backup' terminated

Test anacrontab

Edit the anacrontab file:

nano /etc/anacrontab

Write this line:

1 1 test echo "anacron okidoki" > /home/yourUserName/anacron.log

Reboot. Wait one minute. If you see the file anacron.log in your home directory, you know that anacrontab runs.

07 November, 2016

Linux: Sound Recorder in Bash

This file is made for my research project "What You Should Know About WordPress". I need to record a series of semistructured interviews. So I needed something as simple as a soundrecorder. That's a job for bash:

#!/bin/bash

# Record interview
# Encode as MP3

# User Input
echo "I'll record sound and save the file as MP3"
echo "What is the name of your file? (Remember: .mp3)"
read filename

# Record and encode
arecord -v -f cd -t raw | lame -r - $filename

07 October, 2016

Mount H: on Windows shares

# sudo apt get install samba-client samba-common cifs-utils
# mount -t auto -o user=XXXX //server

05 October, 2016

MS Lumia Phone

My new work phone is MS Lumia. I've never tried MS in the role as a mobile. Now the battery is loading, and I wait for some apps to download. Only 3 reboots was necsessary in order to use the thing.

Setting up Outlook was easy, but I had to ignore several "helpfull" suggestions about getting a MS account. No thanx.

A nice feature is the watch when the screen is blank.

MS Lumia Phone

My new work phone is MS Lumia. I've never tried MS in the role as a mobile. Now the battery is loading, and I wait for some apps to download. Only one reboot was necsessary.

27 September, 2016

Raspberry Pi B+

Use a USB to mini-USB cable as a power supply between TV (or similar) and Pi.

15 September, 2016

Webp and Linux

Install the package webp:

# sudo apt-get install webp

Now you can convert image files with cwebp:

# cweb file.png -o file.webp

Or decompress via dwebp.

08 September, 2016

Windows improved

Today's work on a Windows system was pleasant. W10 is a great improvement. But I still prefer Linux.