Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Issue with keyboard layout / F-keys in MC

Featured Replies

Hallo,

 

first I want to thank Igor for the creation of armbian, great stuff! Many thanks.

 

Now to my issue:

 

While setting up a Lamobo R1 with armbian i was not able to get F-keys F1 to F4 working in Midnight Commander (apt-get install mc). With all three flavours (whezzy, jessie and trusty) it is the same.

I tried

dpkg-reconfigure keyboard-configuration

dpkg-reconfigure locales

to get it working with my german (qwertz) keyboard.

 

The behaviour is the same for local and remote (ssh).

 

Tried also to bulid new image based on https://github.com/igorpecovnik/lib with

 

# user

DEST_LANG="de_DE.UTF-8"    # sl_SI.UTF-8, en_US.UTF-8

CONSOLE_CHAR="UTF-8"       # console charset

TZDATA="Europe/Berlin"     # time zone

 

without any succsess.

 

During setup of x86-machines as well as the Beaglebone Black with Debian or Ubuntu I never had this issue.

 

Any hints?

 

Michael

 

 

  • Author

echo $TERM gives "linux".

With "TERM=xterm mc" the F-keys behave correct.

 

How to set this persistant?

echo $TERM gives "linux".

With "TERM=xterm mc" the F-keys behave correct.

 

How to set this persistant?

 

I don't know where the defaults are stored. So it depends on the shell you use. If you're using zsh you would add "export TERM=xterm" to ~/.zshrc and if you're using bash instead you would have to write it to both ~/.bashrc and ~/.bash_profile (see chapter INVOCATION in bash's manual page -- for whatever reason one file is read when you start a login shell and the other if it's a not a login shell)

  • Author

Found the solution or the cause of the different behaviour, deppends on how you look at it:

 

Difference between ambian and x86 Debian or Ubuntu is the following:

 

There is a file /etc/bash.bashrc.custom:

if [ ${TERM} == "dumb" ]; then
    return
fi

export TERM=linux

OUT=""
...

This is never reverted and breaks the at least to me well known behaviour of mc.

 

To fix this I added

export TERM=xterm

at the end of /etc/bash.bashrc.custom.

 

 

Glad you resolved it. But you should be prepared that other stuff might break now (I believe this is defined for a reason). $TERM is an ugly beast ;-)

 

An alternative approach is to use aliases (since it seems to only affect one single tool you use).

alias mc="TERM=xterm /usr/bin/mc"

in one of the startup files read by bash and you're done (and don't introduce yet unknown side effects). Also useful if you've other terminal related problems or you just dislike colors in some programs:

alias mcm="TERM=xterm-mono /usr/bin/mc"

Now "mcm" would invoke a b/w mc instance. Aliases are powerful. Since I'm a lazy guy I even use them to open stuff from the command line in Cocoa apps (on OS X -- of course  :P )

macbookpro-tk:~ tk$ type photoshop
photoshop is aliased to `open -a /Applications/Adobe\ Photoshop\ CC\ 2015/Adobe\ Photoshop\ CC\ 2015.app'
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.