Posts Tagged Ubuntu

GitLab 5+ on Ubuntu 12.04 LTS

GitLab is a neat GitHub clone that can be installed on your own servers. I wanted to setup mine running in a virtualized Ubuntu 12.04LTS environment.

These instructions are for Ubuntu 12.04.2 AMD64 and GitLab 5-3-stable

Basic Instructions are here:
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md

Deviations from Official Instructions

Ruby

Rather than downloading and compiling ruby 1.9.3, I installed it from the repo:

sudo apt-get install ruby1.9.3

However, I still installed the Bundler Gem.

MySQL

I went with MySQL over PostgreSQL simply because it integrates into my existing tools better.

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

I use MySQL Workbench to configure my server instances. Command line instructions can be found in the GitLab Docs.

Notice in the “Install Gems” step, you have to use the First option for MySQL:

sudo -u git -H bundle install --deployment --without development test postgres

, , , , ,

No Comments

VMware Workstation 8.0.4 on Ubuntu 12.04 (Precise Pangolin)

After doing a fresh install of Ubuntu 12.04 I had problems installing running VMware Workstation 8; when building the kernel modules it failed to build the network module (vmnet).

The fix is to patch the kernel modules (as VMWare hasn’t responded to changes in the 3.2 Kernel).

  1. Download the patch from here: vmware-8.0.4_patch_linux-3.2.tar
  2. Download and extract the patch:
    tar xf vmware-8.0.4_patch_linux-3.2.tar
  3. Enable the execute flag on the extracted script (if necessary):
    chmod +x patch-modules_3.2.0.sh
  4. Install the ubuntu “patch” utility (If necessary):
    sudo apt-get install patch
  5. Run the script to patch the modules:
    sudo ./patch-modules_3.2.0.sh

    When I ran the script it tried to build the modules and reported errors, however, the next time I ran workstation it built and loaded modules without problems

Special thanks to Martin1000 in the VMWare Forums for the tips.

, , , ,

No Comments

Ubuntu 12.04 SSTP-Client installation

Microsoft introduced a new type of VPN with Windows Server 2008 called Secure Socket Tunneling Protocol (SSTP).

Linux support is provided by sstp-client, and network-manager-sstp. However, there are currently no packages in the offical repos and the author’s sites recommend compiling from source.

If you aren’t up for that, there is a PPA available at:
https://launchpad.net/~whoopie79/+archive/testing/+packages

You can add this PPA to your Software Sources, but I felt better just downloading the individual packages files. In this case, you’ll need to install several packages, in the following order:

  1. sstp-client
  2. network-manager-sstp
  3. network-manager-sstp-gnome (Listed as a build artifact under network-manager-sstp)

I use gdebi to install packages as it’s still snappier than the Ubuntu Software Center.

, , ,

2 Comments

Pre-Eden XBMC-live on Ubuntu 10.04 Lucid

I wanted to try out some of the new features in the upcoming XBMC Eden release.

The problem is that I am running XMBC-live on Ubuntu 10.04 Lucid and the Eden xbmc-live package requires the uxlaunch package which is only available in newer versions of Ubuntu. However, it is still possible to get a working xbmc-live setup by manually configuring the system startup.

NOTICE: This guide describes how I was able to upgrade my existing Ubuntu 10.04 XMBC-live system to work with Eden nightlies. I have no idea if this process works on fresh installs or different versions of Ubuntu. If you are running Ubuntu 10.04, I would recommend installing the stable version of XBMC-live prior to attempting this guide.

First, add the XBMC nightly PPA. The official PPA is provided by Team-XBMC and can be found here: ppa:team-xbmc/unstable.
However, at time of writing, the official PPA was having some problems with the build servers, so I ended up using a ppa recommended on XBMCFreak located here: ppa:nathan-renniewaldock/xbmc-nightly.

The first step is to install the new PPA and update your sources.

sudo add-apt-repository ppa:nathan-renniewaldock/xbmc-nightly
sudo apt-get update

Next, upgrade the xbmc packages:

apt-get upgrade xbmc xbmc-bin

During this process, some of the old xbmc packages will be removed, including xbmc-data and xbmc-standalone.

Now we should have the new version of xbmc installed, however, when we boot the system, X will not start automatically and we will be left with a login prompt.

The final step is to edit the startup script. This script is located at /etc/init/xbmc-live.conf and probably already exists if you already had a previous version of XMBC-live installed. There is a simple change to make to the script to point it at the new executable.

Open the script:

sudo nano /etc/init/xbmc-live.conf

Scroll down to the script section and change the exec from /usr/bin/runXBMC to /usr/bin/xbmc-standalone:

script
        if ! grep -i -q autostart /tmp/xbmcliveParams ; then
                exit
        fi
 
        exec /bin/su xbmc -c "/usr/bin/startx /etc/X11/Xsession /usr/bin/xbmc-standalone"
end script

Restart your system and XMBC should come up. Switch to the confluence skin to see the new features.

Here is the full script for completeness:

# xbmc-live
#
# init XBMC environment and starts XBMC in fullscreen (if asked to do so)
 
#      Copyright (C) 2005-2008 Team XBMC
#      http://www.xbmc.org
#
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with XBMC; see the file COPYING.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html
 
description     "XBMCLive"
author          "Luigi Capriotti"
 
start on (filesystem and stopped udevtrigger)
 
stop on runlevel [06]
 
emits starting-x
 
pre-start script
	get_opt() {
		echo "$@" | cut -d "=" -f 2
	}
 
	clear >/dev/tty7 || true
 
	CMDLINE=$(cat /proc/cmdline)
 
	#Process command line options
	XBMC_PARAMS=""
	for i in ${CMDLINE}; do
		case "${i}" in
		xbmc\=*)
		      XBMC_PARAMS=$(get_opt $i)
		      ;;
		esac
	done
	echo $XBMC_PARAMS > /tmp/xbmcliveParams
 
	if grep "boot=live" /proc/cmdline ; then
		# Relies on init scripts to mount boot device on a specified directory
		BOOTMEDIAMOUNTPOINT="/live/image"
	fi
 
	BOOTHOOKSDIRECTORY="/etc/xbmc"
 
	xbmcUser=xbmc
	# Read configuration variable file if it is present
	[ -r /etc/default/xbmc-live ] && . /etc/default/xbmc-live
	if ! getent passwd $xbmcUser >/dev/null; then
		xbmcUser=$(getent passwd 1000 | sed -e 's/\:.*//')
	fi
 
	# Executes pre-hooks (if any) in the System "Hooks" directory
	if [ -d $BOOTHOOKSDIRECTORY/live.d ]; then
	  for hook in $(find $BOOTHOOKSDIRECTORY/live.d -type f -perm /u=x,g=x,o=x | sort)
	  do
	        $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS  || true
	  done
	fi
 
	# Executes pre-hooks (if any) in the user "Hooks" directory
	if [ -d /home/$xbmcUser/.xbmc/live.d ]; then
	  for hook in $(find /home/$xbmcUser/.xbmc/live.d -type f -perm /u=x,g=x,o=x | sort)
	  do
	        $hook $BOOTMEDIAMOUNTPOINT $XBMC_PARAMS  || true
	  done
	fi
 
	if [ -f /home/$xbmcUser/.xsession ] ; then
		rm /home/$xbmcUser/.xsession
	fi
	if [ -f /tmp/noRestartXBMC ] ; then
		rm /tmp/noRestartXBMC
	fi
end script
 
script
	if ! grep -i -q autostart /tmp/xbmcliveParams ; then
		exit
	fi
 
	exec /bin/su xbmc -c "/usr/bin/startx /etc/X11/Xsession /usr/bin/xbmc-standalone"
end script
 
pre-stop script
	touch /tmp/noRestartXBMC
	rm /tmp/xbmcliveParams
 
	# Clean up the console before we switch to it, to avoid text flicker
	if [ -x /usr/bin/tput ] ; then
		tput -Tlinux reset > /dev/tty1 || true
		tput -Tlinux reset > /dev/tty8 || true
	fi
 
	# Clear VT 1 & 8 of any console messages
	clear >/dev/tty1 || true
	clear >/dev/tty8 || true
end script

, , ,

No Comments

XBMCbuntu ATI Remote Wonder Howto

I recently re-discovered my ATI Remote Wonder and decided to get it working under my Ubuntu Linux XBMC install.

First, install lirc. I selected the option to use the “ATI/NVidia/X10 I II RF Remote” with the kernel (Not userspace) driver, with no transmitter.

sudo apt-get install lirc

My /etc/lirc/lirc.conf file looks like:

include "/usr/share/lirc/extras/more_remotes/atiusb/lircd.conf.atiusb"

My /etc/lirc/hardware.conf was generated automatically by debconf during the lirc install. However, for reference it is:

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="ATI/NVidia/X10 I REMOTE="None" II RF Remote"
REMOTE_MODULES="lirc_dev lirc_atiusb"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="atiusb/lircd.conf.atiusb"
REMOTE_LIRCD_ARGS=""
 
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
 
#Enable lircd
START_LIRCD="true"
 
#Don't start lircmd even if there seems to be a good config file
START_LIRCMD="false"
 
#Try to load appropriate kernel modules
LOAD_MODULES="true"
 
# Default configuration files for your hardware if any
LIRCMD_CONF=""
 
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"

Restart the lirc daemon and run irw and ensure there is output produced:

sudo /etc/init.d/lirc restart
# * Starting remote control daemon(s) : LIRC
irw
# 000000144b760000 00 mouse-right_down SAPPHIRE_ATIUSB_5000023600
# 0000001446710000 00 mouse-right SAPPHIRE_ATIUSB_5000023600

Copy lirc & keymap configuration files into the user XBMC folder (If they do not exist).

#copy Lirc configuration file
cd ~/.xbmc/userdata
cp cp /usr/share/xbmc/system/Lircmap.xml .
 
#copy remote.xml keymap
cd ~/.xbmc/userdata/keymaps/
cp /usr/share/xbmc/system/keymaps/remote.xml .

Edit the XBMC LIRC Configuration File (Lircmap.xml) to contain the following key mappings, ensuring that the device matches the device output by irw.

<lircmap>
        <remote device="SAPPHIRE_ATIUSB_5000023600">
                <play>play</play>
                <pause>pause</pause>
                <stop>stop</stop>
                <forward>forward</forward>
                <reverse>rewind</reverse>
                <left>left</left>
                <left>mouse-left</left>
                <right>right</right>
                <right>mouse-right</right>
                <up>up</up>
                <up>mouse-up</up>
                <down>down</down>
                <down>mouse-down</down>
                <select>ok</select>
                <select>mouse_button_left</select>
                <pageplus>chan-up</pageplus>
                <pageminus>chan-down</pageminus>
                <back>mouse_button_right</back>
                <menu>dvd-root_menu</menu>
                <title>a</title>
                <info>launch_setup</info>
                <skipplus>Skip</skipplus>
                <skipminus>Replay</skipminus>
                <display>max-window</display>
                <start>Start</start>
                <record>record</record>
                <volumeplus>vol-up</volumeplus>
                <volumeminus>vol-down</volumeminus>
                <mute>mute</mute>
                <power>power</power>
                <myvideo>dvd</myvideo>
                <mymusic>media_library</mymusic>
                <mypictures>Pictures</mypictures>
                <mytv>tv</mytv>
                <one>1</one>
                <two>2</two>
                <three>3</three>
                <four>4</four>
                <five>5</five>
                <six>6</six>
                <seven>7</seven>
                <eight>8</eight>
                <nine>9</nine>
                <zero>0</zero>
                <star>Star</star>
                <hash>Hash</hash>
                <clear>Clear</clear>
                <enter>Enter</enter>
                <red>Red</red>
                <green>Green</green>
                <yellow>Yellow</yellow>
                <blue>Blue</blue>
                <teletext>c</teletext>
 
        </remote>
</lircmap>

Restart XBMC and you should now have ATI Remote support.

I spent considerable effort attempting to get The Lirc Mouse support working. However, I had no success. I found that X would recognize the LIRC mouse, but wouldn’t find an appropriate driver for it. In the end, I assigned the mouse buttons to the navigation keys via Lircmap.xml.

For the curious I will post the process that I used to get X to the point where it would detect the remote (according to the Xorg log).

The default settings for the lircm daemon wern’t creating the appropriate /dev/lircm which, I believe, prevents X from locating the mouse, so I had to take an alternative approach using the uinput module. It seems that this method has had limited success with others so perhaps it is a system configuration issue with me.

First I configured my /etc/lirc/lircm.conf file with the following contents (the button presses determined from examining the output of irw):

# To find out how to get a proper configuration file please read:
#
#       /usr/share/doc/lirc/README.Debian
PROTOCOL IntelliMouse
ACCELERATOR 2 30 5
ACTIVATE * ATI
 
MOVE_N * mouse-up
MOVE_S * mouse-down
MOVE_W * mouse-left
MOVE_E * mouse-right
MOVE_NW * mouse-up-left
MOVE_NE * mouse-up-right
MOVE_SW * mouse-down-left
MOVE_SE * mouse-down-right

Next I ensured that the START_LIRCMD value is FALSE in /etc/lirc/hardware.conf:

START_LIRCMD="false"
 
#Make sure there isn't a trailing START_LIRCMD in your hardware.conf as there was in mine.

While experimenting I would load the uinput module manually, then start lircmd by hand – however, a working implementation would have uinput in /etc/modprobe.d so it loads automatically, and lircmd in something like rc.conf so it runs automatically.

#Make sure lircd is already running (see above)
#load the module and start lircmd for testing:
sudo modprobe uinput
sudo lircmd --uinput

At this point you’re able to restart X and have it detect the lircm mouse. However, I never got it to properly load the drivers. If anyone knows what I’m missing it would be great if you could post in the comments.

, , , ,

4 Comments