Integrade IBus 1.5 and gnome-shell 3.6 on Gentoo

IBus becomes to a choice of universal input method platform on GNOME 3. In this post, I’ll introduce how to set up IBus with ibus-chewing properly on Gentoo with gnome-shell 3.6. This is also a note for the trail-and-error procedures for these days.

1.Unmask the restriction of IBus and related resources

# vim /etc/portage/package.accept_keywords

Then add the following sequences to unmask required packages:

=app-i18n/ibus-chewing-1.4.3 ~x86
=app-i18n/ibus-1.5.2 ~x86

NOTE: The version of packages and its related resources may vary with time. You should check the ebuilds in your portages and unmask them manually. Also, with their build-dependent packages and the input methods you want to install.

2. Install IBus and related input methods

# emerge ibus ibus-chewing

NOTE: The post-installation messages of IBus will encourage you to add some environment setting in your X-related settings. However, in my opinion, you can ignore them if you are using gnome-shell.

3. Integrate IBus with gnome-shell

$ gnome-control-center

In the opened “System Settings” window. Select the icon named “Region & Language“. In the “Input Sources” tab:
a. Add the input sources you want to use. E.g., Chinese(Chewing)
b. Set up the shortcut for switch input methods. E.g., Ctrl+Space

Finally, re-login into your session and everything should works. Enjoy it. 🙂

Install gnome-shell 3.8 in Ubuntu with GDM as default login manager

The default shipping of gnome-shell in Ubuntu 13.04 is a mix of version 3.6 and version 3.8. We can upgrade to a general (and maybe clean) Ubuntu/GNOME system via ppa. Reference: How To Upgrade to GNOME 3.8 in Ubuntu 13.04.

# add-apt-repository ppa:gnome3-team/gnome3
# apt-get update && apt-get install gnome-shell ubuntu-gnome-desktop
# apt-get dist-upgrade
# apt-get autoremove && apt-get autoclean

After installation and reboot your system, you can login into the Ubuntu/GNOME environment.

However, the default login manager may be use the lightdm rather than GDM. You should reconfigure it manually if you want to use GDM and the configuration prompt is not shown while installation. The command is:

# dpkg-reconfigure gdm

When the prompt shown which is similar as the reference page one, select GDM. Reboot your system then you can use the default login manager.

Then we encounter another problem. In previous use of lightdm, Ubuntu will connect to network as possible. However in GDM that it will not do that procedure. If we want to let Ubuntu/GNOME/GDM connect to network for access like SSH, we can add a autostart symlink for it. Reference page: How can I use NetworkManager in GDM?.

# cp /etc/xdg/autostart/nm-applet.desktop /usr/share/gdm/autostart/LoginWindow/

And everything works as usual.

Enjoy it. 😉

Change default theme font settings of gnome-shell

Although I’ve post how to make the DROID font as the default font family in Ubuntu, the works have no 100% work in default gnome-shell theme. In summary the steps to set DROID font globally are:

  1. Make sure the font priority is the highest one. Ref: Use droid font as default on Ubuntu 12.04
  2. Install the gnome-tweak-tool and use it to make all the FONT family settings are Sans and Monospace.
  3. Re-login and it works.

However, the top panel and some UI still use the cantarell as default font (since version 3.6, I guess). We should substitute them to make an uniform UI. I’ll introduce two ways as follows:

1. Alter the gnome-shell CSS directly. It is simplest and perfect. However, the settings will be OVERWRITE after upgrading gnome-shell. The steps are:

$ sudo vim /usr/share/gnome-shell/theme/gnome-shell.css

You will see the stage block (in my system, it is at Line 24) as:

/* default text style */
stage {
font-family: cantarell, sans-serif;

Then delete the cantarell font family setting as:

/* default text style */
stage {
font-family: sans-serif;

Then it works when you re-login.

2. Use a local .fonts.conf to override font settings. It is a per-user work but still a feasible solution.

$ vim ~/.config/fontconfig/fonts.conf

Then copy the following settings, paste and save.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

        <match target="pattern" name="family">
                <test name="family" qual="any">
                <edit name="family" mode="assign" binding="same">


After re-login or restart gnome-shell, it works.

The above two are for top-panel/UI font family that the gnome-tweak-tool cannot alter to. Moreover, the font-size of top panel is also controlled by the theme CSS. If you want to alter the default top panel font size, please alter the css file manually. Enjoy it. 🙂

No wallpaper after upgrade to Ubuntu 13.04 with gnome-shell

After upgrading to Ubuntu 13.04, the desktop wallpaper is gone in gnome-shell (however, the issue is occurred in Unity for some user). The issue seems occurs in the default setting of Ubuntu because my Gentoo box has no such problem with gnome-shell 3.6 installed. There are several ways to fix the issues with this reference: Desktop shows a white or black background instead of wallpapers.

  1. Use gnome-tweak-tool. In the Desktop category > Turn ON the Have file manager handle the desktop option.
    However, it will cause the icons shown on desktop. If you do not want the icons, rollback option 1 and try the next option.
  2. Use gsettings to turn on/off specify feature. Try
    $ gsettings set org.gnome.settings-daemon.plugins.background active true

    . And it should display the wallpapaer with no desktop icon after re-login.

  3. Just install the latest gnome and gnome-shell through ppa. As reference: Fix – Ubuntu 13.04 background is white and no wallpaper.
    # add-apt-repository  ppa:gnome3-team/gnome3
    # apt-get update
    # apt-get install gnome-shell

Now I’m done with option 2. Maybe on day I’ll try option 3 for the latest version of gnome-shell. Enjoy it. 🙂

GNOME Shell on Ubuntu 12.04

An updated instruction from Replace Unity with gnome-shell on Ubuntu 11.10. In Ubuntu 12.04, there are better support for Unity and GNOME Shell coexists.

1. Install gnome-shell related packages:

$ sudo apt-get install gnome-shell \
gnome-themes-standard \
gnome-sushi \
gnome-contacts \

2. Disable strange overlay-scrollbar

$ export 'export LIBOVERLAY_SCROLLBAR=0' \
> ~/.xprofile

3. Use native notification of GNOME

$ sudo apt-get install notification-daemon

However, we should check the support of DBus to prevent other issues. Just check if there is ONLY contain notify-osd in the notification service file.

# vim /usr/share/dbus-1/services/org.freedesktop.Notifications.service

If the exec parameter in you file only contains notify-osd, such as: Exec=/usr/lib/…/notify-osd, you should alter it as Exec=/usr/lib/notification-daemon/notification-daemon.

4. Restart Ubuntu and change login session with GNOME. Then enjoy it. 🙂

Display Chinese PDF properly with Evince on Ubuntu

This note is about how to resolve the problem: Chinese PDFs do not display properly and all the Chinese characters are BLANK in Evince (a PDF reader based on Poppler library in GNOME).

The issue is related to the data files (poppler-data, a package for encoded data) which do not install by default. We can install it and make the PDF display works with:

# apt-get install poppler-data.

Now the characters shown correctly. If the characters are shown as unknown symbols, it may related to the font configurations. You can alter your font settings using Droid fonts with this reference: 套用 Droid 字型到 ubuntu linux. Enjoy it. 🙂

Disable automount of GNOME

In GNOME Shell, automount is convenient while devices inserting into computer. But it is annoying for me because I’m booting from an USB stick. The rest partitions in USB will be mounted and popup a notification to ask what action should be taken.

To disable the auto-mounting behavior built-in Nautilus (the file manager of GNOME), we need to change the configurations via dconf-editor or gsettings with the path: automount

For example, to DISABLE the behavior via command-line:

$ gsettings set automount false

. Other wise, just set as true to enable it. Enjoy it. 🙂

The reference is: How to disable automount in nautilus’s preferences.