Friday, June 24, 2022

Using Compose Sequences when your keyboard doesn’t have a Pause key

One of the things I love about using a Linux machine is that I can enter special characters easily using Compose Sequences. I use the Pause key as the “multi-key” since that key isn’t used for anything else. It was all great when I was using a desktop machines with full-size keyboards. Now I am using a laptop most of the time, and laptops don’t usually have “useless” keys such as the Pause key.

With a bit of Googling, I learnt that pressing Fn+p on Lenovo laptops is equivalent to pressing the dedicated Pause key. This is my today’s happy discovery. 🙂

By the way, if most of your work is done in the Chrome browser, and you can’t (or don’t want to) use Compose sequences, you may try the Paste From Context Menu extension. This extension saved me a ton of time when I was using Chrome OS devices.

Screenshot of the 'Paste From Context Menu' Chrome extension in action

Sunday, June 19, 2022

Inputting Rupee symbol (₹) on Linux machines

tl;dr: When using an InScript keyboard layout, press right Alt + 4 to enter the rupee symbol.

One of the things that I couldn’t figure out for a very long time is how to easily enter the Indian Rupee sign (₹) while entering text. When I was using a Linux machine primarily, I managed by simply copy-pasting the symbol whenever I needed it. After using Chrome OS for a few years, I had gotten used to entering the rupee sign without much fuss, and I missed that ease once I returned to a Linux machine.

I started looking around to see how I can modify keyboard layouts to easily enter the rupee sign. To my surprise, all InScript keyboard layouts had this line:

include "rupeesign(4)"

Looking around, I found a /usr/share/X11/xkb/symbols/rupeesign. This file had this config:

xkb_symbols "4" {
    key <AE04>	{ [  NoSymbol,   NoSymbol,   U20B9 ]	};
};

A quick Google search confirmed that U+20B9 was indeed the rupee sign. Basically, everything needed to easily input the rupee sign is there; only I didn’t know how to use this.

The level3 file in the same directory had the clue. This file started with this comment:

// The default behaviour:
// the right Alt key (AltGr) chooses the third symbol engraved on a key.

As soon as I saw the mention of right Alt as the modifier to use, it became clear that right Alt + 4 was all I needed.

Tuesday, April 5, 2016

Ubuntu on Lenovo P50: using NVidia proprietary drivers

I managed to dual boot Ubuntu (Kubuntu 14.04, actually) on my shiny new Lenovo P50. With the default Nouveau driver, the experience left a lot to be desired. Graphics performance was slow and suspend-resume worked only once. For every boot, suspend will work once. After that, suspending will do nothing—the machine will just stay on forever.

I followed the prompts to install the proprietary drivers, which didn’t really help. After installing the drivers, X would simply not start. So I had to revert to the open source Nouveau driver. (You’d do this by getting a root shell from recovery boot and purging all Nvidia packages.)

Today, as a wild guess, I decided to install the proprietary driver and disable the Intel GPU altogether. (You’d do this by choosing Discrete Only option in BIOS display settings. The default is Hybrid, which keeps both Intel and NVidia GPUs active.) Maybe that could help, I thought, and to my surprise it did work. Graphics is now fast, and suspend-resume works too. Initial display of LightDM and logging into KDE are a bit slow, but everything else is nice and snappy.

Tuesday, June 11, 2013

Watch Apple WWDC keynote video in Linux

Make your browser lie to apple.com that you’re using a Windows machine. I made my Chrome to use the UserAgent string of Firefox on Windows. The video player loaded. Ubuntu seems to have a QuickTime plugin installed, so the video just played.

To change UserAgent of Chrome (i.e. to make Chrome pretend it’s Firefox running on Windows), open Menu > Tools > Developer Tools. Click on the Gear icon at the bottom-right corner and select UserAgent checkbox.


Sunday, October 21, 2012

Seeing GTK mouse cursor in KDE?

If you have upgraded to Kubuntu 12.10, you’d notice that KDM has been replaced with LightDM.  LightDM looks pretty, but somehow doesn’t play well with KDE.  One annoying issue I have noticed is that GTK applications run in KDE use GTK mouse cursor under certain circumstances.  When Chrome shows a menu, the mouse cursor changes to a GTK one and it looks jarring.  Turns out, there’s a fix for that.

1. Install LightDM KDE greeter
sudo apt-get install lightdm-kde-greeter
2. Make LightDM use KDE greeter, and all will be well again. To do that, edit the file /etc/lightdm/lightdm.conf and change the value of greeter-session.  The file will look something like this after the change.  (Boldface text is the change you’d have to make.)
[SeatDefaults]
greeter-session=lightdm-kde-greeter
user-session=ubuntu
3. Save the file and test your changes by running LightDM in test mode:
lightdm --test-mode
If LightDM doesn’t open correctly, check if you have made any typing errors in the config file.  If you cannot fix the issue, just restore the file as it was before you edited; you’ll still have the ugly mouse cursor issue, but at least your computer will continue to work.