You are not logged in.

#1 2014-11-21 20:47:33

ryachi
Member
Registered: 2014-11-21
Posts: 2

[SOLVED]Setfont, showconsolefont and such don't work

Every time I open urxvt as a normal user, I get:

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

This doesn't happen when I open it with root privileges.
Also, every time I enter a "font-related" command, such as showconsolefont, without root privileges, I get a single:

Couldn't get a file descriptor referring to the console

The same commands with sudo don't produce the same problem, but, for example:

setfont fontnamehere

doesn't seem to change my terminal font at all. The:

sudo showconsolefont

output looks like this:

bug: getfont called with count<256
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    

    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    

I searched the Internet for a solution, but to no avail. I'm not quite sure what's the problem here. I added i915 module and consolefont hook to /etc/mkinitcpio.conf(and regenerated it). My /etc/vconsole.conf looks as follows:

KEYMAP=pl
FONT=lat2-16

I'm new to GNU/Linux, this problem hasn't really caused me a lot of trouble, but it irritates me that I get the "Couldn't get a file descriptor referring to the console" every single time I open terminal. I really have no clue what I did wrong.
I'm using Start X at login and i3 as a windows manager; I'm not using any desktop environment.
My ~/.xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
feh --bg-scale ~/pics/wallpapers/nge/1412061334049.jpg
fi
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec i3

My ~/.bash_profile:

#
# ~/.bash_profile
#
setfont ter-214b
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

My ~/.bashrc:

#
# ~/.bashrc
#
setfont ter-214b
export LANG=en_US.UTF-8
export LC_MESSAGES="C"
# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

I'm sorry for the lengthy post and for adding code which may not be needed. Any help would be greatly appreciated!

Last edited by ryachi (2014-11-21 21:11:23)

Offline

#2 2014-11-21 20:59:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Setfont, showconsolefont and such don't work

None of those commands (related to console fonts) will work in X...

Your .xinitrc should not have the feh command inside the if block.

Remove the setfont command from your .bashrc and you'l stop getting those error messages every time you open a terminal.

There is a wiki article on setting fonts in the console (TTYs), please follow that.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-11-21 21:10:53

ryachi
Member
Registered: 2014-11-21
Posts: 2

Re: [SOLVED]Setfont, showconsolefont and such don't work

Solved, also had to delete the setfont command from .bash_profile. Thanks for the help!

Offline

#4 2019-02-18 21:51:11

mismerized
Member
Registered: 2019-02-18
Posts: 2

Re: [SOLVED]Setfont, showconsolefont and such don't work

Hello, I still do encounter the same problem. I also use arch, i3 and got a laptop with a radeon graphics card. However i do not have a .bash_profile or a .bashrc file. I also dont have a .xinitrc file. So there is nothing i could do to fix the problem with my fonts. Any ideas? should i open a new thread for this? thanks

Offline

#5 2019-02-18 21:58:33

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,092
Website

Re: [SOLVED]Setfont, showconsolefont and such don't work

Welcome to the BBS.

Please read the Code of Conduct you agreed to when you registered. Pay particular attention to the section that mentions necrobumping.

Closing.

All the best,

-HG

Offline

Board footer

Powered by FluxBB