You are not logged in.

#1 2014-04-27 22:42:20

asg1448
Member
Registered: 2014-04-12
Posts: 74

Alt+Fn switches to console instead of being handled by gnome

I'm not sure when it started to happen, but after some upgrade I started noticing that gnome no longer disables Alt+Fn combination as console switcher. It still uses it for its own purposes, but it also switches into a corresponding console

For example:
~~~~~~~~~~

- I press Alt+F2 in order to get an "Enter a command" dialog.
- It switches me from gnome session into console at terminal 2
- I press Alt+F1 to switch back
- I see gnome with "Enter a command" dialog open. Basically, gnome handles Alt+F2, but OS also handles it

How do I go about disabling Alt+Fn switch and only allow switching using Ctrl+Alt+Fn?

Offline

#2 2014-04-28 08:43:25

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: Alt+Fn switches to console instead of being handled by gnome

Key presses first pass through the server and then into the wm (Gnome Metacity).

You could place a file in /etc/X11/xorg.conf.d/ with the following:

Section "ServerFlags"
    Option "DontVTSwitch" "true"
EndSection

However, you should also check for the Xorg zap keycombo (CTRL+ALT+BACKSPACE).


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-04-28 13:40:39

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Alt+Fn switches to console instead of being handled by gnome

Thanks for suggestion, however it doesn't seem to have worked. I added a file, then restarted gdm (`systemctl restart gdm`), and same issue keeps happening

Offline

#4 2014-04-28 13:48:04

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: Alt+Fn switches to console instead of being handled by gnome

I'm not sure if GDM restarts Xorg. I suggest a reboot.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#5 2014-04-28 14:02:55

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Alt+Fn switches to console instead of being handled by gnome

nope... reboot did not help.

Offline

#6 2014-04-29 01:28:22

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Alt+Fn switches to console instead of being handled by gnome

Here's another what I noticed: when I am in gdm logon screen, Alt+Fn switch does not work, and neither does Alt+Ctrl+Fn. Also, if I start a new session on a new display, switch again does not work. The moment I login into gnome of xfce4, both Alt+Fn and Ctrl+Alt+Fn will switch windows

Offline

#7 2014-04-29 01:51:53

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Alt+Fn switches to console instead of being handled by gnome

OMFG!!! i know partially wth is happening. Apparently what was screwing up the keyboard in gnome was the 'kbd_mode -u' command I added to startup so that caps lock LED reacts to the caps lock state...

Offline

#8 2014-04-29 03:28:48

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Alt+Fn switches to console instead of being handled by gnome

I'm still stuck here......

When I initially load gdm, and if I go to xterm, I get following:

#kbd_mode
The keyboard is in some unknown mode

Caps lock LED doesn't work. Alt+Fn doesn't switch consoles, but neither does Ctrl+Alt+Fn

when I run:

kbd_mode -u

I get BOTH Alt+Fn and Ctrl+Alt+Fn to switch sessions. All other switches with kbd_mode produce either one or another... I can never get to the point where Caps Lock led works normally, Alt_Fn does not switch sessions, and Ctrl+Alt+Fn does.

Offline

#9 2014-04-29 05:21:12

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: Alt+Fn switches to console instead of being handled by gnome

kbd_mode is a tty utility. The Xorg server grabs the tty and hopefully nothing 'falls through'. Apparently, using kbd_mode (as root right?) messes this up.

Maybe try a Xorg utility? https://wiki.archlinux.org/index.php/Ke … ard_layout


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

Board footer

Powered by FluxBB