Ubuntu from scratch – Part 2

Saturday, 25. May 2013

This is part 2 of the “Ubuntu from scratch” series. Part 1 is over here


Table of content
Part 1 – Installation of the base system
Part 2 – Setting up the graphical environment
Part 3 – Multimedia
Part 4 – xcompmgr and Openbox basic settings
Part 5 – making Openbox more comfortable
Part 6 – Font Antialiasing
Part 7 – (Optional) install Japanese fonts
Part 8 – Installing tint2
Part 9 – Themes
Part 10 – Recommended tools
Part 11 – GTK themes
Part 12 – Mouse theme
Part 13 – Icons
Part 14 – File manager
Part 15 – Enhancing Openbox autostart
Part 16 – Graphical login
Part 17 – Wallpaper
Part 18 – Remove icons from the Openbox theme & more font settings


Part 11 – GTK themes
As you’ve possible noticed – the Openbox windows are looking fine now, but GTK still looks crappy and if you install Thunar, there are no icons. Let’s fix this!

First, we need to install some tools to tweak the GTK settings:

Strange enought, some applications will be themed using lxappearance, some will be themed by the gtk-chtheme settings.

We start with lxappearance:

ufs-2-1

I’ve selected “TropicBomb” as theme, I also have set the fonts to DejaVu Sans (Book) 9. Once set as you like it, close the window and launch gtk-chtheme:

ufs-2-2

I’ve selected the same settings here :)


Part 12 – Mouse themes
Not only the GTK should be themed, we also want to theme our cursor. I use the dmz-cursor-theme.

Back in the lxappearance tool, I now select this one – I prefer the white version.

ufs-2-3


Part 13 – Icons
I want the full bundle of the gnome-icon-themes, so I install them all with this command:

ufs-2-4

There are much more icons themes in the Ubuntu repo, I would recommend that you install the one that sounds good for you. To get an overview, run this command:


Part 14 – File manager
I like Thunar, a very nice file manager that comes from xfce4. This is one of the reasons I like Linux so much – you simply install the software you want. lxappearance for example is for sure made for LXDE and xfce4-volumed on the other hand is made for xfce4.

ufs-2-5

In Part 13, we’ve selected a Gnome theme – this is now displayed in thunar. Of course you can also install other file managers like nemo or nautilus (Mint and Gnome).


Part 15 – Enhancing Openbox autostart
We’ve installed two additional progams, we would for sure like to run once Openbox starts:
- xfce4-volumed
- gnome-settings-daemon

So we gonna add them with 2 single lines to the autostart:

The trailing “&” is very important. This will background the just launched program and allows the following program to run. If something does not load on the Openbox start, check ~/.config/openbox/autostart if ALL commands are ending with the &.


Part 16 – Graphical login
Login/Passwort into the console and type “startx”. Nice, nerdy, but we know it better. We need a graphical login – manager. Luckily there is SLiM, a very nice and easy to configure login manager.

The default theme is installed now, we can reboot and check it out.

ufs-2-6

Not your taste? No problem! You can get more themes over here. Once downloaded you should extract them into: /usr/share/slim/themes.

If you look for free, awesome ressources, you should check deviantart.com! I got my SLiM theme from there, too.

For my workstation, I’ve used “November” and modified both PNGs and also the slim.theme file. Let’s download and use it as an example.

In the last bundle of commands, we’ve installed unzip & unrar, we’ve downloaded the zip file from deviantart, extracted it and moved the containing files to the SLiM-themes-directory. We’ve opened /etc/slim.conf with mousepad with root-rights (be careful!).

Look for “current_theme” and simply replace “debian-joy” with “November”. Save & exit (right-click on the background – Exit).

ufs-2-7

This looks much better, doesn’t it?

For sure, you want to edit the slim.theme file and replace the creators name with yours, so:

To replace the photo, you need a little bit of graphic knowledge. I’ve done it with gimp – trust me – after more than 15 years of Photoshop usage, this is much harder for me than for most of you :P Simply create a new layer and drop your foto on top of the creators one.

A hint for you multi-head users out there. Stretching was bad – very bad – looking when trying. I simply used gimp to create a file with the width of all my displays (3x 24″ á 1920 = 5760×1200) and put my wallpaper onto the gimp file, scaled it to 1920×1200 and placed it to the very left, duplicated it, put the next into the center and a last time, replaced it to fill the right gap. Saved as PNG as “background.png” into /usr/share/slim/themes/November and: done.


Part 17 – Wallpaper
This is pretty easy with a great tool called “feh”.

Download a wallpaper you like (I can again recommand deviantart.com as source). Next, we have to a create another single-line bash file that we will put to the Openbox autostart file.

Let’s try it!

ufs-2-8

Looks cool :D Now, let’s add it to the Openbox autostart file, so it will load on every boot.


Part 18 – Remove icons from the Openbox theme & more font settings
We’ve changed the look and feel of a lot things, but not the Openbox fonts & icon settings – yet.

Launch obconf from your menu, terminal or Alt+F2 and navigate to “Appearance”.

ufs-2-9

Icon: Remove the “N” in front of the NLIMC (marked)
Fonts: Simply click the “sans Bold” and use whatever font you like. I change it to DejaVu Sans/8.

ufs-2-10

Ubuntu from scratch

Saturday, 25. May 2013

In the last couple of weeks, I installed a lot of different Ubuntu-based distros on my system(s). There was Ubuntu 13.04, Xubuntu 13.04, Linux Mint MATE and Crunchbang Linux. The distro I liked most was Xubuntu 13.04, but somehow, it was still too much of stuff pre-installed that I don’t need or even like. While it was pretty comfortable to work with xfce4, I like Openbox more. I even like i3wm more, but that’s another story. On the ThinkPad, I had installed Xubuntu 13.04 and equipped it right after the installation with Openbox, tint2 and conky (I posted about it previously). I’m now using this setup for a week and this is for a long time the best OS in my eyes since I was using OS X as the one-and-only system years ago. I’m superhappy how well it works on the ThinkPad. For work, I run Ubuntu 12.10 on this laptop, and I get around 2h’s when working on the battery. Running my own Xubuntu/Openbox setup increases the battery life to up to 4h+. Of course, as a YouTube addicted one, I quickly decrease the available power by showing videos about vim, different linux (mainly console-based) tools and also flight/flight-sim stuff. However, it works much better with my setup than with the more or less stock Ubuntu (I’ve simply installed the gnome-session-fallback package as I don’t like Unity).

When I read stuff about how to configure stuff (especially for tint2 or conky), I often read on the ArchWiki. It’s with UbuntuUsers-Wiki the best (in my mind) out there. So the question came up, why don’t I use Arch? Ubuntu (or Canonical) is on the best way to become evil with their ways to handle things (maybe not as evil as Google or Apple, but still – I often hear complains).

The reason why I still use and will continue to use Ubuntu for my own computers is that I work with them all-day-long. I’m simply rid of different systems at work and at home. I had this when working for Cisco or Medion, Windows there, Mac at home, or Linux… I’ve now switched completely to Linux and I’m also a bit proud of that. I admit, Arch could be the better Linux for me as there is a very active community who develops stuff, especially when it comes to “pimping” desktops, but as mentioned before – I’m happy to work on the same system now. Workstation, server at home and laptop and more (;)) at work. So that’s why I’ve chosen Ubuntu for this post.

So what is this post about? Well, it’s nothing less then setup a Ubuntu-based setup on your own. Let’s get started!

As base system, I don’t use Ubuntu Desktop. Unfortunately, Canonical has dropped the “Alternate” installation ISOs (or I simply was to blind to find it) – however, I’m gonna use the current server ISO, which is by today Ubuntu Server 13.04.


Table of content
Part 1 – Installation of the base system
Part 2 – Setting up the graphical environment
Part 3 – Multimedia
Part 4 – xcompmgr and Openbox basic settings
Part 5 – making Openbox more comfortable
Part 6 – Font Antialiasing
Part 7 – (Optional) install Japanese fonts
Part 8 – Installing tint2
Part 9 – Themes
Part 10 – Recommended tools
Part 11 – GTK themes
Part 12 – Mouse theme
Part 13 – Icons
Part 14 – File manager
Part 15 – Enhancing Openbox autostart
Part 16 – Graphical login
Part 17 – Wallpaper
Part 18 – Remove icons from the Openbox theme & more font settings


Part 1 – Installation of the base system

I’ve created a VirtualBox VM to do the steps again and to be able to show you some screenshots.

ufs-1

A very important (in my mind) setting in VirtualBox is to set the NIC to “bridged adapter”. But that is only important if you want to install in VirtualBox, too.

ufs-2

I’ve started the installation and get the the first point of options:

ufs-3

I simply chose “Install Ubuntu Server” here and let it install in the English version (because I blog in English). I then select English as system language and chose (for my own pleasure) the German keyboard. Now it will take some time until some drivers will be loaded and the network autoconfiguration has done it’s job. In my case it failed to use my DHCP (which I guess has to do with my old FritzBox in the basement (I will move DHCP & DNS to an own Alix server in the near future)). So I configure this by hand.

ufs-4

When this is done – I have to give the system a name. I name it “ubuntu-from-scratch”.

ufs-5

I will not use a domain name now, because the new DNS server is not yet set up. I will leave this blank.

ufs-6

my “Full Name” should be Ubuntu User…

ufs-7

and my username is ufs (for Ubuntu from scratch).

ufs-8

Now I have to create a password for my user.

ufs-9

I have to type it twice to be sure I haven’t typed it wrong and then can not login.

ufs-10

Encryption of the home folder (or the whole system) makes sense if you deal with sensible data and/or you use a mobile device. I’ve of course encrypted the whole OS on the ThinkPad, but in this VM, it does not make a lot sense for me, so I’ll skip it.

ufs-11

The Ubuntu setup tries to find the correct timezone. This one is right for me.

ufs-12

The disk setup is much easier today, compared to the very first installation I tried when I was a teenager back in 1993 and I played with very early versions of Slackware (and had very bad experience with the partition schemes :) ). In my workstation, I have 2 SSDs, a 80GB Intel which I use for the root “/” and a 240GB OCZ which I use for “/home”. I use ext4 on both. In this VM, I simply chose “Guided – use entire disk”.

ufs-13

ufs-14

I accept this and let it write the partition table to the disk. Please note that this will DELETE all your existing data on the disk!

The main installation will now be executed and will take a moment or two, grab coffee/coke/whatever you like and relax for a moment.

ufs-15

ufs-16

If you don’t have a proxy server (normally the case if in private conditions), you can simply skip this message and let apt do it’s work. It will download some data from the web which will, depending on your bandwidth, also take a moment – but hey – you’ve something to drink, don’t you? ;)

ufs-17

Next, the question appears of you want to install updates on your own OR do you want to install them automatically. I’ve been working for years with Windows and I always hated this automatic updates, so I do it on my own, but I’m disciplined enough to do the updates on my own from time to time. Your choice!

ufs-18

In the software selection, I just select “OpenSSH server” – I’ll do the rest by hand later on, when the system is installed.

ufs-19

Guess what – it takes a moment to install ;)

ufs-20

Yes, we want GRUB to be installed to the master boot loader – this is the last step of the configuration – and the fun can begin!

ufs-21

Remove the CD and let the system reboot into your fresh installed Linux.


Part 2 – Setting up the graphical environment

ufs-21

Hopefully you still remember your login & password! Login now.

Oh! Look – there are some updates. Unlike the Debian netinstalled, Ubuntu does not load current files from the web while the installation (I guess there is an ISO for that…), but this is a good moment to show you how to update your system.

You will be asked for your password again. Your user HAS superuser-rights by using the sudo command. Enter your own password again, and the system will do the work as root-user. Be careful with sudo.

ufs-22

Once this is done, we’ve updates the repository list. That means that your system had an updated list of available packages on the repositories that you can use.

We gonna upgrade your system – pretty sure we’ll receive a current Linux kernel and updates for installed system software. No worries – this is pretty easy ;)

The -y at the end simply tells apt-get to allow to download additional software and to install it. If we don’t use this parameter, if could become pretty annoying to type “Y” several times. Also, it works and let your leave the computer for a moment.

ufs-23

Depending on your bandwidth – this will take a while. Once you’re back at the prompt, I recommend to reboot the system, mostly because a fresh kernel is one of the very rare reasons to reboot a Linux system.

Once your system is rebooted, login and let’s install the graphical environment.

We gonna install Xorg in it’s latest (in the repo) available version as well as xinit and the window manager Openbox.

pre class=”lang:default decode:true ” >$ sudo apt-get install xorg xinit openbox -y

See? We use -y again. This will download A LOT of data and install it. Hope you drink isn't too cold/too warm yet?

Done! Now we have the graphical environment installed (well, the basics). We can try and launch it!

ufs-24

You don't see much, don't you? ;) No worries - if you see a grey background and the black cursor, you're in the graphical environment. Press the right mouse button to access the menu.

ufs-25

ufs-26

Click the entry "Terminal emulator" and you will be presented - by a terminal. Yeah! More white on black.


Part 3 - Multimedia

It's time to install some additional stuff like audio support and xcompmgr.

ufs-27

If the software is installed, go and run alsamixer - it will show you if the soundcard was detected - press F6 to display some more information about the default soundcard in your system. You can increase the volume by using the cursor up key on the Master line. Hit "ESC" to leave.

A good way to test your soundcard is to install a browser and the Flash-Plugin and visit YouTube.

This will also install a lot of additional libs - but no worries - that's fine. You can launch the browser by typing:

ufs-28

Go to YouTube and play a video with sound.

ufs-29

You don't hear sound, don't you? No problem. The sound channels are not yet activated, even if the volume is set. Launch the xfce4-mixer to fix this:

ufs-30

Now it should work :)

Here's a quick way to install the Video LAN Manager, my personal favourite video player on Linux (which gave me nightmares back in 2003 when installing it on Fedora Core 2 ;) )

Today - luckily - it's much much easier - just 1 line:


Part 4 - xcompmgr and Openbox basic settings

I would recommend to install drivers for your graphics card before you continue.

AMD Radeon
It's pretty easy for the Radeon cards:

Once you've rebooted, you should launch the amdcccle and activate this option:

ufs-31

nVidia

I can't give you more hints for nVidia cards, as I switched to Radeon cards, which have by now the better drivers. I'm not alone with this idea ;)

xcompmgr
The xcompmgr is what compiz is for other desktops like Gnome, KDE etc. - it works pretty easy but has a very weird line of parameters to launch it correct.

To test the installation, I use terminator, a very nice terminal emulator which supports native transparency. A reason why this helps me to test if xcompmgr works is that the native transparency under Openbox only works if xcompmgr is correct launched.

Launch terminator by typing:

ufs-32

Do a right-click on the terminator window and click settings...

ufs-33

...then open the tab Profiles -> Background and set it to 0.5 - activate the "Transparent background" option above and close the window. Close terminator.

Now, we have to launch xcompmgr with the right parameter and launch terminator again to see if native transparency works.

Launch terminator again:

ufs-34

Of course, 0.5 is a bit to transparent, but it helps to see if it works better. I normally run it with 0.8 to 0.9.

Openbox
We want that this loads up every time we launch our setup. So we gonna create a bash file:

Now we need to tell Openbox to run this file on every launch:

To test this, we simply exit Openbox and relogin. Do a right-click somewhere on the background and select "Exit", then:

Do a right-click on the background and select "Terminal emulator" which is now by default terminator. Do it twice and move one window above the other.

ufs-35


Part 5 - making Openbox more comfortable

Now that we have the painful stuff set up fine, we can relax and set up Openbox. We for sure want to be able to run a tool without having to launch it from the terminal every time. This means we can should do two things:

1. Configure our Openbox menu
2. Create a shortcut for the standard Alt+F2 to run applications

Openbox menu
We have to install a tool to configure the menu - or we should simply edit the config files using vi. I guess people who now vi will be able to do this on their own, so I show you the GUI way.

ufs-36

Expand the "Openbox 3" entry and feel free to add new entries of delete old ones. You will notice that the "Web browser" will launch, because the system has set it as x-www-browser (it's the only one). If you go and install more, you could add more to this menu. So we go and create a new item for our chromium-browser and install firefox afterwards.

Click on the "Terminal emulator" to be on the right level, now click on "New item" on the menu above. The label is your choice, I use "Chromium", to make it shot. The Action is "Execute" (which is default). What we execute is "chromium-browser".

ufs-37

Hit the 3.5" FDD icon to save and create another New item with these values:
- Label: Firefox
- Action: Execute
- Execute: firefox

Save again and close obmenu. Do a right-click on the background and see if Firefox and Chromium appears. If not, click on "Reconfigure" blow.

ufs-38

Try launching Chromium. It works, doesn't it?

To run Firefox, we of course have to install it first.

If that's completed - try to launch Firefox from your Openbox menu. Now you know how to configure the menu!

Alt+F2 shortcut
Before we edit the Openbox-config-file, we need to install the programm that pops up and allows us to launch any program. There are different tools to do this job, but I've selected gmrun for this job. Feel free to install your own here.

Try it works:

ufs-39

Press ESC to stop it.

Next, we need to configure the Openbox config-file. This particular file is NOT yet in the right folder. We need to copy the example file over to this folder and edit it afterwards.

To make it easier for beginners, we gonna install & use mousepad for editing (even if I personally prefer vim :) ).

ufs-40

I've selected "Oblivion" from "View" -> "Color Scheme" and also activated "Line Numbers" - this will make it easier to edit the file.

Search for "Launch gnome-screenshot" and paste the following code below:

Save the file, close mousepad and reconfigure (right-click on the background and select "Reconfigure").

ufs-41

Press Alt+F2 and you should be see the gmrun box (or whatever tool you use).

Here is a shortcut that I personally love (seen in tiling managers like i3wm):

This will launch a terminal everytime you press Alt+Enter. Very helpful if you use them a lot. Just place it below the Alt+F2 shortcut into your ~/.config/openbox/rc.xml.


Part 6 - Font Antialiasing
By default - Linux has not the nicest fonts, but I want them - and Ubuntu shows that this is possible. The trick is to install a package and add a config file.

Now, paste this XML-code into the file:

Exit Openbox and relaunch and you will be VERY surprised how much better your fonts will look (or even after installing, without restart).

ufs-42


Part 7 - (Optional) install Japanese fonts
This is pretty easy:


Part 8 - Installing tint2
Tint2 is a taskbar - a very flexible and easy to configure one. You install it this way:

ufs-43

Here is my config:

ufs-44

I don't like the rounded corners in that case - and so I've modified the default tint2rc :)

To launch tint2 when Openbox startx, add it to the autostart file:


Part 9 - Themes
Of course, Openbox has themes. It also has an own tool to change them:

I personally prefer "Carbon" - but that's taste ;)

ufs-45


Part 10 - Recommended tools

(the name is also the package name)

Filemanager: thunar
Chatclient: pidgin
RAW-Editing: darktable
Graphic-Editing: gimp
Twitter-Client: turpial
FTP-Client: filezilla
Multimedia: vlc
Screenshooter: xfce4-screenshooter
Calculator: gnome-calculator


Resumé
It's not as hard as I thought to setup an Ubuntu from scratch as I thought. I hope these instructions will help you to setup your own Unity-free desktop and make you work with it fun. It finally helped me to do the last step from Windows and OS X to Linux.

I will post much more on how to make Openbox the perfect window manager in the near future. We don't have a wallpaper yet, maybe we want a graphical login? And what about themes and icons for thunar? Stay tuned ^^

Here is a little teaser - a photo I've taken today from my triple-head setup, where I run SLiM as login manager.

SONY DSC

Current Openbox desk

Tuesday, 21. May 2013

Just a quick screenshot of my current Xubuntu/Openbox desk (on the ThinkPad) :)

openbox3

Used:
- Xubuntu 13.04 as “base system” (maybe I should try something else in future)
- tint2 as taskbar (bottom)
- Conky (top) for system information
- feh to set the wallpaper
- Pidgin to chat to my XMPP/Jabber-Server (finally escaped from GTalk)
- xfce4-power-manager to control the power, what should happen if the cover with closed etc.
- terminator as terminal emulator
- vim as editor
- powerline plugin in vim
- numbers plugin in vim
- Turpial as Twitter client
- Chromium as web-browser

The font I use overall is (Bitstream) DejaVu Sans and in the Terminal DejaVu Sans Mono.

Openbox on Xubuntu install

Sunday, 19. May 2013

This is about playing around with the Openbox package installed on top of my Xubuntu 13.04 installation. I like Openbox a lot and after using and liking xfce4 in the last few days a lot, some things don’t work as I would like them to.

As you’ve read in my previous posts, I’m a bit paranoid about tearing. I simply hate this! So here’s a quick way to get your Openbox running smoothly with transparency and no tearing.

This is for the Intel graphics, I guess the first part is NOT needed for nVidia or AMD drivers – just make sure they load with an enabled compsite extension.

We need to add a new file for Xorg:

Now paste the following lines into this file:

Reboot your system (yes, seriously – believe me, that’s the fastest way ;) ).

Back in Openbox, we want to install and run xcompmgr which is similar to compiz (and compiz does NOT work with Openbox):

Logout/login as your regular user and run:

The first command enables the compmgr with some predefined settings. The second one creates a cross – click on your terminal (I recommend using terminator).

Now, open another terminal and configure it to run transparent (right click -> settings -> profiles -> background -> hit “transparent background” -> for this test, I recommend to move the slider to 0.6).

This should give you a nice transparent window. Tearing (like in scrolling in your browser quickly should also disappear).

2013-05-19-174751_1600x900_scrot

Of course, this is a test-setup, you should put the xcompmgr lines into a autostart script, but more on this later :)

Xubuntu, the Intel HD4000 and a ThinkPad T530

Sunday, 19. May 2013

More and more, I feel home on Linux on the desktop. In the past I always said that Linux is fantastic – for a server, but not for a desktop. Seems like I simply was not open minded enough. For my photo editing (RAW) I use the great tool Darktable, which has some similarities with Adobe’s Lightroom. It’s a great tool, even if it’s far from perfect – like Lightroom and Aperture ;) – that’s why they get updates.

Now that Xubuntu 13.04 works fine on my triple-head workstation, I wanted to run it on the ThinkPad T530 as well. Oh boy! This wasn’t as easy as expected, but not because of missing drivers (what I first thought that this was the reason. No. The reason were simply some compiz settings and packages missing. I found a tutorial that was written for Xubuntu 12.10, but it works fantastic on 13.04, too.

The problems I had were: not working compiz and a lot of tearing when moving windows. I for sure wanted to solve this after having so much success with enabling composite on the workstation previously ;)

The tutorial (or how to) can be found over on webupd8 and explains very well how to get it working. Even though, I have 2 parts who are not working with 13.04.

1. I couldn’t find the keys in the gconf-editor
2. I couldn’t set the border theme from the windows-management in the main settings, because it simply stopped launching

No problem as there are other tools to use like the gnome-tweak-tool that you can install quickly:

and then run with a simple

Insomnia compiz

Sunday, 19. May 2013

It will drive you nuts if compiz disables previously activated plugins. I have/had this problem with Xubuntu 13.04 on the ThinkPad – it always “forgot” to enable the application switched (alt+tab). Here’s how to fix this issue.

First, install the following package:

Next, go your compiz-settings and set under options: “GSettings Configuration Backend”.

Also be sure, that the “active desktop integration” is enabled.

compiz

I would also recommend to reload compiz, go to your terminal and run:

Keep YouTube videos fullscreen (Linux)

Thursday, 16. May 2013

I admit, I’m a YouTube junkie! I consume a lot of Linux-related videos, PC hardware and a lot of flight-sim or real-flight stuff over there.

As I now have my triple-setup running, I like to have a YouTube video on one of the screens while I work in for example the terminal or on this blog on one of the other windows. By Default, YouTube plays the video fine in fullscreen mode, but always bounces back to windowed mode once you click anywhere else. This is annoying, but here is a quick fix that helps you to go around this issue and enables fullscreen.

This video shows how to: Multi-Screen Flashplayer Fix In Linux

Be careful with ghex! And yes – it works :)

gftp replaced by Filezilla

Thursday, 16. May 2013

On Tuesday evening, I wanted to make a backup of my webserver. As usual I launched gftp and selected the directories I had planned to save to the local fileserver. I was very surprised to see gftp dying. It seems like it has opened a LOT of connections to the server. The download included 25909 files. Imagine your FTP clients tries to download all of them parallel. Bad idea :)

However, I’ve installed Filezilla, which is a very good client, removed the tree views and set up my connections. The backup finished within 3 hours (I had to backup a lot of data :) ).

So if you’re looking for an alternative GUI client for Linux, give Filezilla a run.

PS. If you wonder why I had not mounted the FTP via console – I had, but ran into some permission issues because curlftpfs was not (yet) set up correctly.

A Linux workstation – part 5

Wednesday, 15. May 2013

This is just a quick update on how I set up my AMD Radeon HD6850 on my 3x 24″ screens with an enabled composite extension.

Yes, I’ve got my 3rd 24″ display back on my desk, so I now have my good old 3x 24″ wall in front of me. Yey! :)

I already had installed the fglrx and the fglrx-updates, which includes amdcccle.

First, I had set Xubuntu up with 3 separate Xinerama screens, but I couldn’t get the composite extension to work. This is just a feature that I like, but I wanted to have that enabled. I like the style of a slightly transparent terminal and also – the screenshot-tool that came with Xubuntu (and also Ubuntu) has an option to draw a rectangle on the screen which will be your screenshot. Unfortunately, this one uses composite. I was kinda shocked to see a black screen when selecting this option. Sure, I could create a rectangle and do the screenshot, but I had no idea what is below this dark screen. I know and use this tool also on my ThinkPad T530 that I use for work, and so I know that it should be a bit transparent. So I was looking for a solution and was not able to find one on the web. So I fired up amdcccle and removed the Xinerama mode to put my screens into an “expanding” mode.

displays

Here is my current xorg.conf:

A composite enabled setup should give you a terminal (in my case: terminator) with set up 0.8 of opacity that looks like this:

terminal

Maybe these hints are useful for the one or other – if not, it’s a kinda-wiki for myself if I break my config ;)

Japanese input on Linux with IBus

Tuesday, 14. May 2013

It’s not a secret that I’m interested in japanese language, even if I’ve stopped learning it, because of too less for it. I’m still (more or less) able to read & type Hiragana and Katakana. On the Mac, it was pretty easy to enable the support for those input types, because it was built in.

On my Linux workstation, I’ve installed Xubuntu 13.04. To add the option to type in Japanese, I use the IBus input method. It’s handy and honestly a bit irritating, but here’s how to install it.

First of all – IBus should be pre-installed, if not, simply install the package ibus.

For japanese, we need to install another package:

That was the easy part ;) To configure IBus, we should be sure that it does not run in the background, so we kill it, if we have a running IBus process.

To check if such a process runs, we gonna use ps and grep for ibus-daemon.

The first result line shows the ibus-daemon running in the background with the parameter –xim. By the way: if we don’t use the | grep -v grep at the end, we will get a second line which shows the grepping itself.

To kill the process, we do it a bit radical with this option:

The 2587 is the PID (process id) of the ibus-daemon, you should be sure that this is indeed the correct process, otherwise you will kill maybe an important process, even if you’re not the root-user in this example.

Now that the process is killed, we want to launch it again. I would recommend to press Alt+F2 (for example on Xubuntu or Ubuntu) and simply launch ibus-daemon or you can do this right from the terminal by putting the process into the memory and return to your shell by attaching the & sign to the end of the command.

This could create some annoying output in your terminal, even if you’ve backgrounded the process! You can close your terminal and reopen it, however, launching it with Alt+F2 (or maybe using DMenu) is faster :)

In your menu, you will now have the IBus icon, which is an i on a white ground. Click it and select the settings (German here, but I’m sure you’ll find the settings).

einstellungen

A new window pops up, select the second tab for input settings. Please ignore Ctrl+S in the field shown here. This DOES NOT work! But more on this a bit later.

einstellungen1

Once you’ve reached the right tab, you should be able to select the “Japanese -> Anthy” method. I’ve played with the mozc input method, but Anthy seems to be the better one :)

einstellungen2

Next, add this method to the list below and close the settings windows. I would recommend to restart IBus as shown above if the “Japanese” entry does not appear instantly.

Working with IBus-Anthy is easy – if you know the shortcuts.. I’ve spend quiet a bit of time to find them in the settings menu until it worked as expected. Open a GUI editor like mousepad, gedit etc. so you can try to type in japanese.

Once you’re inside your editor, you are able to use IBus, this only works if you are able to enter something – what makes sense in my mind!

Press Ctrl+Space to activate IBUs-Anthy and type “ohayou”. It should print “おはよう”, underlined. While you type, the latin characters will be live translated into Hiragana, which is fine for this particular word. While you type and it’s still underlined, there will possibly pop down a windows with options to choose from; those are the same (or similar words but in Hiragana, Katakana, Kanji and mixed with Kanji). To use them – you should at least know a bit about these signs and the differences :) ).

anthydropdown

However, if you’ve written the word anime “あにめ” in Hiragana, that’s wrong – it should be in Katakana, but as long as it’s underlined, you can switch the complete word to Katanaka by pressing the F7 key: “アニメ” will appear, press F6 if you want to switch it back to Hiragana. After each word, you should press Enter! This is pretty normal in japanese input systems, because in japanese language, you don’t have a space between words (what makes it pretty hard for bloody beginners like myself ;) ).

But what if you want to type directly in Katanaka and want to switch to latin quickly, for example if you want to type the word “Linux” which will (as far as I know) also appear in latin letters also in japanese?

To enable IBus, we had hit Ctrl+Space, to disable, you simply hit Ctrl+Space again. But if you want to circle through the different input methods, you can do this by pressing Ctrl+, (comma) once IBus is enabled. There is also a latin input method in the japanese language, called Romaji. This is NOT the same as your regular latin letters, because the space between the letters is (even if not always and this depends on the used font as well) smaller. You will also notice “half width” and “full width” in Katakana and also in Romaji. If you want to type 100% perfect japanese, I’m sure Romaji is the better option, but better ask a native japanese writer.

IBus features do not stop here, but this is more about the basics. In the settings, you can enable “Show language panel” to “When active” and a little popup appears if you’ve IBus enabled. This will show you a lot other options and also give you the option to switch between the input methods by mouse clicks. The popup looks like this:

anthypopup

I hope this is useful for my readers. I’ve spent a lot time with a lot of different input methods, namely SCIM, mocz and of course IBus, but here on my Xubuntu, IBus + Anthy works best :)

またね!