Open-source News

Enjoy two-panel file management on Linux with far2l

opensource.com - Thu, 12/15/2022 - 16:00
Enjoy two-panel file management on Linux with far2l Seth Kenlon Thu, 12/15/2022 - 03:00

Far2l is a port of the Windows text-based file manager Far. And to be clear, that's a lower-case L (as in "Linux") not a number 1. It runs in the terminal and is designed around a plug-in structure, enabling compatibility with SSH, WebDAV, NFS, and more. You can compile and run far2l on Linux, Mac, and BSD, or Far on Windows.

Install far2l

Far2l is currently in beta, so you're unlikely to find it in your Linux distribution's software repository. However, you can compile it from source by downloading cloning its Git repository:

$ git clone --depth 1 https://github.com/elfmz/far2l.git

You can browse through the source code to see all of its different components. The main source files are in utils/src:

SharedResource.cpp
StackSerializer.cpp
StringConfig.cpp
StrPrintf.cpp
TestPath.cpp
Threaded.cpp
ThreadedWorkQueue.cpp
TimeUtils.cpp
TTYRawMode.cpp
utils.cpp
WideMB.cpp
ZombieControl.cpp

The file ZombieControl.cpp works to mitigate a zombie apocalypse (at least, in terms of processes), the file ThreadedWorkQueue.cpp helps speed processes along by using threading. Far2l isn't just built for extensibility, it's built responsibly!

Assuming you've already prepared your system for compiling code, as described in the compiling from source article, you must also install some development libraries required by far2l. On Fedora, CentOS, OpenMandriva, and Mageia, the minimal list is:

  • wxGTK3-devel

  • spdlog-devel

  • xerces-c-devel

  • uchardet-devel (your repository may not have this one, but there's a workaround)

On Debian, the minimal list is:

  • libwxgtk3.0-gtk3-dev

  • libuchardet-dev

  • libspdlog-dev

  • libxerces-c-dev

Use CMake to prepare the makefiles:

$ mkdir build
$ cd !$
$ cmake .. -DUSEUCD=no

The -DUSECD=no option is required only if you don't have the development libraries for chardet installed. If you do, then you can omit that option.

Finally, compile the code and install far2l to a temporary location:

$ make -j$(nproc --all)
$ mkdir ~/far2l
$ make install DESTDIR=~/far2l

If you prefer to install it to your system instead of to a temporary directory, then omit the DESTDIR=~/far2l option.

To launch far2l, invoke the binary stored in the bin subdirectory of your install path. For instance:

$ ~/far2l/local/bin/far2lUsing far2l

When you first launch far2l, it creates a configuration directory in ~/.config and prompts you to choose what font you'd like to use. On my system, 16 pt font size was the default, and anything less than that was impossible to read. I used the open source Fantasque Mono Regular as my font, but any monospace font ought to work.

Far2l is a two-panel file manager, meaning that the default view has a place to display two separate directories. At launch, both directories happen to be your home directory. To maximize the amount of screen space used for listing files, far2l uses two columns in each panel, and you can use the Left and Right arrows to change from one column to the other.

In the right column, you can also use the Right arrow to move "down" the list of files by one screen. In the left column, use the Left arrow to move "up" the list of files by one screen.

Image by:

(Seth Kenlon, CC BY-SA 4.0)

This navigation takes some getting used to, especially if you're used to terminal file managers that only use the Right arrow to descend into a directory. However, once you get used to far2l's navigation, you're likely to appreciate the added speed you gain from this simple pagination.

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles Open a file or folder

To open a folder, select a folder in your file list and press the Return key. This causes the active panel to change to a view of that directory. The inactive panel doesn't change, so it's not uncommon for far2l to always be showing two different directories at the same time. That's a feature of the two-panel file manager design, although it can take some getting used to if you're not in the habit of splitting windows.

After you've moved into a directory, you can move back into its parent folder by selecting the double dots (..) at the top of the file listing and pressing Return.

To open a file, select a folder in your file list and press the Return key. The file opens according to your desktop's mimetype preferences.

Panel and window navigation

To move from one panel to another, press the Tab key.

The fun thing about far2l is that its file listing is actually a layer over the top of your terminal. To hide the file listing temporarily, and to reveal it once it's gone, press Ctrl+O (that's the letter O not the digit zero).

You can also adjust how much of your terminal the file panels take up. Press Ctrl+Up and Ctrl+Down to adjust the vertical size of the file panels.

Make no mistake, though, you're not just suspending far2l when you access the terminal underneath. This isn't your usual terminal, it's a far2l terminal that interacts with the file manager and adds a few features to your standard terminal experience. For example, the find command gains graphical auto-completion.

Image by:

(Seth Kenlon, CC BY-SA 4.0)

Copying and moving files

All the usual file management functions are available within far2l are available with function keys. These are listed along the bottom of the far2l window. There are lots of options for some of the actions, which is either over-complex or really really powerful, depending on your preference.

Image by:

(Seth Kenlon, CC BY-SA 4.0)

Exiting far2l

To close far2l, type exit far into the command prompt at the bottom of the far2l window.

Far out

Far2l is a dynamic and responsive text-based file manager. If you're a fan of classic two-panel file managers, then you'll feel at home with far2l. Far2l provides an interesting and novel interpretation of a terminal, and if you don't try far2l for its two-panel file management, you should at least try it for its terminal.

Far2l runs in the Linux terminal and is designed around a plug-in structure, enabling compatibility with SSH, WebDAV, NFS, and more.

Image by:

Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0

Linux What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How to Install Nagios Monitoring in RHEL, Rocky, and AlmaLinux

Tecmint - Thu, 12/15/2022 - 13:30
The post How to Install Nagios Monitoring in RHEL, Rocky, and AlmaLinux first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Nagios is an awesome Open Source monitoring tool, that provides a more comprehensive monitoring environment to always keep an eye on your all machines/networks whether you are in your data center or just your small

The post How to Install Nagios Monitoring in RHEL, Rocky, and AlmaLinux first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Libreboot 20221214 Brings More Arm Chromebooks & ThinkPads

Phoronix - Thu, 12/15/2022 - 08:00
After a half-year of development, Libreboot 20221214 is now available for this downstream of Coreboot that is focused on software freedom and providing fully open-source firmware support. Libreboot also enhances the experience with an automated build system and other changes in the name of software freedom and being user-friendly...

The partner opportunity: How Red Hat technologies unlock deeper business value for partners

Red Hat News - Thu, 12/15/2022 - 08:00
<p>Behind every great solution is an ecosystem of collaborative partners. At least, that’s the case at Red Hat. Founded on the spirit of upstream open source innovation, every milestone in Red Hat’s history is connected to open collaboration and driven by a skilled, vibrant ecosystem of software providers, solution providers, systems integrators and more.&nbsp;</p> <p>As we build upon Red Hat’s open source portfolio, partners remain core to our vision and we continue to see the results with our customers. Therefore we are proud that CR

Modula-2 Language Frontend Merged Into GCC 13

Phoronix - Thu, 12/15/2022 - 05:05
Yesterday it was the GCC Rust front-end "gccrs" being merged into the GNU Compiler Collection codebase for GCC 13. Today the Modula-2 language front-end also made it over the finish line...

LLVM's Flang Compiler Adds -Ofast & -ffast-math Support

Phoronix - Thu, 12/15/2022 - 02:00
Flang as LLVM's Fortran language front-end has landed support for the -Ofast and -ffast-math compiler flags...

Intel SGX Async Exit Notification "AEX Notify" Lands In Linux 6.2

Phoronix - Thu, 12/15/2022 - 00:30
In addition to the in-development Linux 6.2 bringing TDX guest attestation support for use with new processors, another new hardware security feature being enabled with this next kernel release is Asynchronous Exit Notification for Software Guard Extensions (SGX)...

Pages