Monday, 8 February 2016

Start ices2 and remote mplayer in one command


To run ices2 on SOURCE_SERVER, and start up mplayer on TARGET_SERVER, and then shutdown ices2 after quitting the remote mplayer, in one command:

ices2 ~/ices-pulse.xml & ssh -t USER@TARGET_SERVER 'mplayer -cache 512 -cache-min 49 http://SOURCE_SERVER:8000/live.ogg' && killall ices2

Monday, 29 June 2015

Left Handed Configuration for Logitech Marble Mouse on Ubuntu

This comes from https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse

Append the following to /usr/share/X11/xorg.conf.d/10-evdev.conf (and then restart X)

#       - - - Logitech Marble Mouse Settings - - -
#
#       The Logitech Marble Mouse buttons are mapped [A-D] from left to right:
#       A (large); B (small) |  C (small); D (large).
#
#       Preferred options for right-handed usage:
#       A = normal click [1]
#       B = middle-click [2]
#       C = middle-click [2]
#       D = right-click [3]
#       Hold button B while rolling trackball to emulate wheel-scrolling.
#
#       Preferred options for left-handed usage:
#       A = right-click [3]
#       B = middle-click [2]
#       C = middle-click [2]
#       D = normal click [1]
#       Hold button C while rolling trackball to emulate wheel-scrolling.
#       Pressing both large buttons simultaneously (b) produces a "back" action.

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"

#       Physical button #s:     A b D - - - - B C  
#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"   right-hand placement
#       Option "ButtonMapping" "3 8 1 4 5 6 7 2 2"   left-hand placement
#       b = A & D
        Option "ButtonMapping" "3 8 1 4 5 6 7 2 2"

#       EmulateWheel: Use Marble Mouse trackball as mouse wheel
#       Factory Default: 8; Use 9 for right side small button
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "9"

#       EmulateWheelInertia: How far (in pixels) the pointer must move to
#       generate button press/release events in wheel emulation mode.
#       Factory Default: 50
        Option "EmulateWheelInertia" "10"

#       Axis Mapping: Enable vertical [ZAxis] and horizontal [XAxis] scrolling
        Option "ZAxisMapping" "4 5"
        Option "XAxisMapping" "6 7"

#       Emulate3Buttons: Required to interpret simultaneous press of two large
#       buttons, A & D, as a seperate command, b.
#       Factory Default: true
        Option "Emulate3Buttons" "true"
EndSection

Saturday, 28 February 2015

HiFiBerry, OpenELEC and Raspberry Pi 2

Apart from the last step, these instructions come from HiFiBerry.com here.

Create this file: .config/modules-load.d/hifiberry.conf
And make its contents:
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_hifiberry_dacplus

Create or edit this file: /storage/.xbmc/userdata/advancedsettings.xml
And make it include this:
<advancedsettings> <video> <defaultplayer>dvdplayer</defaultplayer> <defaultdvdplayer>dvdplayer</defaultdvdplayer> </video> </advancedsettings>

Create this file: /storage/.config/modprobe.d/disable-lirc.conf
And make its contents:
blacklist lirc_rpi

Now a change that isn't in the hifiberry.com instructions. You need to edit the /boot/config.txt file. To do this the RPi needs to be shutdown, pull the SD card out and mount it on another computer. Add to the end of config.txt the following:
dtoverlay=hifiberry-dacplus

Save the file, start up OpenELEC and select HiFiBerry in OpenELEC's audio settings.

Sunday, 7 September 2014

2 steps for passwordless SSH login

1. Open terminal and run: ssh-keygen
2. Then: ssh-copy-id remote-user@remote-hostname

If you want to give root ssh access to the remote system (e.g. for rsnapshot) then just run 'sudo su' before those two commands.

Thursday, 7 August 2014

RDP rdesktop command

rdesktop -u username -d domain -p password -f -a 24 servername

Tuesday, 22 July 2014

Fix for rsnapshot not running through cron on raspbian

Edit crontab with:

sudo crontab -e

And then in the crontab text file, before the scheduled tasks are defined add:

MAILTO=""

Monday, 10 March 2014

compton config for i3

in ~/.i3/config add this to start compton as daemon

exec compton -CGb

and in ~/.config/compton.conf

backend = "glx"
glx-no-stencil = true
#glx-copy-from-front = false
glx-no-rebind-pixmap = true
glx-swap-method = "exchange"
refresh-rate = 0
vsync = "opengl-swc"
dbe = false
paint-on-overlay = true
sw-opti = false
##unredir-if-possible = true