Wednesday, June 25, 2014

Sometimes You Just Want To Type Ředkvička

With the release of Red Hat Enterprise Linux 7.0, I decided it was time to do a clean install on my workstation at the office.  This system started life with RHEL-5 of some variety and has received manual updates over the years eventually resulting in something that claims to be RHEL-6, but it's really not.  I can't install any standard RHEL packages.  I have to install everything by hand.  And /usr/local was getting a bit crowded.

So it was time for a reinstall.

After backing up data and rearranging where /home sits (wanted it on the largest physical disk), I started up the familiar installation program.  In a short amount of time, I was up and running with a new RHEL-7 system.  Now to configure it.

I am trying to run as much of a stock RHEL-7 configuration as possible so I can get daily usage out of the product we ship to customers.  It came as no surprise that I only needed to make minimal configuration changes.  Basically everything worked out of the box and I only needed to configure some internal repos we have for yum and site-specific things.  But that doesn't mean I found some things difficult or just not the way I like them.  With Ryan Lerch's help, I was able to get around the most annoying problems:
  1. The desktop I saw when I logged in was littered with everything in my home directory.  That's my own doing, but I miss the days where we had a separate Desktop/ subdirectory for the things you wanted to see on your desktop vs. in your command line environment.  Minor gripe, but it served as a good excuse to clean house.

  2. I do not like the default terminal color scheme.  I do not like the white background.  Easy enough to change.

  3. I absolutely cannot work without sloppy focus for windows.  Ryan Lerch helped here.  Got Tweak Tool up and the right extension installed and was able to toggle sloppy focus on.  This setting is a bit too buried for my liking, but that's ok I guess.  In terms of functionality, it's not quite right.  There is a brief pause between windows gaining focus.  It has taken some getting used to.

  4. I wanted a different window decoration theme but couldn't figure out how to easily change that.  Gave up.

  5. Failed to install a GNOME extension to display weather information.  Tracked down to not having the gnome-shell-browser-plugin installed.  The site could suggest that as something to check on your system rather than just saying it doesn't know what you're running.

  6. I'm not a big fan of the default Cantarell font.  The name is way too similar to my last name and it's not a great font.  Ryan Lerch suggested the Droid Sans fonts, which I switched over to with his help.  This was a direct css hack that will no doubt be lost when I upgrade this system.  I made a backup copy of the original and left a note for myself, but that still doesn't mean I won't lose it during an upgrade.

  7. The window title of the application in focus is displayed on the menu/status/whatever bar at the top of the screen.  The default mode shows an oversized watermark of an icon behind the title in the bar.  The image extends to the edges of the bar and looks incomplete and makes the window title difficult to read.  I've seen this for a while and to me it just looks like a display error.  Example:
    The image appearing behind the word Calculator is hard to read.  For me anyway.  Ryan Lerch helped me modify the CSS file directly to disable this.  Might be nice to have an extension to turn off the image more easily.
But my biggest gripe has been with the keyboard layout configuration.  I have tried numerous ways to configure the US International AltGr variant layout and nothing sticks.  I used to just run setxkbmap as part of my session init script, but that does not work.  Through trial and error, I learned that GNOME uses ibus for input settings.  Once I disabled that, my Xkb settings were honored.  Here's what I did:
  • As root, run something like this:
    localectl set-x11-keymap us pc104 altgr-intl lv3:ralt_switch,compose:caps
  • Run localectl again to verify the settings.
  • Now run this as your normal user account (I assume you are logged in to GNOME):
    gsettings set org.gnome.settings-daemon.plugins.keyboard active false
  • Log out and log back in.
  • Verify you can type characters using the us altgr-intl layout.
Searching online showed multiple recommendations for leaving ibus in place and just disabling it.  So I did that.

And so far my keyboard settings have survived logouts and reboots.  If there is a better way to get this configuration layout, let me know.  I did try using the control center Input Sources thing to change the settings, but it does not offer this level of configuration.


AdamW said...

We fixed install-time keyboard layout configuration quite hard between Fedora 19 and Fedora 20. Unfortunately, those changes didn't make it into RHEL 7. :(

I think I've drunk away my memory of exactly how it worked in F19. But you need to at least take into account what the console/kernel layout is, what the xkb layout is, and what layout GNOME's using. I know GNOME's behaviour *now* is that it will respect the xkb settings as long as you haven't explicitly configured any settings in GNOME, but that may not have been the case in...what, 3.8?

It kinda bums me out that we didn't get the improvements in this area into RHEL 7 :(

You may find some useful info in this heroically gigantic post on my blog:

Elliott Sales de Andrade said...

Hmm, can't you set the default font from Tweak tool, instead of some CSS hack?

dcantrell said...

Adamw, yes I know about our keyboard configuration changes that went in too late for RHEL-7. I do not have the problem described in Fedora. I am trying to have my work workstation run the latest RHEL release though because I want to get a feel for what we ship there.

The core problem, from what I can determine, seems to be the version of ibus in RHEL-7. It wants to do too much of its own thing and is not entirely aware of all Xkb variants and layouts. This is easily seen in the keyboard layout configuration screen in GNOME. As long as your layout of choice is there, it's fine. But US Altgr International is not. When I override Xkb's settings by hand, one of two things happens: systemd wakes up and says "oh no you don't" and resets things as defined in /etc/locale.conf. Or ibus wakes up and says, "Sir, I believe you are wrong" and changes things.

systemd cooperates with Xkb in RHEL-7, so disabling ibus seemed to be the easiest solution/workaround for me.

dcantrell said...

Elliott, yes, you can and I should have mentioned that. Since we were already editing the CSS file to disable the background icons in the title/status bar, we made the font changes there.