2

Can I change the schortcut Ctrl+Alt+F7 to Ctrl+Alt+Shift+F7 in Ubuntu 18.04 ?

If yes, how ?

2

I found it! I found it!
(I copied my answer to this chat too)

There is a simple command line to disable the shortcuts Ctrl+Alt+F [1-7].
I don't know which versions of ubuntu support this command line, but on Ubuntu 18.10, it seems to work well.

setxkbmap -option srvrkeys:none

But the command line only seems to work when it is executed after the login: After each lock/logout, the shorcuts Ctrl+Alt+F [1-7]. Are enabled again.
I tried to put this line in "Startup Application" and also in ".profile". Either way, it doesn't work.

So I created a new shortcut that executes this command by pressing (for example) Super+F7. And it works fine!
I just must do Super+F7 after each login, and if after I do Ctrl+Alt+F7 there isn't any black screens!


Does someone know a better way to run a command line after the login?
Am I obliged to do Super+F7 after each login?

1

Ok, so I just spent 1 hour of my life on this, so here you go...

Does someone know a better way to run a command line after the login?

So, generally, to run something when new xsession is starting you simply add it to ~/.xsession or ~/.xsessionrc or /etc/X11/Xsession.d/... . However, this approach won't work on 18.04.

It seems that if you go the usual 'Xsession way', your 'setxkbmap' will execute fine, BUT these settings will be later overwritten by something else. After a bunch of digging I accidentally came across this 'keyboard-configuration' thing that has some options in /etc/default/keyboard. It is also mentioned here. So, long story short, this works:

$ cat /etc/default/keyboard 
...
XKBOPTIONS="srvrkeys:none"
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy