fcitx-fbterm for Debian
=======================

Brief usage
-----------

fcitx-fbterm contains two commands in /usr/bin: fcitx-fbterm and
fcitx-fbterm-helper. Please use fcitx-fbterm-helper to start Fcitx outside
a fbterm, i.e. the helper script will help you launch fbterm. When Fcitx
isn't running in background, you need to use `fcitx-fbterm-helper -l` to
start it; if it's already running, just run `fcitx-fbterm-helper`.

`fcitx-fbterm-helper` does *NOT* accept fbterm arguments and options.
If you want to start up fbterm with fcitx-fbterm input method support
together with some custom fbterm options, you should do as follows:

1. Make sure there's a fcitx instance running in the same user as you are
   currently logged in.
2. Make sure /usr/bin/fbterm binary is granted special privilege for
   Ctrl+Space keyboard shortcut to be usable. Details will be given in
   the following texts.
3. Call `fbterm <custom_arguments> -i fcitx-fbterm`.

Please read fbterm(1) man page for detailed information.


How to enable fcitx-fbterm keyboard shortcut
--------------------------------------------

If you would like to toggle input method via Ctrl+Space keyboard shortcut, 
you'll need to make extra permission modifications to /usr/bin/fbterm,
which isn't added by default in Debian due to security concerns.

************************************************
* Traditional way: add setuid bit (deprecated) *
************************************************

Run the following command as root will do the work for you:

    chmod 6755 /usr/bin/fbterm
    chown root:utmp /usr/bin/fbterm

If later you decide to recover to the defaults of fbterm, run:

    chmod 0755 /usr/bin/fbterm
    chown root:root /usr/bin/fbterm

Note that you may still not be able to call keyboard shortcut in this way
if you are not running fbterm as root. In such case, please use the following
modern method instead of this one.

 -- Aron Xu <aron@debian.org>  Wed, 26 Oct 2011 04:18:55 +0800

************************************************************
* Modern way: manipulate binary capabilities (recommended) *
************************************************************

On modern Linux systems with capabilities enabled, you may also
choose to run the following command (as root):

    setcap 'cap_sys_tty_config+ep' /usr/bin/fbterm

To revert such change later, run:

    setcap 'cap_sys_tty_config=-ep' /usr/bin/fbterm

 -- Boyuan Yang <073plan@gmail.com>  Mon, 09 Jul 2018 21:03:35 +0800
