Tag Archives: linux

Tinkering with the cheaper Intel Compute Stick

So, a while ago Intel released a “Intel Compute Stick”. It’s kindof tiny, doesn’t perform perfectly – but is quite a nice, quiet alternative for those whack-a-terminal-an-stream-some-music nights.

Problem is – I don’t care that much for the Ubuntu 14.04 LTS pre-loaded (yes, I am talking about the version with only 1Gb mem, and whatissit – 8gb storage?).

Good thing is – if you can survive with the built in realtek wifi, only thing you need to take heed to is the Intel drivers, from the proprietary locked down section of the binary world (or, almost – they are available in slightly different format..).

So far, you can grab ’em from https://01.org/linuxgraphics.

Problem is – if you really wanna use the built in wifi, mail realtek. Yes.. email – to get drivers. It’s lovely.


Wireless LAN ICs
Email: wlanfae@realtek.com

There is someone that seems to have put the source on git for a working wifi-driver;

do the following;

sudo apt-get install build-essential linux-headers-generic git
git clone https://github.com/codeTom/rtl8723bs.git
cd rtl8723bs
sudo make install
sudo depmod -a
sudo modprobe r8723bs

Either way, I got it cheap – works – and runs. Yay.

Trying out Windows Subsystem for Linux on Windows 10.

It is on… Trying out the … scary co-inhabitant partnership that currently is undergoing a beta period.

Point here is (according to a terrible video by MS) is that it is “brand new”. They seem to have forgotten their old subsystem for UNIX, that was.. horrid – and not even close to something that at least today should be able to touch production machines.

However.. They did stress quite a lot that it is still beta, and only a small subset of actual syscalls via the “adapter” works against the NT Kernel.
No suprises there at all. We will see how many they might be able to cover, and if it might even be proven to gain any kind of trust.

For the real world – the primary claim is that it will work perfectly for developers etc.. I would say it would prolly work as at best a better approach than pulling out resources for a virtual machine.

They seem to take pride in that it will share the current network stack – that we all know is fracked from the beginning. Windows can barely handle anything in this sense, and workload, no – this is only for simple tasks, and a easier way on a local machine to get you hopefully at least the normal GNU toolset to work out of the box.


At least – getting it to run is easy.

To get this horrid beta on your machine – first you need to grab a beer. Then some coffee, then I would say either a bottle of whiskey or a energy drink.

Step by step …

1 – Jump onto your windows 10 box, login, grab the first beer.
2 – register for Windows Insider Previews
3 – dig into the updates and advanced settings, input your account details for the preview
4 – guessing a reboot, and a new beer.
5 – now, go back to the insider preview part in updates – adjust the slider to the outer dangerous position. Grab coffee or whiskey..
6 – reboot – refill drink
7 – Reboot a couple of more times
8 – Apply all the patches, reboot
9 – Do all the logins, verify that your screen is now filled in the lower right corner with at least build number 14332
10 – grab the turn windows features on and off – locate the magical new windows subsystem for linux (beta)
11 – reboot
12 – login again, grab a new drink
13 – punch in bash and accept the canonical licence if you dare, create a local account
14 – grab hopefully that last drink
15 – wait for it to download the ubuntu data, from the microsoft market…
16 – wait for it..

(PS – Seems like they fixed top, kinda – DS.)

Toy around. Enjoy – destroy – and remember – even if this leaves beta – we rely on the NT Kernel, The underlying windows features – Windows networkstack – and the permission of Microsoft to use our software…

Go fish!

So, just for fun I started thinking of getting myself a new shell – I’m not tied down to bash in anyway – just some of the basic features.

So I found Fish.

It has the initial feel of a hippie shell – it’s colorfull, all over the place with completions – let’s see how it works out :).

Debian 7 Toshiba Lifebook T4220 Wacom stylus and tablet rotation

I was a bit frustrated…
Started with that I found jessicalitwin’s page and thought – cool! Finally I could have this little bastard of laptop working all the way!

Baseline: Stylus did not follow the screen rotation..
So, I took a silent moment and thought about it. Here’s my followup:


Install required packages:
(su or sudo -i/sudo)

apt-get install libx11-dev libxrandr-dev gawk libxi-dev libxtst-dev libhal-dev libxosd-dev gettext build-essential linux-headers-$(uname -r)

Get the package from fjbtndrv @ sourceforge

Extract it

 tar xvvf [filename]

and perform:

./configure && make && make install && depmod -a

Now, the rotation-button will work once you reboot!
Sadly – I had a conflict of interest – the default keyboard shortcuts defines the default browser to open, on the same ‘key’ as the rotate button. Annoying, since everytime I pressed rotate, it opened a new browser..
Simply remove that mapping, see the screen shot below (System Settings > keyboard > shortcuts > launchers > Launch Web Browser).

But, since I wanted the stylus to work as well in the orientation I wanted, I added a script to the mixture;

touch wacom-follow-rotation.sh && chmod +x wacom-follow-rotation.sh

The content of the file:


# This script is called from a keyboard shortcut, currently "alt+rotate" located on the display.
# Shortcuts are defined from Settings>Keyboard>Shortcuts>CustomShortcuts
# Also remember to disable the default WWW shortcut, as it maps to the rotate button...
# Define a ERROR VAR.
# Get the current wacom rotation ($state) with:

state=$(xsetwacom get "Serial Wacom Tablet stylus" rotate)

if [ ! -f /tmp/wacom-follow-file ]; then
# File not found, touch it, and give it the state.
touch /tmp/wacom-follow-file
echo $state > /tmp/wacom-follow-file

# select states from get rotate
# 0 none
# 1 ccw
# 2 half
# 3 cw

# Add the +1 logic to the states

case "$state" in
none )
ccw )
half )
cw )

# Might wanna add a if error=1 exit error...

# map it into /tmp/wacom-follow-file
echo $newstate > /tmp/wacom-follow-file

# Verify that your devices are named the same, or even are the same:
# xsetwacom --list devices
# Devices:
# Serial Wacom Tablet stylus
# Serial Wacom Tablet eraser

xsetwacom set "Serial Wacom Tablet stylus" rotate $newstate
xsetwacom set "Serial Wacom Tablet eraser" rotate $newstate

# We are officially... DONE

#Bail with error...
exit $ERROR

As you can see, I am not completely done yet – but it works ;).

Now, I simply added this script as a keyboard shortcut,
making use of the buttons that are still accessable while in tablet mode – Alt+Rotate.
(layout is PageUp – PageDown -Rotate – Fn – Alt on my laptop)

Trying to use it with the rotation button only, made the rotation to stop working… Therefore I use alt+rotate (yes, first you rotate the screen, then the stylus… (until I figure out how to do it better)

Keyboard Shortcuts


# first, grab most of the error-free areas in a hurry:

ddrescue -n /dev/old_disk /dev/new_disk rescued.log

# then try to recover as much of the dicey areas as possible:

ddrescue -r 1 /dev/old_disk /dev/new_disk rescued.log

SSHuttle and RSYNC

The annoyance of having a VPS, and just wanna do RSYNC can be.. a burden. So here’s a easy version of it.

I’ve got a RSYNC-server back home, serving and loyaly keeping my backups in one (or not..) location. But doing rsync directly over the interwebs isn’t .. well, recommended (eherm).

Here’s an easy fix for your VPS that might serve data for some reason to the interwebs, but needs some access (note, I do recommend having a separate machine for this at home, and that you firewall it propperly.. ).

Before you get SSHuttle –

You’ll need the following installed on the ‘client’:


No news, and the only thing I guess you’ll have to (or, not really – you could just download it by hand) install is git (perhaps rsync as well..).

For a vanilla debian/ubuntu system, just go:

sudo apt-get install git rsync

Get SSHuttle to the ‘client’!

git clone git://github.com/apenwarr/sshuttle


Now, simply run ((from the dir you dl’ed it into) with sudo or su’ed as root):

./sshuttle --dns -vr user@host.name.domain

If you need some other information of what you can give to sshuttle, simply do:


Now, this test is guessing you’ve already have setup a separate ssh-key for the user at the remote ssh-server, also that you’re done with setting up the rsync server – the CIDR is just an example of the RSYNC server you with to ‘route’ to. the –dns is still in there for show – this means that our DNS queries goes via sshuttle as well.

Now simply setup your cronjob to run rsync to the ‘local’ server, and you can rest a bit easier!

When it comes to sshuttle, it’s purpose wasn’t really simply tunneling rsync. Have a poke at it, and perhaps you’ll find it a better idea to have it running on your laptop you keep insiting on using on public wifi hotspots. This means the only cleartext data anyone listening can see, will be the dns lookup to your ssh-server :). With the –dns, we simply hide all ‘leaky’ traffic.

One might argue that well, a simple ssh tunnel can do this as well. Mjes.. But then again, this is easier, and a bit more fun!