The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Raspbian’ Category

Raspberry Pi brexit – changing your locale away from GB when you’ve a different keyboard

Posted by jpluimers on 2017/10/02

A while ago I wrote about -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) on fresh Raspbian on Raspberry

I thought my locale issues were solved and they sort of were. Until I had to logon locally and managed to get one or more of these characters in my password:

  • ~ (tilde)
  • @ (at)
  • # (hash)
  • \ (backslash)
  • | (pipe)
  • " (double-quote)

Then logon would fail locally but work via ssh. Go figure!

Lot’s of people outside the UK using their Raspberry Pi with keyboard and monitor will now say: you’ve the default GB keyboard layout and your keyboard is not GB.

Bingo!

This is how US keys look when using a GB keyboard layout:

Read the rest of this entry »

Posted in *nix, Debian, Development, Hardware Development, Linux, Power User, Raspberry Pi, Raspbian | Leave a Comment »

`-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)` on fresh Raspbian on Raspberry

Posted by jpluimers on 2017/03/24

Every time I logged onto a freshly installed Rasbian system (Debian Jessie), I had this message:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 27 19:52:33 2016 from 192.168.171.24
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Asking for the locale settings would give this:

jeroenp@raspberrypi:~ $ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Searching for raspbian jessie “-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)” I found fix locale issue #15 · scaleway/image-debian@543e9b4 [WayBack] that fixes Locale issue on Debian Jessie · Issue #15 · scaleway/image-debian · GitHub [WayBack]:

When logging into to a freshly booted debian jessie image:

-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Source: Locale issue on Debian Jessie · Issue #15 · scaleway/image-debian

I changed the crux of that solution to this one:

echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen

When running, it showed this:

# echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
Generating locales (this might take a while)...
  en_GB.UTF-8... done
  en_US.UTF-8... done
Generation complete.

And logging this:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 27 20:26:34 2016 from 192.168.171.24

Problem solved: 1 line of code!

–jeroen

Posted in *nix, Arduino, Debian, Development, Hardware Development, Linux, Power User, Raspberry Pi, Raspbian | 1 Comment »

#220 feature `SKIP_FIRMWARE` by jpluimers · Pull Request #221 · Hexxeh/rpi-update

Posted by jpluimers on 2016/12/13

Reminder to self: Fix #220 feature SKIP_FIRMWARE by jpluimers · Pull Request #221 · Hexxeh/rpi-update

It’s bash. How hard can it be.

(no that was a rhetorical question).

–jeroen

Posted in *nix, *nix-tools, Debian, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, Raspbian, SuSE Linux, Tumbleweed | Leave a Comment »

Reminder to self: nosudoers changed in Raspbian…

Posted by jpluimers on 2016/10/31

So I won’t forget: trying to make sense of this incomprehensible message (and the update on a Raspberry Pi takes looooooooong and while updating, the file /etc/sudoers.d/010_pi-nopasswd does not exist yet)

20161018+1 reintroduces passwordless sudo for pi user even if previously removed · Issue #6 · RPi-Distro/raspberrypi-sys-mods [WayBack]

raspberrypi-sys-mods (20161018+3) jessie; urgency=medium

  * The 20161018 release has introduced a /etc/sudoers.d/010_pi-nopasswd file.
    - The file is installed even if the "pi ALL=(ALL) NOPASSWD: ALL" entry has been
      previously removed from /etc/sudoers by the user.
    - If you do not want the entry to exist, please comment out or remove 010_pi-nopasswd.
    - If upgrading to 20161018+3 from a version earlier than 20161018, the line in
      010_pi-nopasswd is automatically commented out if the entry doesn't exist in sudoers.
    - See https://github.com/RPi-Distro/raspberrypi-sys-mods/issues/6

 -- Serge Schneider   Wed, 19 Oct 2016 10:52:07 +0100

And after like an hour of waiting:

[master b78090b] committing changes in /etc after apt run
 6 files changed, 52 insertions(+), 29 deletions(-)
 rewrite apt/apt.conf.d/01autoremove-kernels (88%)
 create mode 100644 sudoers.d/010_pi-nopasswd

–jeroen

Posted in *nix, Debian, Linux, Power User, Raspbian | 2 Comments »