Re: How to disable certain keys
On 30/08/2015, Bret Busby <bret.busby@gmail.com> wrote:
> On 16/08/2015, Bret Busby <bret.busby@gmail.com> wrote:
>> On 16/08/2015, Bret Busby <bret.busby@gmail.com> wrote:
>>> On 16/08/2015, tomas@tuxteam.de <tomas@tuxteam.de> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> On Sun, Aug 16, 2015 at 12:04:17PM +0800, Bret Busby wrote:
>>>>> On 15/08/2015, Carl Johnson <carlj@peak.org> wrote:
>>>>> > Bret Busby <bret.busby@gmail.com> writes:
>>>>
>>>> [...]
>>>>
>>>>> > That same right-click menu has an option to save the settings to a
>>>>> > .xmodmap file and shows how to include that file on start.
>>>>
>>>> [...]
>>>>
>>>>> Okay; whilst the option to save the settings to the .xmodmap file, is
>>>>> not explicit, and I had to guess it (something like "Write settings"
>>>>> from memory), in the response to doing that, it returns a dialgue box
>>>>> that states "You should modify your login script to include a line
>>>>> like .... "
>>>>>
>>>>> How do I modify the login script? I do not know the file name or path,
>>>>> for the login script.
>>>>
>>>> That depends a bit on what shell you are using and on your other
>>>> general
>>>> setup. Typically, if your shell is bash, this file will be called
>>>> .bash_login (note the dot at the start o the name), and will live in
>>>> your
>>>> home directory.
>>>>
>>>> How does the line you are supposed to include look?
>>>>
>>>
>>> Hello.
>>>
>>> Unfortunately, like with many other message boxes/dialogue boxes,
>>> copying and pasting, is not possible.
>>>
>>> In the particular message box, is
>>>
>>> "
>>> Wrote output to the file
>>> /home/bret/.xmodmap-bret-Aspire-V3-772-UbuntuMATE-1504
>>>
>>> You should modify your login script to include a line like
>>> xmodmap ~/.xmodmap-`uname-n`
>>> (those are backquotes.)
>>> <OK>
>>> "
>>>
>>> "
>>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ cat .bash_login
>>> cat: .bash_login: No such file or directory
>>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ sudo cat
>>> /home/bret/.bask_login
>>> sudo: unable to resolve host bret-Aspire-V3-772-UbuntuMATE-1504
>>> [sudo] password for bret:
>>> cat: /home/bret/.bask_login: No such file or directory
>>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ sudo cat
>>> /home/bret/.bash_login
>>> sudo: unable to resolve host bret-Aspire-V3-772-UbuntuMATE-1504
>>> cat: /home/bret/.bash_login: No such file or directory
>>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$
>>> "
>>>
>>
>>
>> So, it occurred to me, to do an "ls" on ".*" and I got (apart from the
>> .<directory name> directories),
>>
>> "
>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ ls .*
>> .bash_history .bashrc .ICEauthority .profile
>> .Xauthority .xmodmap-bret-Aspire-V3-772-UbuntuMATE-1504
>> .xsession-errors.old
>> .bash_logout .dmrc .pam_environment .sudo_as_admin_successful
>> .xinputrc .xsession-errors
>> "
>>
>> So, in running cat .profile, I got
>>
>> "
>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ cat .profile
>> # ~/.profile: executed by the command interpreter for login shells.
>> # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
>> # exists.
>> # see /usr/share/doc/bash/examples/startup-files for examples.
>> # the files are located in the bash-doc package.
>>
>> # the default umask is set in /etc/profile; for setting the umask
>> # for ssh logins, install and configure the libpam-umask package.
>> #umask 022
>>
>> # if running bash
>> if [ -n "$BASH_VERSION" ]; then
>> # include .bashrc if it exists
>> if [ -f "$HOME/.bashrc" ]; then
>> . "$HOME/.bashrc"
>> fi
>> fi
>>
>> # set PATH so it includes user's private bin if it exists
>> if [ -d "$HOME/bin" ] ; then
>> PATH="$HOME/bin:$PATH"
>> fi
>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$
>> "
>>
>> So, I asume that this is the applicable file, in the absence of the
>> two named .bash* files.
>>
>> So, after editing that file, I now have
>>
>> "
>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$ cat .profile
>> # ~/.profile: executed by the command interpreter for login shells.
>> # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
>> # exists.
>> # see /usr/share/doc/bash/examples/startup-files for examples.
>> # the files are located in the bash-doc package.
>>
>> # the default umask is set in /etc/profile; for setting the umask
>> # for ssh logins, install and configure the libpam-umask package.
>> #umask 022
>>
>> # if running bash
>> if [ -n "$BASH_VERSION" ]; then
>> # include .bashrc if it exists
>> if [ -f "$HOME/.bashrc" ]; then
>> . "$HOME/.bashrc"
>> fi
>> fi
>>
>> # set PATH so it includes user's private bin if it exists
>> if [ -d "$HOME/bin" ] ; then
>> PATH="$HOME/bin:$PATH"
>> fi
>>
>> # attempt to invoke .xmodmap upon login
>> xmodmap ~/.xmodmap-`uname-n`
>>
>> bret@bret-Aspire-V3-772-UbuntuMATE-1504:~$
>> "
>>
>> Which I will test, the next time that I reboot (which probably will
>> not be for a few hours).
>>
>
> Unfortunately, this path of action, has turned out to be quite harmful.
>
> At first, it took away my <End> key functionality, and now I have lost
> the functionality of the cursor control keys, and so have to disable
> the numberic keypad, in order to access cursor control positioning.
>
> I have tried to restore the default settings, to no avail.
>
And the <Page Up> and <Page Down> keys, and the <Home> key, have also
stopped working. It is a bit like Langoliers or Pacman, eating the
keyboard functionality.
--
Bret Busby
Armadale
West Australia
..............
"So once you do know what the question actually is,
you'll know what the answer means."
- Deep Thought,
Chapter 28 of Book 1 of
"The Hitchhiker's Guide to the Galaxy:
A Trilogy In Four Parts",
written by Douglas Adams,
published by Pan Books, 1992
....................................................
Reply to: