The officially official Devuan Forum!

You are not logged in.

#1 2018-10-18 11:29:17

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

[Solved] Keyboard configuration issue

Hello:

My rig runs Devuan ASCII with the default Xfce desktop:

groucho@devuan:~$ uname -a
Linux devuan 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
groucho@devuan:~$ 

It's fully up to date:

[root@devuan groucho]# apt-get update
Hit:1 http://deb.devuan.org/merged ascii InRelease
Hit:2 http://deb.devuan.org/merged ascii-updates InRelease
Hit:3 http://deb.devuan.org/merged ascii-security InRelease
Reading package lists... Done
[root@devuan groucho]# 

I have my keyboard set up using dpkg-reconfigure keyboard-configuration.

The settings are these:

1. Generic 105-key (Intl) PC
2. Spanish (include dead tilde)
3. Key to function as AltGr: Right Alt (AltGr) ie: the default for the kb layout 
4. Compose key Right Alt (AltGr)
5. Control+Alt+backspace to terminate the X server

These settings are reflected in Applications -> Settings -> Keyboard -> Layout, where the Use system defaults box is unchecked.

Everything works just as it says but ...

1. Control+Alt+backspace will not terminate the X server.
2. Characters belonging to this Spanish keyboard layout ie: ç/Ç and ñ/Ñ do not work in terminal.

I'd like to get 1. working as I use it relatively often.
I can live without 2. but I think have seen it working.

Can this be fixed?

Thanks in advance.

Cheers,

A.

Last edited by Altoid (2018-10-21 22:00:57)

Offline

#2 2018-10-18 14:38:33

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [Solved] Keyboard configuration issue

1, ctrl-alt-backspace hasn't worked in a long time. (maybe not since squeeze)
    Use alt-SysRq-k instead (SysRq is probably the same key as PrntScr.)

2. I don't know. I have been able to type those characters in a terminal when I was testing, but I can't tell you how I got there, and I don't remember the key combinations I used. Try the xfce4 keyboard plugin to switch layouts. (xfce4-xkb-plugin)

Offline

#3 2018-10-18 18:48:07

GNUser
Member
Registered: 2017-03-16
Posts: 561  

Re: [Solved] Keyboard configuration issue

1. To kill X and drop to a console, I map sudo chvt 1; sudo service lightdm stop to a keyboard shortcut. To restart X from the console, I type sudo service lightdm start. If you don't use lightdm as display manager, you should adjust these commands appropriately.

2. What happens if you open up a terminal and type: Control+Shift+u then 00e7 (00 is two zeros) then Enter? If you get a cedilla, then feel free to use my homegrown solution for input of Unicode characters: klavaro-python. You can customize /etc/klavaro.conf to your heart's content. The conf file's format is self-explanatory but man klavaro spells it out.

klavaro-python is free software (GPLv3). If you like, you can compile the (sole) binary inside the package by following the directions at the top of klavaro.py

http://files.dantas.airpost.net/public/ … _amd64.deb

Last edited by GNUser (2018-10-18 18:54:14)

Offline

#4 2018-10-19 15:53:29

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

fsmithred wrote:

1, ctrl-alt-backspace hasn't worked in a long time. (maybe not since squeeze)

Hmm ...
I think not.

I'm on ASCII and if I set up an xorg.conf (default setting enables ctrl-alt-backspace) and do Applications -> Settings -> Keyboard -> Layout, where the Use system defaults box is checked, it will work but I've been at odds with setting layouts and kbd for the longest while so I go the Xfce route.

ie: in Section "ServerFlags"
Option "DontZap" set to "False" (default "False")  - "True" setting disables <Ctrl><Alt><BS> (server abort)
Option "AutoAddDevices" set to "True" (default "True")  - "True" setting is for using system kb, kb layout and mouse settings

So, my guess is that if it does not work in ASCII it's not because of the kernel version but because of the Xfce plugin or something else related to the Kb settings in Xfce.

fsmithred wrote:

Use alt-SysRq-k instead

I'll try that.
I never used ctrl-alt-backspace much but when I learned how convenient it was, I found it very useful.

I think it should be fixed/reinstated - as it does work.

fsmithred wrote:

SysRq is probably the same key as PrntScr.

Yes it is.

fsmithred wrote:

Try the xfce4 keyboard plugin to switch layouts. (xfce4-xkb-plugin)

Thta's what I am using.
Probably the source of the ctrl-alt-backspace problem.

Thanks for your input.

Cheers,

A.

Offline

#5 2018-10-20 11:59:02

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

Altoid wrote:

I'm on ASCII and if I set up an xorg.conf (default setting enables ctrl-alt-backspace) ...

I also have a TinyCore install on an SD card plugged into a USB2.0 port inside my box.
It's a go-to personal (but secure) IME (!) which I've set up in case everything (SAS card, HDDs, DVD-R, etc.) decides to go down at the same time.

It's also faster than loading a live CD.
Now, if the internal USB port also fails, I would probably need a new box.

tc@box:~$ uname -a
Linux box 4.8.17-tinycore #2017 SMP Sun Mar 5 15:49:22 UTC 2017 i686 GNU/Linux
tc@box:~$ 

I can confirm that with Xorg-7.7 installed (default settings) ctrl-alt-backspace also works.

Cheers,

A.

Last edited by Altoid (2018-10-20 12:03:09)

Offline

#6 2018-10-20 14:07:23

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [Solved] Keyboard configuration issue

Altoid wrote:

I can confirm that with Xorg-7.7 installed (default settings) ctrl-alt-backspace also works.

Cheers,

A.

Huh. It's not working here, and I tried it on two different ascii installations, same version of xorg, with and without keyboard layouts plugin.

Here's one of the earliest mentions of the change I can find. I tried getting it working a couple times and failed, so I haven't tried it in years (until now.)
http://forums.debian.net/viewtopic.php? … ce#p429554

Offline

#7 2018-10-21 00:40:44

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

fsmithred wrote:

... not working here, and I tried it on two different ascii installations, same version of xorg ...

Here's my xorg.conf settings for input devices:

Section "ServerLayout"
Identifier     "Layout0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    # generated from default configuration
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5" 
EndSection

Section "ServerFlags"
    Option         "DontZap" "False"             # default False - "True" disables <Ctrl><Alt><BS> (server abort)
    Option         "AutoAddDevices" "False"      # default True - to use system kb, kb layout and mouse settings
    Option         "AutoEnableDevices" "True"    # default True - 
EndSection

If I check the box that says Use system defaults in Applications -> Settings -> Keyboard -> Layout + logou/login, I end up getting what seems to be a US layout on both X and the terminal and Control+Alt+Backspace will not terminate the X server.

But if I change the "AutoAddDevices" to "True" (so that it does what it is supposed to do), my mouse freezes BUT Control+Alt+Backspace works as advertised.   

Shutting down the server in these conditions does not do anything for me, I have to resort to Ctrl+Alt+F1 th sudo jed the xorg.conf file so I can have a working mouse again.

fsmithred wrote:

... earliest mentions of the change I can find. I tried getting it working a couple times and failed, so I haven't tried it in years (until now.)
http://forums.debian.net/viewtopic.php? … ce#p429554

I'll have a look.

Thanks for your input.

Cheers,

A.

Offline

#8 2018-10-21 10:26:35

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

fsmithred wrote:

... mentions of the change I can find.

I've found this recent (june 2018) and quite comprehensive article on the Control+Alt+Backspace not working issue:

https://utcc.utoronto.ca/~cks/space/blo … eTerminate

Just hovered over it so still have to read through and digest the whole of it, but it apparently explains everything.
Including how to get it working again. (?)

Would appreciate any comments.

Cheers,

A.

Offline

#9 2018-10-21 12:06:59

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [Solved] Keyboard configuration issue

Good find! I'm copying the answer here so we don't lose it. We can use either of the first two methods. Third one is here just to be complete. (I'm taking his word that this works. I haven't tried it yet.)

All of this leads to the three ways to enable Ctrl + Alt + Backspace termination of the X server, at least on a systemd based system. First, as part of your X session startup you can run setxkbmap to specifically enable C-A-B, among any other XKB changes you're already making:

    setxkbmap -option 'compose:rwin' -option 'ctrl:nocaps' -option 'terminate:ctrl_alt_bksp'

Second, you can manually create or edit a configuration file snippet in /etc/X11/xorg.conf.d or your equivalent to specify this. If you already have a 00-keyboard.conf or the equivalent, the option you want is:

    Option "XkbOptions" "terminate:ctrl_alt_bksp"

(A trailing comma is okay, apparently.)

Third, if you have Fedora or perhaps any systemd-based distribution, you can configure this the official way by running localectl with a command like this:

    localectl --no-convert set-x11-keymap us pc105+inet "" terminate:ctrl_alt_bksp

There is a bear trap lurking here. That innocent looking "" is very important, as covered in the Arch wiki page. As they write (with my emphasis):

Offline

#10 2018-10-21 14:08:09

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

fsmithred wrote:

Good find!

Indeed it is.
Thanks.

Couldn't be that it did/did not work.
Something was surely amiss somewhere.

I'll drop the OP a line thanking hin for taking the time to find out what was up.

fsmithred wrote:

... copying the answer here ...

Don't we have a sticky section where these things can go and live forever?

fsmithred wrote:

... use either of the first two methods.

One thing I found was that there was some sort of issue with the Wise PS2 mouse that I had plugged into my Wise USB keyboard.

Once I found the crap Verbatim USB mouse, the problem with the mouse freezing went away.
I'll get a decent mouse tomorrow ...

But I really have to brush up my cuasi non-existent keyboard skills, it's unacceptable that a bad mouse can ground you.

In any case, it seems that part of the problem was related to /dev/mouse0 not being there and the existence of /dev/psaux but I decided to give up on that.
It's probably an evdev configuration issue.

So, this is what I did:

1.
Edited xorg.conf and deleted all InputDevice entires in Section "ServerLayout" and the two "InputDevice" Sections.
X server probes and picks up what is there.

2.
Made sure that Section Section "ServerFlags" has these options to the default settings.

Section "ServerFlags"
    Option         "DontZap" "False"                # default False - "True" disables <Ctrl><Alt><BS> (server abort)
    Option         "AutoAddDevices" "True"      # default True - to use system kb, kb layout and mouse settings
    Option         "AutoEnableDevices" "True"  # default True - if "AutoAddDevices" is set to default 
EndSection

Of course, being default settings you can do away with the whole "ServerFlags" section but I have decided to keep them so I remember all this.

groucho@devuan:~$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     es
variant:    deadtilde
options:    lv3:ralt_switch,terminate:ctrl_alt_bksp
groucho@devuan:~$ 

Now Control+Alt+Backspace works as well as Control+Alt+Fx.

Really don't need the special characters or accented characters in Terminal (ç Ç ñ Ñ - ' ` ^ " ) but there's an issue with Leafpad and codeset=ANSI_X3.4-1968 which I will adress in another post.

Maybe we're on a roll and we'll solve it?   =-)

Cheers,

A.

Offline

#11 2018-10-21 16:28:28

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: [Solved] Keyboard configuration issue

Altoid wrote:

Don't we have a sticky section where these things can go and live forever?

Reality check . . . nothing lasts forever.  That being said, to date no posts have been pruned from this forum and would only be done manually with great care on my watch (which of course is also not forever for obvious reasons).

Online

#12 2018-10-21 19:43:32

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: [Solved] Keyboard configuration issue

Hello:

golinux wrote:

Reality check . . . nothing lasts forever.

Indeed ...

golinux wrote:

... to date no posts have been pruned from this forum ...

I no doubt did not express myself correctly.
I was not referring to the possibility of post being pruned but to a section/page where certain (usually config related) posts would be grouped.
Something like: Read posts in this this section first.

Just an idea.

Best,

A.

Offline

Board footer