Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-31-2006, 10:52 AM   #1
LQ Newbie
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
keymapping - couldnt get a file descriptor ?!


when I type showkey or kbd_mode into terminal, I get this strange error I don't understand:
Couldnt get a file descriptor referring to the console
The same message comes with loadkeys:
Couldnt get a file descriptor referring to the console
KDGKBMODE: Bad file descriptor
loadkeys: error reading keyboard mode
what is this supposed to mean?
Old 12-31-2006, 01:10 PM   #2
Registered: Oct 2006
Distribution: Slackware-11.0
Posts: 35

Rep: Reputation: 15
From what I've googled, it may be one of the following:

- You need to run the command in the CLI. That is, not in a GUI console window.
- Check that you have the /dev/console and /dev/tty files, and that they are owned by root:tty.
- It's a bug, upgrade to the latest version of console-tools. If you have the latest binary release, compile from source.

Also, you could have figured this out yourself by just using google. I'm not trying to be condescending, I'm just trying to point out that while I probably know less than yourself about these tools I had no problem finding info on it. Do google any error messages you get.
Old 03-23-2007, 02:08 AM   #3
LQ Newbie
Registered: Feb 2007
Location: Christchurch, NZ
Distribution: Kubuntu 6.10
Posts: 4

Rep: Reputation: 0
if you're running k/edu/ubuntu (or anything based on ubuntu) try "sudo showkey"
Old 01-22-2009, 09:05 AM   #4
Registered: Jan 2009
Posts: 114

Rep: Reputation: 17
Question Couldnt get a file descriptor referring to the console

Couldnt get a file descriptor referring to the console
I have been getting this message at the boot up time and this error continues scrolling forever until/unless I control C out of it!?
Then the OS continues to boot up normally and gives no problems!(Feisty 7.04 with all the updates).

OK This is a XEN (Virtual) machine but the last time I set it I used the same OS file (zipped into one file) and never had any problems.
This time around I am getting this message and also as I looked at the above post and when I tried the other commands (showkey etc.) they also returned this message "Couldnt get a file descriptor referring to the console".
I do have tty, tty0 etc in /dev and there is also a console there so I dont know what this error is about?
(I have a feeling there are some files in /lib or /lib/modules/ which are missing or messed up)? Not sure though.

Thanks for any help!

Last edited by Matey; 01-22-2009 at 09:09 AM.
Old 02-09-2009, 10:02 AM   #5
Registered: Jan 2009
Posts: 114

Rep: Reputation: 17
I did a couple of updates, installed python and the error message went away?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Get the absolute path of file using file descriptor. appas Programming 7 01-19-2012 12:47 PM
dropline gnome-terminal error: couldnt get a file descriptor referring to the console Randux Slackware 5 12-05-2006 02:55 PM
File Descriptor 63 kshkid Programming 3 03-02-2006 12:41 PM
apt-file returns nothing; 'bad file descriptor' overbored Debian 3 10-03-2004 10:13 PM
File descriptor lido Linux - Newbie 5 07-17-2003 12:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:22 PM.

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