LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2004, 12:14 PM   #1
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Rep: Reputation: 0
Question Can't switch to virtual console (from gnome)


hello everybody.

I have the following problem: I can't switch to a virtual console when loged into gnome (actually, i havn't tried from KDE).
Ctrl-Alt-F1, etc simply does nothing.

Is it possible this is turned off somewhere? Or is something seriously b0rken? How can I find out? Is there an alternative way to switch?

please help

Oh, i nearly forgot:
I'm running Gnome 2.2.0 on a RedHat 9 System. The WM is metacity (gnome default). Keyboard-Layout is German-NoDeadKeys.

thanx in advance...
 
Old 01-09-2004, 12:49 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
well did you try others such as ctrl-alt-f2 through to f6?
or is it just on f1?
 
Old 01-09-2004, 12:56 PM   #3
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Are you are holding control and alt down firmly when you hit the F1 key?
 
Old 01-09-2004, 01:16 PM   #4
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
yes, i tried...

yes i did try all keys (CTRL-ALT-F1 through F6), and yes i held down the keys FIRMLY and long. I even tried the other ctrl/alt keys (right side). Nothing.

Also, i have the same problem on my laptop (same distro). But there it worked once or twice... The thing is i usually only try that only when X or Gnome has barfed -- so maybe it worked sometimes because whatever causes it not to work had just crashed ?...

My suspicion is that something captures those key-events and does not forward them correctly (or not at all). What would be the possibilities here?

Oh, BTW: Ctrl- and Alt-Keys seem to work as expected for other programs, so a messed-up keyboard-layout should not be the cause, i think.

do you have any suggestion where i could start to look?
 
Old 01-09-2004, 01:44 PM   #5
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
My suspicion is that something captures those key-events and does not forward them correctly (or not at all). What would be the possibilities here?
If you were using fvwm2, which you are not, then numlock might cause the problem you describe. Perhaps try numlocking/unnumlocking??
 
Old 01-09-2004, 02:42 PM   #6
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy nope, NUMLOCk is not it...

i tried pressing NUMLOCK, then CTRL-ALT-F4, then NUMLOCK again, the CTRL-ALT-F4 again... nothin. It even seems that NUMLOCK is disabled completele: The LED stays off an when i type, i allways get numbers. That's a little strage, but fine with me... who needs the Naviagion-Function of the numpad anyway?

(actually, i've long been searching for a Keyboard without a numpad, but with the Kursor-Keys etc in the right place. WOuld give me more root for the mouse...)

thanks anyway...

hmmm... this seems thougher than i thought. Where else could i ask my question? oh, and btw: i heard rumores about the virtual-console-switching being turned off in some distros becausee "it confuses the user". I wasn't able to confirm that, though... any idea about redhat?

chears...
 
Old 01-10-2004, 06:13 AM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Another possibility is of course that the runlevel you are in does not have tty1 etc. consoles. If this is possibility could look in ?inittab - the basic init file - to find a suitable run-level to switch to. If none exists then edit inittab.

If numlock not working could that mean the keyboard is incorrectly set up - so when press 'ctrl-alt-Fn' the computer gets 'not all swans are white'?
 
Old 01-10-2004, 07:47 AM   #8
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Red face OOPS...

My Repost of this just got Closed by a mod for being just that -- a repost. Sorry, i didn't mean to spam you, i just thought the topic meight be RedHat-specific so i posted in the RedHat forum. Next time i'll just rephrase and not back-link

chears and all

Last edited by NumbThumb; 01-10-2004 at 08:06 AM.
 
Old 01-10-2004, 08:04 AM   #9
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
/etc/inittab

in reply to howzit:

Thanks for another place to look... but /etc/inittab does not seem to be the problem either. Here is an excerpt:
Quote:
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
Looks fine, no? Also, calling "/sbin/mingetty tty2" manually has no effect.

I just noticed: hitting CTRL-ALT-F1 (F2, etc) in a gnome-terminal results in the character-sequence ";7~"... that should not happen, right? That keystroke should never reach the console? Oh, when i try this in Konsole, I get [23~ for CTRL-ALT-F1 and [24~ for C-A-F2, but nothing for the other Fs. strange....

thanks again for the starting point, i'll now google for "inittab"...
 
Old 01-10-2004, 09:30 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Open an xterm, Konsole or whatever it's called and execute "xev|grep x0.*key". Press these keys after the other: CTRL, ALT, F1, then close the white Xev screen. Now run "xmodmap -pke|egrep -ie "alt|contr"". Please post output from both commands, they should show your keytable mapping for these particular keys.
 
Old 01-10-2004, 09:46 AM   #11
Shachaf
Member
 
Registered: Sep 2003
Location: Port Townsend, WA
Posts: 30

Rep: Reputation: 15
Try typing switchto 1 as root.
 
Old 01-10-2004, 10:00 AM   #12
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Post xev / xmodmap

ok, here goes:

xev|grep x0.*key
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
state 0x0, keycode 68 (keysym 0xffbf, F2), same_screen YES,
state 0x0, keycode 68 (keysym 0xffbf, F2), same_screen YES,
state 0x0, keycode 69 (keysym 0xffc0, F3), same_screen YES,
state 0x0, keycode 69 (keysym 0xffc0, F3), same_screen YES,
state 0x0, keycode 70 (keysym 0xffc1, F4), same_screen YES,
state 0x0, keycode 70 (keysym 0xffc1, F4), same_screen YES,
state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
state 0x0, keycode 72 (keysym 0xffc3, F6), same_screen YES,
state 0x0, keycode 72 (keysym 0xffc3, F6), same_screen YES,
X connection to :0.0 broken (explicit kill or server shutdown).


(why are all the F-Keys doublicated?)

xmodmap -pke|egrep -ie "alt|contr|= F[1-6] "
keycode 37 = Control_L
keycode 64 = Alt_L Meta_L
keycode 67 = F1 F11
keycode 68 = F2 F12
keycode 69 = F3 F13
keycode 70 = F4 F14
keycode 71 = F5 F15
keycode 72 = F6 F16
keycode 109 = Control_R


...seems fine to me...

BTW: Ctrl-Alt-Backspace does not work either, Ctrl-Alt-Del however does work as specified in inittab (shows a gui-dialog prompting for logout/shoutdown).

Oh, and yes: mingetty is running on tty1-tty6 and "cat /dev/vcs1" etc works fine.

My only idea is that X does not handle Ctrl-Alt-F? as expected. Where would i configure X to handle those keys?

thanks for your help
 
Old 01-10-2004, 10:08 AM   #13
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
switchto

Ok, i had to install the "open" package first, but "switchto 1" works as expected. Going back to X with ALT-F7 also works.

The bad thing is that in case i really need the VC (that is, X has barfed), i won't be able to type that command... considering that CTRL-ALT-BACKSPACE is also broken, i'll be rebooting just to get rid of a broken X

thanks anyway, i always wondered how to switch to a VC from a script (in case i would ever need that... never mind).
 
Old 01-10-2004, 08:35 PM   #14
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Lightbulb FOUND THE PROBLEM !!!

All the hassle was caused by the KGB: This #!&* piece of crap of an applet monitors the keyboard to change the layout on special keystrokes. An this somehow breaks the CTRL-ALT-F? thingy.

Wow. Would have thought someone had noticed by now... I'm going to file a bugreport with the KGB folx.

OK, i can relax now... thank you all for your time....
 
Old 01-11-2004, 11:51 AM   #15
NumbThumb
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Thumbs up more details

i just found the problem with the Gnome KeyBoard-Applet. Thanks to Shooby (author of the Applet) for a quick response (although it did not lead me to the solution). I was a little unfriendly about his Applet, as i though it was stealing the keystrokes itself. In fact it seems that the applet just cause a faulty layout to be loaded -- not the fault of the applet (or its author). I still don't understand the details, but here is what i found out:

The problem does not occur if i use setxkbmap for switching kb-layouts -- that is, the problem is somehow related to gkb_xmmap. I probably have a hose layout-file somewhere...

you can see the difference by typing "xmodmap":

BAD version:
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40)
mod2 Mode_switch (0x71), Mode_switch (0x74)
mod3
mod4 Select (0x73), Mode_switch (0x74)
mod5 Mode_switch (0x71)


GOOD version:
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x73), Super_R (0x74)
mod5 ISO_Level3_Shift (0x71)



i hope this will help someone having a similar problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to switch to virtual console when using xfce? zero79 Debian 3 06-27-2005 06:50 PM
Switch Virtual Desktops RySk8er30 Mandriva 1 06-06-2005 02:10 AM
How to switch to Gnome under console? explorer1979 Debian 1 08-27-2004 07:09 PM
Can't switch to virtual console (from gnome) NumbThumb Red Hat 3 01-10-2004 07:47 AM
strange screen when switch back from KDE to virtual console vu63 Linux - General 2 10-07-2003 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration