[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Since chvt works, the problem must be the keymap [(mostly SOLVED)]

So I did some follow-through and read through a bit of the
sudoers manual, and added the following to the line for my
username to the system /etc/sudoers file (using visudo, of


NOPASSWD: /usr/bin/chvt

...which allows me to successfully invoke chvt without
entering a password. I then added the following stanzas to
my ~/.xmodmap file:


"sudo chvt 1"
  control + Mod1 + F1
"sudo chvt 2"
  control + Mod1 + F2
"sudo chvt 3"
  control + Mod1 + F3
"sudo chvt 4"
  control + Mod1 + F4
"sudo chvt 5"
  control + Mod1 + F5
"sudo chvt 6"
  control + Mod1 + F6

...which allows me to switch to a VT using control-alt-f#!
Sweet! Mission accomplished! Thanks for the help of everyone

However, there is one small hitch:  when invoked from a
commandline, chvt takes me to a VT. There, I can log in,
move to another VT with Alt-f#, or go back to X with alt-f7.
However, when invoked via a keybinding, chvt takes me to the
correct VT, from which I can either log in or go back to X
with alt-f7. If, however, I try to change to another VT from
there, it flashes over to it for a second and then switches
back. This also happens if I invoke chvt from the VT. Unless
somebody has an immediately obvious fix for this, however,
I'm willing to live with this, since the fix above is
admittedly treating the symptoms but not so much the

Anyway, thanks again to everyone.


Reply to: