Debian Annoyances: Difference between revisions

From MK Wiki EN
Jump to navigation Jump to search
(+Avoid "perl: warning: Setting locale failed.")
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Follow this tutorial to get rid off some annoyances in Debian 7 aka Wheezy.
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 ==
== pcspkr error message ==
Line 20: Line 20:
== Clearing screen on tty1 ==
== Clearing screen on tty1 ==


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 (yes, they still use it!) find the line "1:2345:respawn:/sbin/getty 38400 tty1" and put a "--noclear" before "38400". Credits: man getty
=== 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 ==
== Setting video mode ==
Line 51: Line 57:


== Avoid "perl: warning: Setting locale failed." ==
== Avoid "perl: warning: Setting locale failed." ==
This warning is displayed if you start "perl -e exit".


  locale-gen
  locale-gen
  dpkg-reconfigure locales
  dpkg-reconfigure locales
In the dpkg-reconfigure program, the language printed by <code>echo $LANG</code> must be selected.
== 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


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

Latest revision as of 21:01, 1 April 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

In the dpkg-reconfigure program, the language printed by echo $LANG must be selected.

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