Wed, 12 Dec 2018

Running latest firefox on debian installed as user

Debian packages the firefox-esr release which works quite well most of the time, but I find often the newest browser is often required for some functionality. I've put together a little script that basically sets this up with a local firefox install in ~/.opt

You can copy/paste this into a terminal and it will download the latest firefox, extract it to ~/.opt/firefox and setup a desktop file so that it will appear in the desktop menu

mkdir -p ~/.opt
cd ~/.opt

FFCHANNEL=latest
LIBDIRSUFFIX="64"
VER=${VER:-$(wget --spider -S --max-redirect 0 "https://download.mozilla.org/?product=firefox-${FFCHANNEL}&os=linux${LIBDIRSUFFIX}&lang=${FFLANG}" 2>&1 | sed -n '/Location: /{s|.*/firefox-\(.*\)\.tar.*|\1|p;q;}')}
echo $VER

wget https://ftp.mozilla.org/pub/firefox/releases/${VER}/linux-x86_64/en-US/firefox-${VER}.tar.bz2 -P /tmp
tar jxvf /tmp/firefox-${VER}.tar.bz2

mkdir -p ~/.local/share/applications
BASEDIR=`pwd`
cat <<EOF >> ~/.local/share/applications/firefox-stable.desktop
[Desktop Entry]
Name=Firefox
Comment=Web Browser
Exec=${BASEDIR}/firefox/firefox %u
Terminal=false
Type=Application
Icon=${BASEDIR}/firefox/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;
StartupWMClass=Firefox
StartupNotify=true
EOF

sudo ln -sf ${BASEDIR}/firefox/firefox /usr/local/bin/firefox

More information in the debian wiki: https://wiki.debian.org/Firefox

posted at: 19:34 | path: /debian | permanent link to this entry


Wed, 17 Jan 2018

Setting ip address of squeezeboxserver

I couldn't seem to find this information anywhere, and I just spend longer than I'd like to admit sorting this issue out. I use the Logitech Media Server (v7.9.1 as of now) and I just reinstalled it on my server. After doing that the "Server IP Address" was getting picked up as my public ip address on my gateway server, and not the local network address of 192.168.0.1. This was causing the settings interface to be inaccessible on the local network with an error in the server.log file of Access to settings pages is restricted to the local network or localhost.

Fixing this was as simple as editing the /etc/default/logitechmediaserver file and setting the following line:

SLIMOPTIONS="--playeraddr 192.168.0.1"

Not the httpaddr or cliaddr options which is what I was setting, because I didn't read the help page closely enough.

posted at: 23:49 | path: /debian | permanent link to this entry


Thu, 03 Nov 2016

mpd in debian jessie using pulse audio

I've used mpd on various desktops for a long time, and I've always just set the output directly in the mpd.conf file, but that leads to the sound device being tied up if you ever want to do anything else with it. I finally got around to setting this up properly with pulse audio. This setup uses mpd running as the mpd user, and sets up pulse audio (which is running as the desktop user) to allow network access on localhost. MPD then connects to pulse audio to send the audio stream.

# give mpd access to use pulse
sudo usermod -aG pulse,pulse-access mpd

# configure pulse to allow access from localhost
echo "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1" >> /etc/pulse/default.pa

# restart pulse audio as the user
pulseaudio --kill
pulseaudio --start

Then configure /etc/mpd.conf with the following audio_output:

audio_output {
      type            "pulse"
      name            "MPD PulseAudio Output"
      server          "127.0.0.1"
      # set sink to name from "pacmd list-sinks"
      sink            "alsa_output.usb-Burr-Brown_from_TI_USB_Audio_DAC-00-DAC.analog-stereo"
}

Restart mpd, and then it should start playing through pulse audio. (should be able to see it playing in pavucontrol). Lots more detailed information here for different configurations: http://mpd.wikia.com/wiki/PulseAudio

posted at: 22:55 | path: /debian | permanent link to this entry


Fri, 10 Jul 2015

Export owncloud contacts for use in claws-mail

I wanted to setup claws-mail to be able to load contacts from owncloud recently. There is no direct way to do this as far as I can tell, but I did find some people exporting the contacts list to a vcf file, and then pointing claws-mail to use contacts from this file. This ends up working pretty well, and automating it with a script to update makes it a good enough solution.

I had a lot of trouble finding the proper url to wget the addresses from in owncloud 8.2 which is what I'm using. What ended up working, and wasn't really documented anywhere I was looking was https://${HOST}/owncloud/remote.php/carddav/addressbooks/${USER}/contacts?export - The key bit being the ?export at the end of the url.

I'm using the following bash script to do the export, which was adopted from an older blog post doing the same thing:

#!/bin/bash
# Script to read Addresses from ownCloud an put it in a file that can read by
# Claws-Mail

# output file location
ADDR_FILE=~/.owncloud_contacts.vcf
TIMEOUT=30
# config file location
CONFIG=~/.owncloud_contacts.cfg
source ${CONFIG}

if [ -z "$USER" ] || [ -z "$HOST" ] || [ -z "$PASS" ]; then
   echo "ERROR: config file is not setup correctly"
   echo "create ${CONFIG} with the contents:"
   echo "HOST="
   echo "USER="
   echo "PASS="
   exit 1
fi

# owncloud link to export contacts
LINK=https://${HOST}/owncloud/remote.php/carddav/addressbooks/${USER}/contacts?export

# Get the data!
OPTIONS="--output-document=$ADDR_FILE --auth-no-challenge --timeout=$TIMEOUT --http-user=$USER"
wget ${OPTIONS} --http-password="${PASS}" ${LINK}

Running the above script will output a ~/.owncloud_contacts.vcf file which can be loaded into claws mail as a new VCard address book. Running the script again will overwrite the file with updated data, and claws mail sees the new addresses.

posted at: 01:33 | path: /debian | permanent link to this entry


Wed, 24 Jun 2015

Triple monitor setup with two video cards using nouveau

I upgraded my debian desktop from wheezy to jessie today, and in doing so my triple monitor setup stopped working. This was originally a complicated thing to setup, and I had originally done it with a very specific xorg.conf file using Xinerama and some LeftOf RightOf screen setups. This didn't work after the upgrade, and X just launched into a black screen, and the Xorg.0.log just ended with a weird message about "dropping master: -22(invalid argument)".

So anyways I was messing around with the xorg.conf without any luck, and finally stumbled upon some useful information searching for a solution.

It turns out you can now just configure this whole thing with xrandr. In my case I was able to just run:

xrandr --setprovideroutputsource 1 0

This enables the second video card. And then I used a program (apt-get'able of course) called arandr which let me activate the third monitor on the second video card, and drag and drop the monitors into the correct physical layout location. arandr allows you to save a script that just runs the xrandr command needed. I had to add the bit from above to give me the following:

xrandr --setprovideroutputsource 1 0
xrandr --output VGA-1 --mode 1440x900 --pos 2880x0 --rotate normal --output HDMI-1 --off --output HDMI-1-2 --off --output DVI-I-1-2 --off --output VGA-1-2 --mode 1440x900 --pos 0x0 --rotate normal --output DVI-I-1 --mode 1440x900 --pos 1440x0 --rotate normal

Put that into your .Xsession or whatever you run on startup, and your monitors will get setup correctly.

posted at: 18:48 | path: /debian | permanent link to this entry


Sat, 13 Dec 2014

Epson WorkForce DS-30 document scanner in linux

Purchased this little DS-30. portable document scanner recently, and although it was quite easy to setup in linux, I'd thought I'd post the steps if anyone else is looking for it.

I installed this in Debian, but any deb or rpm based distro should work pretty much the same. First Search for "ds-30" at the epson linux download page.

You'll need to download three files:

Then go ahead and install these files with dpkg:

sudo dpkg -i iscan_2.30.0-1~usb0.1.ltdl7_amd64.deb iscan-data_1.33.0-1_all.deb iscan-plugin-ds-30_1.0.0-3_amd64.deb

And if that all went ok, you can then run iscan, or aquire image from iscan in the gimp (file->create->iscan).

The scanner itself won't do anything when you plug it in. The light only comes on when iscan is loaded and connected to the scanner.

posted at: 15:00 | path: /debian | permanent link to this entry


Mon, 15 Oct 2012

Debian Wheezy Translation files

I installed a fresh copy of wheezy on a laptop recently, and I was getting a ton of Translation-<language code> updates that I didn't really need. You can disable them by added a apt.conf.d file like so:

echo 'Acquire::Languages "en";' > /etc/apt/apt.conf.d/99translations

Do an apt-get update and it should only update the english translations.

posted at: 14:24 | path: /debian | permanent link to this entry


Tue, 04 Sep 2012

newer geotoad on n900

I wanted to setup gpxview on my n900 phone to use GeoToad to download caches near to my location, so I installed the default package, however it turns out the packaged version is rather out of date. 3.12.1 vs the current 3.17.1, which I noticed because 3.12.1 fails to download any caches. This looks to be a known problem with that version as it's very out of date now, so the solution is to upgrade. The problem however is that the n900 does not have a newer package available. However I was able to just install the geotoad_3.17.1-1_all.deb from the GeoToad download page. It depends on ruby and libopenssl-ruby so make sure those are installed first. Since that package is not platform dependent it installs fine and works just perfectly now.

posted at: 04:14 | path: /debian | permanent link to this entry


Tue, 20 Sep 2011

Gigabyte boot from usb gives Boot Error

I've had this problem recently with some Gigabyte motherboards, and booting from USB to do a debian install. What happens is I create my USB boot stick, or use an existing one that I know works, and when I attempt to boot from it, I get the boot screen and it simply displays "Boot Error:". After searching around I've seen a few different solutions, some people formatting the usb stick in windows first, some plugging the drive in at the right moment during the boot sequence, etc. I tried a couple of these options without any sucess. But I did finally get it working and for myself, the problem seems to be the way I partitioned the device. Normally I create a single partition on the device /dev/sdX1 of whatever size, and then zcat the boot image to the partition. What I did in this case is ignored the partition table all together, and just ran:
zcat boot.img.gz > /dev/sde
mount /dev/sde /mnt
cp debian-6.0.0-i386-netinst.iso /mnt/
umount /mnt
For whatever reason, this seems to boot just fine on this gigabyte board, where doing the same thing onto a partition would give the "Boot Error:" message.

posted at: 19:11 | path: /debian | permanent link to this entry


Mon, 07 Feb 2011

System policy prevents stopping the system

I had this come up when the power switch is pressed on the system, when I just want the system to shutdown no matter what. Searching around I found the following bug report that ended up having the answer:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556376

This can be worked around by creating '/var/lib/polkit-1/localauthority/50-local.d/allow-shutdown-multi.pkla' with the following contents:

[allow shutdown multi]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultAny=no
ResultInactive=no
ResultActive=yes

posted at: 21:37 | path: /debian | permanent link to this entry


2019-Jun
2019-May
2018-Dec
2018-Jan
2017-Aug
2017-Jun
2017-May
2016-Nov
2015-Dec
2015-Nov
2015-Oct
2015-Jul
2015-Jun
2014-Dec
2012-Oct
2012-Sep
2012-Jun
2012-Feb
2012-Jan
2011-Dec
2011-Sep
2011-Aug
2011-May
2011-Feb
2010-Jun
2010-Apr
2010-Jan
2009-Sep
2009-Jul
2009-May
2009-Jan
2008-Oct
2008-Sep
2008-Jun
2008-May
2008-Jan
2007-Nov
2007-Oct
2007-Aug
2007-Jun
2007-May
2007-Mar
2007-Feb
2007-Jan
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jun
2006-Apr
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
2004-Jun
2004-May

Powered by PyBlosxom | RSS 2.0