Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in linux console : Couldn't get a file descriptor referring to the console

When I start Terminal the first 2 messages that i see it is :

Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console

and then prompt from console , and nothing another , also this problem creates when type setfont :

[gyok@localhost ~]$ setfont
Couldn't get a file descriptor referring to the console

if I go to Ctrl+Alt+F2 terminal all works fine and without this messages , same situation in root console, so can you try help me to repair this ? I have Fedora 21 whith Gnome, my laptop model is Y570.

like image 847
gyok Avatar asked Feb 05 '15 20:02

gyok


3 Answers

Fixed similar error in Ubuntu by typing xdg-open followed by the filename.

like image 142
monkrus Avatar answered Dec 19 '22 08:12

monkrus


setfont modifies the font in the VGA console (what you get when you press CTRL-ALT-F1, etc) It won't do anything in Terminal.

Normally only the root user can access the console device that setfont needs to connect to in order to make the font change. This is why you get an error message when you run it from your normal user account. An exception is when a user is logged into the VGA console... then the user has access to the console and setfont succeeds.

The fact that you get the error message whenever you start Terminal, means that you likely have some command in your .bashrc, .bash_profile, .bash_login, .profile or /etc/profile that is run whenever you start a terminal. Could it be that you have setfont in one of these places? otherwise, look for something else that may be accessing the console.

like image 21
wojtow Avatar answered Dec 19 '22 08:12

wojtow


For me, was loadkeys fr in /etc/profile sourced from ~/.bashrc

like image 40
Gilles Quenot Avatar answered Dec 19 '22 09:12

Gilles Quenot