[Bug 1763100] Re: FONT="x/y/z" is not applied due to setupcon script bug

wolnosc 1763100 at bugs.launchpad.net
Thu May 2 21:27:36 UTC 2019


I confirm the bug also on Ubuntu 19.04. 
Patch on post #3 resolve the problem.

Nowadays on laptop we have more and more 4K screen, the default font in
TTY framebuffer is very too small. For people who have Xorg no starting,
TTY is unique path to fix configuration.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to console-setup in Ubuntu.
https://bugs.launchpad.net/bugs/1763100

Title:
  FONT="x/y/z" is not applied due to setupcon script bug

Status in console-setup package in Ubuntu:
  Confirmed

Bug description:
  apt-cache policy console-setup
  console-setup:
    Installed: 1.178ubuntu1
    Candidate: 1.178ubuntu1
    Version table:
   *** 1.178ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
          500 http://gb.archive.ubuntu.com/ubuntu bionic/main i386 Packages
          100 /var/lib/dpkg/status

  On 18.04 I wanted to set the TTY font to use a Powerline font. Despite
  being able to set the font manually it wasn't being set at boot-time.

  /etc/default/console-setup contains:

  FONT="/usr/local/share/fonts/ter-powerline-v22n.psf.gz"

  "setupcon -v -f" reported an error:

  putfont: KDFONTOP: Invalid argument

  due to passing the font filename twice:

  executing setfont -C /dev/tty1 /usr/local/share/fonts/ter-powerline-
  v22n.psf.gz /usr/local/share/fonts/ter-powerline-v22n.psf.gz.

  The problem is in /bin/setupcon where the collecting variable
  FONTFILES has the font added twice, once at the top of the for loop

  FONTFILES="$FONTFILES `findfile $fontdir $f`"

  and again at the bottom

  FONTFILES="$FONTFILES $RES"

  Removing the first assignment fixes it.

  FONTFILES=''
  echo "DEBUG: FONT=$FONT"
  if [ "$FONT" ]; then
      for f in $FONT; do
        echo "DEBUG: for loop"
          FONTFILES="$FONTFILES `findfile $fontdir $f`"
          RES=`findfile $fontdir $f`
          if [ -z "$RES" ]; then
              fdec="${f%.gz}"
              RES=`findfile $fontdir $fdec`
          fi
          FONTFILES="$FONTFILES $RES"
      done
  fi
  FONTFILES=`echo $FONTFILES` # remove extra spaces

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1763100/+subscriptions



More information about the foundations-bugs mailing list