Home - deep-soft/far2l GitHub Wiki

Home

akruphi edited this page 3 weeks ago · 298 revisions

far2l is Linux port of FAR Manager v2 developed by elfmz: https://github.com/elfmz/far2l

far2m is Linux port of FAR2 with FAR3 macro system and extended plugins' API developed by shmuz: https://github.com/shmuz/far2m

Most of the information below describing far2l applies to both far2l and far2m ( far2m forked from far2l in May 2022 and after version 2.5.0 some of the new features that appeared in far2m were not carried over ).

This wiki is filled based on discussions/explanations in the friendly image https://t.me/far2l_ru

Assembly options

far2l has three main rendering backends:

  • GUI - based on wxWidgets, works in graphical mode, perfect UX , lots of dependencies;
  • TTY|Xi — works in the console, depends on literally a couple of X libraries (to support all-all key combinations and the clipboard), almost perfect UX ;
    • TTY|X — via X11 clipboard support, keyboard via terminal capabilities
    • (for TTY|Xi, getting extended keyboard data does not work under Wayland due to Wayland's security model, when running it, far2l since version 2.6.1 switches to TTY|X without i; see below for details )
  • TTY is a pure console, no X dependencies, UX with some limitations (it works fully when launched in terminal emulators that provide access to the clipboard and extended information about keyboard events).

(!) For more information about these and other backends ( TTY|X , TTY|F , TTY|w etc.) see far2l in the built-in help for F1 in the section Interface modes / UI backends .

When building manually, -DUSEWX=nodisables building the GUI backend. If wxWidgets are not installed, it will also be built without it. Whether the TTY|Xi module will be built depends on the presence of the libx11-dev and libxi-dev packages in the system. The TTY version is always built. Details: https://github.com/elfmz/far2l#additional-build-configuration-options

A feature of macOS builds (thanks to t.me/vitalyster for clarification): wxWidgets on Mac is drawn natively without X and there are no dependencies on X at all, while TTY|Xi is the most "fat" option, because it requires X.

The FAR2L version and the backend used can be seen in the window title or via a pseudo-command far:about (in far2m via lm:farabout) .

  • If you have the GUI version installed , then when running far2lwithout parameters it will try to use it;
  • To force launch of the terminal variant TTY|Xi use in the command line: far2l --tty;
  • To force the TTY|X terminal variant to start , use the following in the command line: far2l --tty --nodetect=xi;
  • To force a minimal TTY to start , use the following on the command line: far2l --tty --nodetect=x;
  • background launch of FAR2L-GUI from command line without blocking the terminal:far2l --notty &

(for more information about launch keys, see far2l --help).

Sources far2l

  • far2l — main project by elfmz: https://github.com/elfmz/far2l

    The following packages and binary builds are compiled by enthusiasts or maintainers of official repositories, taking the version from the elfmz project and sometimes slightly tweaking the settings and configuration.

    • PPA (deb packages for the Ubuntu family and compatible Linux Mint distributions , updated regularly, usually within 24 hours after the update at elfmz in the master branch ): https://launchpad.net/~far2l-team/+archive/ubuntu/ppa

      The packages are called like this:

      • far2l - basic version, TTY backend only;
      • far2l-gui — separate GUI backend ( it will pull in the basic far2l by dependencies );
      • far2l-ttyx — separate TTY|Xi backend ( it will pull in the basic far2l by dependencies );
      • far2l-tiny — compact version (no GUI, no plugins, no manuals, only English).

      For Mint, use a package from a compatible version of Ubuntu, for example, for Linux Mint Mate 21.2 repository http://ppa.launchpad.net/far2l-team/ppa/ubuntu jammy main. For a table of version correspondence, see, for example, https://en.wikipedia.org/wiki/Linux_Mint#Releases

      • Switching between PPA repositories and native Ubuntu [ click to expand/collapse ]
    • Fedora and CentOS packages ( updated approximately once a month ): https://copr.fedorainfracloud.org/coprs/polter/far2l

    • Portable (with TTY X/Xi backend) | AppImage (with wx-GUI and some extra plugins): https://github.com/spvkgn/far2l-portable/releases

      • are rebuilt when new commits appear in elfmz's master branch
      • by default, it stores settings where and usual in ~/.config/far2l, but you can specify when running in the command line, for example, ./far2l_<что-то-там>.run -- -u $(pwd)/far2l_profileit will save all settings in the far2l_profile folder inside the current one (if the parameter is not specified -u, then the directory from the environment variable is used FARSETTINGSand only if it is absent, the default directory)
      • for details on Portable builds , see below
      • AppImage build issue : privilege escalation does not work because calling sudois not possible due to FUSE limitations, see https://github.com/AppImageCrafters/AppRun/issues/64#issuecomment-2091079799
    • Debian / Ubuntu official repositories

      far2l assembly | Debian(sid-unstable / 13 trixie-testing / 12 bookworm-backports) | Ubuntu(based on Debian package) -- | -- | -- TTY\|Xi | sudo apt install far2l | sudo apt install far2l(since mantic 23.10 ) GUI (WX) | sudo apt install far2l-wx(since far2l 2.6.4 ) | sudo apt install far2l-wx(since plucky 25.04 )   | https://packages.debian.org/search?keywords=far2lhttp://ftp.debian.org/debian/pool/main/f/far2lhttps://tracker.debian.org/pkg/far2lhttps://buildd.debian.org/status/package.php?p=far2l | https://packages.ubuntu.com/search?keywords=far2lhttps://launchpad.net/ubuntu/+source/far2l

      Starting with far2l 2.6.4 Debian/Ubuntu packages are built with python subplugins.

    • List of distributions where far2l got ( unfortunately, many outdated non-updated versions ): https://repology.org/project/far2l/versions

    • Builds and build instructions for different OS and distros: https://github.com/elfmz/far2l/issues/647

    • Specs of builds for different systems: https://github.com/elfmz/far2l/tree/master/packaging

      • buildroot scripts for building for embedded platforms such as OpenWRT or DDWRT - now you can run far2l even on a router
      • Debian
      • openSUSE
      • OS X / macOS
    • OpenWrt: https://github.com/spvkgn/far2l-openwrt

    • FAR2L Flatpak build (Nightly): https://github.com/spvkgn/far2l-flatpak

      • (!) access to the file system is limited by the Flatpak sandbox (even if you allow access to All system files (filesystem=host) - everything that is not available to the running user is not shown)
      • configs are located in a hidden place of flatpak:~/.var/app/io.github.elfmz.far2l/config/far2l/
    • OpenSUSE , Fedora , Ubuntu , Debian 12 from viklequick ( updated regularly, usually within 24 hours after the update at elfmz in the master branch ): https://download.opensuse.org/repositories/home:/viklequick/

      cutting bags into small noodles:

      • far2l-core- terminal only (basic)
      • far2l-ttyxi- adding keys/clipboard via X
      • far2l-wxgtk- adding a graphical front-end
      • netrox plugins, in bulk: far2l-plugins-netrocks-ftp, far2l-plugins-netrocks-nfs, far2l-plugins-netrocks-sftp, far2l-plugins-netrocks-shell, far2l-plugins-netrocks-smb,far2l-plugins-netrocks-webdav
      • far2l-full- classic assembly in one package (but without Python, this is always separate)= far2l-core + far2l-ttyxi + far2l-wxgtk + far2l-plugins-netrocks-*
      • far2l-plugins-python- Python, for those who need it, without virtualenv - uses the system one
      • additional plugins not from far2l, written separately: far2l-plugins-editwrap, far2l-plugins-jumpword, far2l-plugins-netcfg, far2l-plugins-processes,far2l-plugins-sqlite

      add to sources.list like this:deb https://downloadcontentcdn.opensuse.org/repositories/home:/viklequick/<ос_версия> ./

    • Termux: https://github.com/spvkgn/far2l-termux

    • macOS https://github.com/elfmz/far2l#osxmacos-binaries :

  • All sorts of useful things from unxed :

  • Built-in plugins (included in the standard far2l build from elfmz , see the full list of installed plugins via the pseudo-command far:about):

    • align (Align block / Align block): editor plugin
    • autowrap (Auto wrap): editor plugin
    • calc (Calculator / Calculator): plugin panels, editor, viewer
    • colorer (FarColorer - syntax coloring for file types in editor): editor plugin
    • compare (Advanced compare / Advanced comparison): panels plugin
    • drawline (Draw lines / Draw lines): editor plugin
    • editcase (Change Case / Register): editor plugin
    • editorcomp (Editor Autocomplete): editor plugin
    • filecase (Case conversion): panels plugin
    • incsrch (Incremental Search): editor plugin
    • inside (Inside - inside ELF files and documents by Ctrl+PgDown): panels plugin
    • multiarc (Archive support / Working with archives): panels plugin
    • NetRocks (NetRocks - SFTP/SCP/SHELL/NFS/SMB/WebDAV connectivity): panel plugin
    • SimpleIndent (indent by Tab/Shift-Tab of the selected block in the editor): editor plugin
    • tmppanel (Temporary panel): panels plugin
  • Про Python plugins: python/configs/plug/plugins/read-en.txt & #694 & #982 & #1261

  • External plugins/macros (external plugins are not included in far2l from elfmz ; can be taken from the authors as binaries and placed in the plugins directory of the installed far2l, usually /usr/lib/far2l/Plugins; or added to the local source code directory of far2l, specified in CMakeLists.txt and compiled immediately with far2l):

  • Wiki by elfmz : https://github.com/elfmz/far2l/wiki

  • far 2 encyclopedia (from the Windows version, but a lot of useful stuff, for example, about macro language, help language markup, etc.):

Note: view CHM in Linux, for example, via xCHM (the most correct) or via Okular - view CHM as consecutive pages, but there may be failures in rendering the text of links and the click area on them.

Sources far2m

  • far2m — a fork of shmuz with support for Lua macros and plugins (Lua macros and Lua plugins are introduced and used in windows far3): https://github.com/shmuz/far2m

    Far2m forked from far2l in May 2022 and after version 2.5.0 some of the innovations that appeared in far2m were not transferred (for example, dates in history, etc.)

Working with far2l in terminals and remote access to far2l on a remote computer

  • Messages when starting the terminal versionSome far2l-s lost in space-time nearby:

    • If far2l is not terminated normally (by F10 ), but by a terminal crash (including the user closing the terminal by the cross in the window title), then far2l tries to survive and creates a /tmp/far2l_3e8_0/TTYsession record. And at each launch, far2l does not check for files there in the GUI. If there are, it displays information Some far2l-s lost in space-time nearby:and offers to connect to one of the sessions. The problem occurs when these sessions were killed. Files in /tmp/far2l_3e8_0/TTY are not deleted. And at each launch, it asks about this.

    • This feature is very useful when a session is interrupted - far2l running on a remote computer does not die, but remains waiting for a reconnection (the behavior is changed by the launch keys --immortaland --mortal), and when it is launched again, far2l will find the previous launch and try to recover (messages Some far2l-s lost in space-time nearby:).

      • if the reconnection is from a new IP, and the server sshd still waits for a long time for a reconnection from the same IP and far2l is not picked up, then the following script can kill all sessions except the current one, after which the old far2l is picked up normally:
        #!/bin/bash
        current=$(tty | cut -d/ -f3-)
        all=$(ps -A -o tty | grep pts/ | grep -v $current)
        for i in $all ; do
            pkill -9 -t $i
        done
  • To transfer extended key combinations and clipboard data to far2l running on a remote computer, you need to initiate a connection from clients that can do this ( see below ).

  • Feature of insertion in terminals :

    • There is a combination of terminal paste (terminal imitates keyboard input) and there is paste of far2l itself (far2l itself does paste). At the same time, the combination of terminal paste is different in different terminals (and can overlap the standard far2l paste keys Shift-Ins or Ctrl-V ).
    • In the version without TTY|X or TTY|F (or without support enabled OSC 52in both far2l and the terminal), pasting far2l itself uses its internal clipboard (since far2l does not have access to the system clipboard), and pasting the terminal uses the system clipboard .
    • Neither the gnome nor KNOW want OSC 52to fully support it for security reasons: you can write it down on the clipboard, but you can’t read it from there (see #1110 ).

Terminals and ssh clients supporting far2l extended keybindings for the pure terminal version of far2l TTY

This section is about setting up terminal emulators and ssh clients for the minimal TTY version of far2l. In other terminal emulators, the minimal far2l-TTY works with varying degrees of functionality limitations (in terms of recognizing modifiers and keyboard key combinations and the system clipboard). However, in other terminal emulators, TTY|X and TTY|Xi versions work more or less well when X11 is available/forwarded (see Peculiarities of Pasting in Terminals and Key Interception by Terminal Emulators ).

Now even the minimal TTY version of far2l can work with support for almost all keys in the following terminal emulators, using their advanced key transfer capabilities (link for history and technical details ).

To interact with the clipboard in some of them, you must remember to enable it OSC 52both in far2l settings (the option OSC 52is visible in Menu->Options->Interface settings, only when all other clipboard support options are unavailable; so if it is not visible, you need to run far2l like this: far2l --tty --nodetect), and in terminal settings , you must enable OSC 52 (by default OSC 52, it is disabled in some terminals for security reasons; OSC 52in a bunch of terminals, it is implemented only for copy mode, and paste from the terminal goes through the so-called bracketed paste mode ).

No more need to use TTY|Xi, for which you had to enable x-forwarding and install ES libraries on the server for remote work - now everything is out of the box (at least in these terminals).

See also Comparison-of-terminals

  • Built-in terminal far2l-gui ( Linux , macOS , *BSD ):

    • TTY|F mode - keys and clipboard via far2l TTY extensions support
    • we launch the graphic one far2l, inside it we do ssh example.com(it is better from the NetRocks plugin, but it is also possible simply in the command line), there we launch the remote one far2lin console mode: far2lin the command line of the local far2l on the NetRocks active connection panel (if far2l on that side is not in $PATH, then the explicit path), no keys are needed, the distant far2l itself understands that its brother is here and uses exchange in the TTY|F format.
    • excerpt from far2l help for F1 section Interface modes / UI backends :

      If you want to run far2l remotely with maximum convenience, it is recommended to either run it from a NetRocks connection session, which allows you to use the TTY|F mode. If this is not possible, it is recommended to run far2l in an SSH session with trusted X11 protocol forwarding and compression enabled (ssh -Y -C ...), which allows you to use the TTY|Xi or at least TTY|X mode. At the same time, it is highly recommended not to use trusted X11 forwarding when connecting to an untrusted server, since this opens an uncontrolled opportunity for the code running on the remote server to listen to your keyboard strokes, copy the contents of the clipboard and screenshots of windows. Thus, the TTY|F mode is the only safe method for remotely running far2l on an untrusted server with support for all the usual keyboard shortcuts and other conveniences.

    • excerpt from far2l help for F1 NetRocks plugin section Command line and remote FAR2L :

      When entering commands in command line when panel displays usual files list you can open connection by typing NetRocks-supported protocol URL, like sftp://192.168.1.15 or alternatively you can open preconfigured site by invoking its name between triangle brackets and prefixed with net: prefix, like: net: When entering commands in command line when panel displays active NetRocks connection of SFTP and SCP protocols - NetRocks will execute them directly on remote host, opening full-featured pseudoterminal for controlling remotely-executed commands. This essentially allows using NetRocks as SSH client with FAR2L-extended pseudoterminal. If you're working in GUI-based FAR2L you can run remote TTY-mode FAR2L directly in NetRocks SFTP/SCP connected panel and work in that remote FAR2L with user experience of local GUI-based version (full keyboard support, clipboard sharing, desktop notifications) as well as being sure that if connection suddenly drops - remote work will not be killed instantly, since remote terminal-based FAR2L will remain alive and active in background and next time you will reconnect and re-launch far2l - it will prompt to activate that backgrounded FAR2L instance.

  • kovidgoyal's kitty ( Linux , macOS , *BSD ): https://github.com/kovidgoyal/kitty & https://sw.kovidgoyal.net/kitty/ ( supported since far2l version from 04/08/2023, commit e1f2ee0 )

    • TTY|k mode - advanced key interaction is implemented using https://sw.kovidgoyal.net/kitty/keyboard-protocol

    • To interact with the clipboard, you must enable OSC 52 mode

    • so that https://github.com/kovidgoyal/kitty/ does not intercept Shift-Ins (insertion by means of kitty from another system clipboard than far2l uses by default) and Ctrl-Shift-arrows , in ~/.config/kitty/kitty.conf(according to kitty-faq ) add

      map shift+insert no_op
      map ctrl+shift+right no_op
      map ctrl+shift+left no_op
      map ctrl+shift+home no_op
      map ctrl+shift+end no_op
      enable_audio_bell no
      

      (here we also disable enable_audio_bell, so that annoying beeps do not occur when viewing binary files)

    • Setting up kitty under far2l and far2l under kitty in one-liner:

      (pkill -f far2l || true) & sed -i 's/OSC52ClipSet=0/OSC52ClipSet=1/g' ~/.config/far2l/settings/config.ini; [ -f ~/.config/kitty/kitty.far2l.bak ] && exit; mv ~/.config/kitty/kitty.conf ~/.config/kitty/kitty.far2l.bak; echo -e "map shift+insert no_op\nmap ctrl+shift+right no_op\nmap ctrl+shift+left no_op\nmap ctrl+shift+home no_op\nmap ctrl+shift+end no_op\nenable_audio_bell no" > ~/.config/kitty/kitty.conf
    • BUG in old versions of kitty "Copy selection to clipboard appends, does not replace": https://github.com/elfmz/far2l/issues/2038

  • Alacritty (Linux/FreeBSD, macOS, Windows): https://github.com/alacritty/alacritty & https://alacritty.org/

    • TTY|k mode - extended key interaction is achieved using kitty mode
    • to interact with the clipboard you need to enable OSC 52 mode , enabled by default, needs to be enabled only inside far2l
    • conpty.dll must be installed in Windows
  • Rio Terminal (Linux/FreeBSD, macOS, Windows): https://github.com/raphamorim/rio & https://raphamorim.io/rio/

    • TTY|k mode - extended key interaction is achieved using kitty mode
    • to interact with the clipboard you need to enable OSC 52 mode , enabled by default, needs to be enabled only inside far2l
  • Ghostty (Linux, macOS): https://github.com/ghostty-org/ghostty & https://ghostty.org/

    • TTY|k mode - extended key interaction is achieved using kitty mode
    • to interact with the clipboard you need to enable OSC 52 mode , enabled by default, needs to be enabled only inside far2l
  • foot (Linux Wayland): https://codeberg.org/dnkl/foot

    • TTY|k mode - extended key interaction is achieved using kitty mode
    • to interact with the clipboard you need to enable OSC 52 mode , enabled by default, needs to be enabled only inside far2l
  • Wez's Terminal Emulator ( Linux , FreeBSD , Windows ): https://github.com/wez/wezterm & https://wezfurlong.org/wezterm ( supported since far2l version from 2023-04-10, commit 97aecaa )

    • extended key interaction is implemented
      • in Linux/FreeBSD via TTY|k mode  kitty mode , which in wezterm must be enabled manually: write in ~/.wezterm.luathe lineconfig.enable_kitty_keyboard = true
      • in Windows via TTY|w mode  win32-input-mode , which is enabled by default (in Windows, kitty mode seems to be broken and should not be enabled under any circumstances)
      • in macOS in wezterm there is a problem with modifiers https://github.com/elfmz/far2l/issues/2112 and it seems that kitty mode does not work correctly ( !!! clarify what works and what does not work in wezterm in macOS!!! )
    • To interact with the clipboard, you must enable OSC 52 mode
    • so that https://github.com/wez/wezterm does not intercept Ctrl/Shift-PgUp/PgDn and Ctrl-Shift-arrows , in ~/.wezterm.lua(according to faq ) add
      config.keys = {
        {key = 'PageUp',     mods = 'CTRL',  action = wezterm.action.DisableDefaultAssignment,},
        {key = 'PageDown',   mods = 'CTRL',  action = wezterm.action.DisableDefaultAssignment,},
        {key = 'PageUp',     mods = 'SHIFT', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'PageDown',   mods = 'SHIFT', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'LeftArrow',  mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'RightArrow', mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'UpArrow',    mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'DownArrow',  mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'Home',       mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'End',        mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'PageUp',     mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
        {key = 'PageDown',   mods = 'SHIFT|CTRL', action = wezterm.action.DisableDefaultAssignment,},
      }
      
  • iTerm2 ( macOS ): https://gitlab.com/gnachman/iterm2/ & https://iterm2.com/ ( supported since far2l version from 2023-04-21, commit 65b964c )

    • TTY|a mode - advanced key interactions are implemented using the iTerm2 "raw keyboard" protocol
    • To interact with the clipboard, you need to enable the mode OSC 52both in far2l and in iTerm2 itself: open настройки/ preferencesand go to Общие настройки/ General; enable the Приложения в терминале могут получить доступ к буферу обмена/ optionApplications in terminal may access clipboard
    • Features of iTerm2 support implementation in far2l :
      • the right Option (the version of Alt on Macs) is treated as the right Control , since the right Control is not available on all Mac keyboards ( Command cannot be used - it is occupied by the hotkeys of the terminal itself, and the right Alt is not used in far2l anyway);
      • After Paste, the extended keyboard support mode is not enabled immediately, but after the first press of any button that works in the classic terminal mode .
  • fresh Windows Terminal (in win11 it is out of the box, in win10 you need to install it) ( supported starting from far2l version from the end of March 2023 )

  • (!) Original Putty does not correctly send some keyboard combinations to far2l . Under Windows, use special putty forks with far2l TTY extensions support :

    • putty4far2l (Windows ssh client): https://github.com/unxed/putty4far2l & https://github.com/ivanshatsky/putty4far2l/releases

      • TTY|F mode - keys and clipboard via far2l TTY extensions support
    • cyd01's KiTTY (Windows ssh client): https://github.com/cyd01/KiTTY & https://www.9bis.net/kitty

      • TTY|F mode - keys and clipboard via far2l TTY extensions support
      • disabling interception of Ctrl-F3 ... Ctrl-F7 keys by KiTTY itself: %APPDATA%\Roaming\KiTTY\kitty.inireplace shortcuts=yeswith in the file shortcuts=no; if you only need to disable some specific shortcuts, they can be reassigned to other combinations in the section [Shortcuts]of the same file (for example, F7 is usually intercepted by the printer print=and printall={CONTROL}p)
      • session color scheme (edit after saving the session in the registry or in the file Sessions\имя_сессии) for forwarding full colors far2l:
        Colour0\187,187,187\
        Colour1\255,255,255\
        Colour2\0,0,0\
        Colour3\85,85,85\
        Colour4\0,0,0\
        Colour5\0,255,0\
        Colour6\0,0,0\
        Colour7\85,85,85\
        Colour8\128,0,0\
        Colour9\255,85,85\
        Colour10\0,187,0\
        Colour11\85,255,85\
        Colour12\187,187,0\
        Colour13\255,255,85\
        Colour14\0,0,128\
        Colour15\85,85,255\
        Colour16\187,0,187\
        Colour17\255,85,255\
        Colour18\0,128,128\
        Colour19\85,255,255\
        Colour20\187,187,187\
        Colour21\255,255,255\
        
    • putty-nd (Windows ssh client): https://sourceforge.net/projects/putty-nd/ & https://github.com/noodle1983/putty-nd

    • putty 0.82+ : starting with version 0.82 in vanilla putty in the keyboard settings you can set Xterm 216+and xterm-style bitmap(more details: https://github.com/elfmz/far2l/issues/2630 ), but the original PuTTY cannot transfer the clipboard.

  • xterm (Linux/FreeBSD): https://invisible-island.net/xterm/

    • TTY mode - does not support clipboard transfer OSC 52; some of the extended key combinations are available if you run
      term -fa 'Monospace' -fs 12 -xrm '*modifyOtherKeys:2' -xrm '*formatOtherKeys:1' -e "printf '\033[?1036h' && far2l --tty --nodetect=xi" &
      
      where modifyOtherKeys:1— fewer key combinations work; modifyOtherKeys:2— Alt+letters work only in Latin ( bug in xterm).

Known issues and solutions (key combinations interception by shells, far2l features in terminals and under Wayland, clipboard issues, macOS issue)

  • The original Putty does not correctly forward some keyboard combinations to far2l. Under Windows, use special putty forks with far2l TTY extensions support .

  • Sticky control keys : If your environment does not allow you to use some key combinations due to TTY mode limitations or if the key combination is occupied by an external program, you can use sticky control keys. This means a key that virtually remains pressed until the next non-control (numeric-character) key is pressed:

    • Ctrl+SPACE gives sticky CONTROL
    • Alt+SPACE gives sticky ALT
    • right_Ctrl+SPACE gives sticky right CONTROL
    • right_Alt+SPACE gives sticky right ALT

    Another way to get working hotkeys can be to reconfigure system-wide hotkeys , external programs (in order to free up the necessary combinations) or use the exclusive keypress handling option (only in GUI mode under X11). See also keyboard macros for stripped-down keyboards .

  • Many key combinations Alt-F1 , Alt-F2 , Alt-F7 , Ctrl-arrows etc. are used as system-wide hotkeys and are globally intercepted by shells GNOME , KDE , Xfce , macOS etc. To work, disable them in the shell settings (desktop environment = DE).

    • Disabling is possible visually in the shell settings (for example, in GNOME 42 : Settings ⇒ Keyboard ⇒ Keyboard Shortcuts ⇒ View and Customize Shortcuts) - you have to go through all of them and disable the unnecessary ones.

      • Under GNOME and built on it ( Unity , Mate , Cinnamon , ...) can be used dconf-editor org.gnome.desktop.wm.keybindingsto view and change global keyboard shortcuts.
      • Alt-F1 in GNOME opens the "Applications" menu and is not configurable through the default settings; to release this combination, use and uncheck the switch dconf-editorin it ./org/gnome/shell/extensions/apps-menu/apps-menu-toggle-menuUse default value []
    • When switching languages ​​using Ctrl-Shift , all combinations with it may not work due to interception by the shell ( Ctrl-Shift-arrows - marking in the editor by words, Ctrl-Shift-PgDn - switching to symlink, etc.).

    • a selection of scripts for disabling global keys via gsettingsand configuration files: https://github.com/unxed/far2ltricks/tree/main/unbindkeys and https://github.com/elfmz/far2l/issues/2326

      • in particular, disabling global keys in GNOME or Cinnamon via gsettings [ click to expand/hide ]
    • In KDE Plasma you can enable ignoring global hotkeys for a specific window/application:

      • this is done either through Параметры системы Приложения и окна Диспетчер окон Особые параметры окон Создать,
      • or through the far2l window menu: Дополнительно Настроить индивидуальные параметры приложения, button Добавить свойство, and there, in the subsection Внешний вид и обход проблем, item Игнорировать глобальные комбинации клавиш.
    • In Xfce , it's very non-trivial to disable key bindings, you poke around in the GUI tool, but it still doesn't work, it's fixed with a config; an excerpt from https://russiandesman.dreamwidth.org/2742.html about keybindings:

      ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
      Удалить или закомментировать строки вида:
          <property name="&lt;Primary&gt;F6" ...      <property name="&lt;Control&gt;F6" ...
      После этого вернутся Ctrl+F7 и прочие мелкие радости.
      Если строки не удалить, а только снять с них галки в xfce4-keyboard-settings - счастья не будет.
      
    • The combination of recording a macro Ctrl-. with 2021 is intercepted by the shell ( details and option to disable ), but since on the Russian layout the period is on a different key, then on the Russian keyboard the launch of the macro recording works (start recording a macro with Ctrl-. ; the fact that the macro recording is in progress is visible by the letter R in the upper left corner; end recording a macro with Ctrl-. and then enter the key combination assigned to launch the macro).

  • In far2l-GUI (only under X11, unfortunately, does not work under Wyalnd / xwayland ) there is a possibility of exclusive capture of modifiers (F9⇒Options⇒Input settings⇒Exclusively handle hotkeys that include / F9⇒Options⇒Input settings⇒Exclusively handle hotkeys that include), which will allow not to reassign combinations in the shell, but, for example, when capturing Alt , the global Alt-Tab will also fail . Discussion: https://github.com/elfmz/far2l/issues/2007

    • in KDE Plasma 6.1, enabling exclusive capture from within far2l does not work; only setting the application properties via the window menu helps: Дополнительно Настроить индивидуальные параметры приложения, button Добавить свойство, and there, in the subsection Внешний вид и обход проблем, item Игнорировать глобальные комбинации клавиш.
  • On external keyboards, macOS swaps Alt and Win (assuming that the key closest to the spacebar on the left is Command , like on a MacBook keyboard).

  • Terminal emulators also often do not transmit some key combinations to console applications running in them, or do not distinguish between pressing different combinations of modifiers (Ctrl, Alt, etc.).

    • the standard gnome-terminal in Ubuntu intercepts F10 (configurable ⇒ Preferences ⇒ General: Uncheck " Enable the accelerator key (F10 by default)"), other key combinations are configured ⇒ Preferences ⇒ Shortcuts
    • about kovidgoyal's kitty see above
    • about wezterm see above
    • in qterminal you may need to change the emulation mode to linux , because with default a bug was noticed - Backspace inside far2l gets as Ctrl+Backspace
  • Peculiarities under Wayland or under WSL+WSLg (in case of problems with the clipboard and/or key combinations in FAR2L-GUI/TTY|X)

    • far2l versions since 2.6.1 (and 2.6.0 builds a bit earlier, starting from the end of March 2024):

      • automatically detects startup under Wayland and disables incompatible options - inside terminals for TTY|Xi, receiving keyboard events does not work under Wayland due to the Wayland security model, when it is launched, far2l switches to TTY|X without i;
      • for GUI and TTY|X, a bug with incorrect work with the clipboard under Wayland has been fixed.
    • The information in the expandable block is only relevant for older far2l builds (before far2l 2.6.1) [ click to expand/collapse ]
    • about the reasons for such Wayland limitations: image https://t.me/far2l_ru/13852 , https://t.me/far2l_ru/13853 and further.

  • A workaround for solving problems with the clipboard (using external console utilities to work with the clipboard) - a solution if the built-in tools for some reason do not get access to the clipboard (noted in non-X11 environments: wayland and wslg):

  • A workaround for the macOS version of the problem of persistently asking for permission when navigating through directories :

  • The internal command line of far2l works fully only through bash :

    • You can change the shell via F9⇒Options⇒Command line settings⇒Use shell , but then the command line will work with significant limitations/bugs, especially with native shell commands, see https://github.com/elfmz/far2l/issues/1264#issuecomment-1045334082
    • If you don't have bash on your system , it is advisable to install it and use only bash in far2l.
    • If your default system shell is not bash, you may also find it convenient to write your environment variables, aliases, etc. in bash startup files.
    • far2l sets an environment variable during operation $HISTCONTROL=ignorespaceto exclude working calls from the bash history (far2l always starts commands with a space); if you change the shell to another one that does not understand $HISTCONTROL, then working commands will pour into the shell history
      • for zsh helps to add to .zshrc by choice either globally setopt HIST_IGNORE_SPACE(equivalent to setopt -g) or only under far2l [ -n "$FARPID" ] && setopt HIST_IGNORE_SPACEor[ -n "$FARPID" ] && unset HISTFILE
      • experience of writing variables in bash on macOS: https://github.com/elfmz/far2l/issues/1900#issuecomment-2571637288
  • Inadequate far2l colors in Konsole terminal emulator :

    • The issue has been resolved since build 2.6.4-2024-11-19-6aff2f5 : all new colors are RGB by default and do not conflict with Konsole theme palettes

      • for existing profiles created earlier, you can switch to the current defaults - you need to kill your current coloring F9 ⇒Options⇒Files highlighting and sort groups / F9 ⇒Options⇒Coloring of files and sorting groups and press Ctrl+R (if you feel sorry for the current coloring - save it first ~/.config/far2l/settings/colors.ini)
    • 16 and 256-color far2l colors are not compatible with the palettes of most Konsole themes : Konsole has the "Breeze" theme enabled by default, if you change it to another one, for example "Linux Colors" or "Green on Black", then the colors in far2l become adequate (out of all the themes in Konsole, 3-4 can be used with far2l):

      • in the context menu from the Konsole screen, select "Edit Current Profile..." ⇒ Apperarance tab ⇒ "Color scheme & font" tab ⇒ select the "Linux Colors" theme;
      • In some systems, the built-in profile parameters are not editable ;
      • Konsole ⇒ "Open menu" ⇒ "Settings" ⇒ "Create new profile" (or "Manage profiles") ⇒ "Appearance" section ⇒ select a different color scheme;
      • then you can also: "Open menu" ⇒ "Settings" ⇒ "Configure Konsole" ⇒ "Profiles" ⇒ select the created profile ⇒ "Make primary".

⚠️ **GitHub.com Fallback** ⚠️