Debian Annoyances: Difference between revisions

From MK Wiki EN
Jump to navigation Jump to search
(Added UTF-8 for console)
Line 72: Line 72:
  PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
  PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
  SHELL=/bin/bash
  SHELL=/bin/bash
== Text-based console cannot show UTF-8 characters ==
dpkg-reconfigure console-setup


[[Category:Linux]]
[[Category:Linux]]

Revision as of 14:35, 2 February 2022

Here are some tips to get rid off some annoyances in Debian 7 aka Wheezy, Debian 8 aka Jessie and Debian 9 aka Stretch. Some of these annoyances also appear on systems that directly derive from Debian or are very similar to Debian, like Raspbian or Ubuntu.

pcspkr error message

Get rid off error message "Driver ‘pcspkr’ is already registered, aborting..." when booting: in /etc/modprobe.d/blacklist.conf create an entry "blacklist snd-pcsp"

Credits

exim4

Don't need a MTA? Deactivate it easily:

cd /etc/rc2.d
mv S21exim4 K21exim4

Credits

The same way it's possible to deactivate all the NFS and portmapper crap.

Clearing screen on tty1

Debian 7

Since some time, Debian automatically clears the screen when the login prompt appears. This is especially annoying on tty1 because it vanishes all messages from the boot process. The solution is quite simple: in /etc/inittab find the line "1:2345:respawn:/sbin/getty 38400 tty1" and put a "--noclear" before "38400". Credits: man getty

Debian 8+ with SystemD

See SystemD

Setting video mode

Due to a bug in update-grub, GRUB_GFXPAYLOAD in /etc/default/grub is ignored. Two changes enable it:

In /etc/grub.d/00_header

if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=800x600x32 ; fi

some lines later

set gfxpayload=${GRUB_GFXPAYLOAD}

Credits

Avoid PAM messages from CRON

In /etc/rsyslog.conf find section "RULES". Just before "auth,authpriv.*" insert

:msg, contains, "pam_unix(cron:session)" ~

In Ubuntu, this information is saved in /etc/rsyslog.d/50-default.conf.

After saving the file, restarting the service is required:

service rsyslog restart

Credits

Avoid "perl: warning: Setting locale failed."

This warning is displayed if you start "perl -e exit".

locale-gen
dpkg-reconfigure locales

Cron is not working correctly

  • Symptoms: Jobs are not executed at all or print strange error messages on execution.
  • Reasons: Cron does not have sufficient information where to find the programs/scripts specified (missing PATH) or the wrong program is used to execute scripts (i.e. sh instead of bash).

Insert these lines at the header of your crontab file (always edit it with "crontab -e", set EDITOR environment variable when needed):

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
SHELL=/bin/bash

Text-based console cannot show UTF-8 characters

dpkg-reconfigure console-setup