From VoidWarranties - Hackerspace Antwerp, Belgium
Revision as of 09:10, 4 July 2015 by Berz (Talk | contribs)
Jump to: navigation, search

In a hackerspace a computer is needed everywhere, included behind the bar. So this project was born.
Beer computer-300x290.jpg
Koen, Koert
Den Bunker





The computer is situated in the corner at the end of the bar. Its audio jack is connected to the amplifier next to it to play music.


The touchscreen is located at the other end of the bar and is connected to the case through a USB cable for the input devices and a VGA cable for the output (screen).




Install the needed packages:

sudo apt-get install xserver-xorg-input-elographics xserver-xorg-input-evdev-dev utouch sudo apt-get install xinput-calibrator

Recognize the device at boot

echo 'inputattach -elo /dev/ttyS2' >> /etc/rc.local

Calibrate the touchscreen, and put the output here: /usr/share/X11/xorg.conf.d/99-calibration.conf


This is the config I last used, but if you've got smaller finger feel free to optimize it:

Section "InputClass"
Identifier	"calibration" MatchProduct	"Elo Serial TouchScreen" Option	"Calibration"	"4015 -4 6 4026"


The technical aspect of the setup is documented here, if you just want to play some music, check out How to play music

We use MPD (Music Player Daemon) as a music server. This allows us to use various clients at the same time, including over the network and on portable devices.

MPD can play audio streams. The list of streams is populated by scanning /home/barputer/Music/streams Aditionally MPD scans for music in /home/barputer/Music/shares. However no music is kept on barputer, and we intend to keep it this way. Instead, this directory is dynamically populated by mounting available music directories over the network.



Raf is the name of the script that mounts the shared music dirs, and is an abbreviation of Remote Audio Folders. It scans the network for available samba shares, keeps only those whose name contains the string 'music' to prevent mounting the wrong shares, mounts and updates the MPD library if necessary. It also scans if all the mounted shares are still accessible and unmounts them if they are not. Raf is invoked automatically by cron, keeping the MPD library up to date.

If you're impatient, you can force a sync by executing the following command on barputer:

# RAF sync

To add music to the MPD library we originally used djmount, a program which automatically mounts UPNP shares. This setup was copied from Whitespace and is documented here.

Forwarding sound through pulseaudio

Pulseaudio has replaced ALSA and OSS quite some time ago as the default sound server on linux. Since pulseaudio has networking built in by default, you can forward sound to barputer instead of your laptop speakers if you are running pulseaudio too (ie: run linux). However, this option isn't obvious by default. The easiest way to enable it is to install two tools to configure pulseaudio: paprefs (pulseaudio preferences) and pavucontrol (pulse audio volume control). Using paprefs you can tell pulseaudio to make remote audio servers available locally under 'Network access', by ticking 'Make discoverable Pulseaudio network devices available locally'. The next step is to tell pulseaudio to use this remote server. You can do this in pavucontrol under the 'playback' tab. All the programs that are playing audio locally should be listed here, and you should be able to select to play one of these streams on barputer if Avahi detects the remote server. However, this doesn't work all the time. Instead, you might want to specify which pulseaudio server to use when starting a program by declaring the server before starting it. Example:

PULSE_SERVER=barputer.void:4000 rhythmbox

This should start rhythmbox while sending the resulting audio to barputer. Beware of the fact that for some reason the pulseaudio on barputer can only play one audio stream at the time. If someone is already playing music (for example: mpd is on), you will not be able to connect to play music through barputer.

Point of sales & Stock management

Using the vwcr application made by Koert. It's not completely finished yet, but it can be used (and is being used).



Every once in a while we make a full snapshot. These are full images that can be restored to the drive. The last image was made on 17/05/'12. The images are made using FSarchiver. We can't use Norton Ghost or Clonezilla since they don't have support for EXT4, which we use for barputer's root filesystem. Backup procedure:


A backup of all the files on the root drive is taken every hour. These backups are rotated. Every fifth hourly backup is kept for 25 hours and is called a 'recent' backup. Every fifth recent backup is kept for 125 hours and called a 'medium' backup. Every fifth medium backup is called an 'old' backup and is kept indefinably. One hour in this context refers to an hour the computer is turned on. The snapshots are made and rotated automatically.

This scheme uses rsync for snapshotting, rsnapshot for rotating, and space usage is kept down using hardlinks (every version of a file is only saved once).

$ sudo du -hs /media/backup/incremental/*
4.0K	/media/backup/incremental/counter
3.8G	/media/backup/incremental/hourly.0
138M	/media/backup/incremental/hourly.1
71M	/media/backup/incremental/hourly.2
123M	/media/backup/incremental/hourly.3
72M	/media/backup/incremental/hourly.4
82M	/media/backup/incremental/young.0


*MOAR DOCUMENTING (on this page and How to play music)

Personal tools
Content Creation
Belgian Spaces