X1 Carbon Setup

I just got my Lenovo Thinkpad X1 Laptopt. There are some things, that bothered me during installation of my Arch Linux, that I want to keep here for archivation reasons. Might help somebody.

UEFI is not nice… At least I learnd a lot while setting everything up, and there was less manual work than expected. But there was some other manual work for my setup. This post is work in progress, as there might be some more stuff coming, that I encounter.

Neo Keyboard

I am still using the Neo keyboard layout. The caps lock key is used here, to go to layer 3 on the keyboard. Unfortunately the X1 does not have a caps lock key, but a Pos1 and End key at this position instead. The proposal I got in the #neo help channel was really worthy to think about (“am besten jemand verprügeln für dieses furchtbare tastaturlayout”), but I decided to solve the problem directly at my keyboard. I updated the neo.map and replace the entries of the keycodes 102 and 107 with AltGr to make those keys behave as they should for me. You can also download my edited one if you want.

Till now I weren’t able to set both keys in Gnome accordingly. To set Pos1 & End to act as caps lock create the file ~/.Xmodmap using the command:

xmodmap -pke > ~/.Xmodmap

Change the lines with the keycodes 110 and 115 and replace the Home/End with ISO_Level3_Shift. Also add the Shift for keycode 66, to make external (normal) keyboards work:

keycode  66 = ISO_Level3_Shift
keycode 110 = ISO_Level3_Shift NoSymbol Home NoSymbol Home
keycode 115 = ISO_Level3_Shift NoSymbol End NoSymbol End

Then run

xmodmap ~/.Xmodmap

to apply the new map file.

Touchpad

Touchpad is not yet propperly working. But this made it a bit better: http://major.io/2013/08/24/get-a-rock-solid-linux-touchpad-configuration-for-the-lenovo-x1-carbon/

Nautilus

Set nautilus to always show the address bar. Switch on org>gnome>nautilus>preferences>always-use-location-entry in dconf-editor

GDM

Some problems with gdm not showing the desktop after powersafe-mode could be solved by creating the file /etc/modprobe.d/i915.conf and putting there:

options i915 enable_rc6=0

Simple Mail Server

As an admin I have to be lazy. Currently I am moving several websites to a new server. This is workload enough, so I do not want to bother with stuff like a mailserver config. Especially, as I do not really see need for it. There are enough companies offering mail services, so I only want my server to accept mails for the domains he serves and then delivering them to my (or somebody else’s) personal mail address. And of course mails generated from the websites have to be sent out.

I chose exim4 for that purpose. After setting it up (as an “internet site” with splitting into several config files) via

dpkg-reconfigure exim4-config

I created the file /etc/exim4/conf.d/router/050_exim4-config_forwarding with the following content

### router/50_exim4-config_forwarding
#################################

# This router handles forwarding of mails to
# their appropriate recipients

sender_redirect:
  driver = redirect
  domains = +local_domains
  data = ${lookup{$local_part}lsearch{/etc/exim4/virtual/$domain}}

When a new mail arrives, this file is checked first and looks for forwarding rules in /etc/exim4/virtual/DOMAIN. So to set up forwarding for domain.com mail addresses create /etc/exim4/virtual/domain.com with one forwarding rule in each line

root: me@gmail.com
me: me@gmail.com
another-mail: somebody@gmail.com

[UPDATE 15.02.2014]
Although only accepting mail for several domains, I got some spam problems. Spam that was sent to me was then blocked by gmail after forwarding it. As the return address was not existing, my server sent a bounce message to gmail, which was blocked again. I ended up having a lot of frozen messages. To enable some blacklisting with exim on Debian is straight forward, if you know where to look. Check out this tutorial for further information: http://www.linuxlookup.com/howto/dns_blacklist_exim

NetworkManager Dispatcher

To keep my data backed up savely I rely on CrashPlan. For the last weeks I had a quite long bug request pending. What I took from it, was the problem CrashPlan had when the network is not yet available when the service is started. Therefore I disabled its automatic startup and wrote a dispatcher script for the NetworkManager to automatically start crashplan, whenever I get a network connection and stop it, when the connection breaks down. Find the script here: 02crashplan.sh

During mmy research I found out, that the dispatcher service was not enabled on my Arch Linux system. That’s important for the scripts to work.

$ sudo systemctl enable NetworkManager-dispatcher

Similarly the service for the modemmanager was disabled, which caused my UMTS card to not work.

$ sudo systemctl enable ModemManager

While working on this, I wrote another dispatcher script, which takes care of connecting to the univeristy vpn (works for all Munich universities, which get their internet services from the lrz) automatically, when I connect to the corresponding network. Find the script here: 01lrzvpn.sh
The idea for this script and its frame is taken from Ubuntuusers.de. Make sure, to save your credentials in the corresponding VPN configuration file and update the name of the VPN in the script to the one you are using.

Writing a Thesis is Fun

Stuff, that I stumbled upon, while writing my Bachelor’s thesis. Some might be funnier than others.

 

The Jailbreaker cannot always live in Maryland and give sweet candy to everyone!

[Source] – Don’t bother. I don’t live in Maryland either.

 

/* All this GUI stuff I assembled together via various
* howto’s and small code snippets found on the web. So dont
* wonder about this strange looking buttons etc.
*/

[Source] – Did not see the app running. But by reading the code, this is just how a standard button in Android looks like.

 

You are in a hurry, and you don’t want to read this man page.

[Source] – Abosulutely right. But I still need the information…

 

What you need: […] A decent Internet connection & reliable electricity 🙂

[Source] – Thinking of my times in Uganda, I can completely understand it…

 

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

[LaTeX logs] – Seriously. I really abolutely need to get my thesis compiled!