{"id":69489,"date":"2022-12-15T09:00:36","date_gmt":"2022-12-15T09:00:36","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=69489"},"modified":"2022-12-15T09:00:36","modified_gmt":"2022-12-15T09:00:36","slug":"enjoy-two-panel-file-management-on-linux-with-far2l","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=69489","title":{"rendered":"Enjoy two-panel file management on Linux with far2l"},"content":{"rendered":"<p><span class=\"field field--name-title field--type-string field--label-hidden\">Enjoy two-panel file management on Linux with far2l<\/span><br \/>\n<span class=\"field field--name-uid field--type-entity-reference field--label-hidden\"><a title=\"View user profile.\" href=\"https:\/\/opensource.com\/users\/seth\" class=\"username\">Seth Kenlon<\/a><\/span><br \/>\n<span class=\"field field--name-created field--type-created field--label-hidden\">Thu, 12\/15\/2022 &#8211; 03:00<\/span><\/p>\n<div class=\"clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item\">\n<p>Far2l is a port of the Windows text-based file manager <strong>Far<\/strong>. And to be clear, that&#8217;s a lower-case <strong>L<\/strong> (as in &#8220;Linux&#8221;) not a number<strong> 1<\/strong>. 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.<\/p>\n<h2>Install far2l<\/h2>\n<p>Far2l is currently in beta, so you&#8217;re unlikely to find it in your Linux distribution&#8217;s software repository. However, you can <a href=\"https:\/\/opensource.com\/article\/21\/11\/compiling-code\">compile it from source<\/a> by downloading cloning its <a href=\"https:\/\/github.com\/elfmz\/far2l\">Git repository<\/a>:<\/p>\n<pre class=\"highlight\">\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">git clone<\/span> <span class=\"re5\">--depth<\/span> <span class=\"nu0\">1<\/span> https:<span class=\"sy0\">\/\/<\/span>github.com<span class=\"sy0\">\/<\/span>elfmz<span class=\"sy0\">\/<\/span>far2l.git<\/code><\/span><\/pre>\n<p>You can browse through the source code to see all of its different components. The main source files are in <code>utils\/src<\/code>:<\/p>\n<pre class=\"highlight\">\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">SharedResource.cpp<br>\nStackSerializer.cpp<br>\nStringConfig.cpp<br>\nStrPrintf.cpp<br>\nTestPath.cpp<br>\nThreaded.cpp<br>\nThreadedWorkQueue.cpp<br>\nTimeUtils.cpp<br>\nTTYRawMode.cpp<br>\nutils.cpp<br>\nWideMB.cpp<br>\nZombieControl.cpp<\/div><\/div><\/pre>\n<p>The file <code>ZombieControl.cpp<\/code> works to <a href=\"https:\/\/www.redhat.com\/sysadmin\/killing-zombies-linux-style\">mitigate a zombie apocalypse<\/a> (at least, in terms of processes), the file <code>ThreadedWorkQueue.cpp<\/code> helps speed processes along by using threading. Far2l isn&#8217;t just built for extensibility, it&#8217;s built responsibly!<\/p>\n<p>Assuming you&#8217;ve already prepared your system for compiling code, as described in the <a href=\"https:\/\/opensource.com\/article\/21\/11\/compiling-code\">compiling from source<\/a> article, you must also install some development libraries required by far2l. On Fedora, CentOS, OpenMandriva, and Mageia, the minimal list is:<\/p>\n<ul>\n<li>\n<p>wxGTK3-devel<\/p>\n<\/li>\n<li>\n<p>spdlog-devel<\/p>\n<\/li>\n<li>\n<p>xerces-c-devel<\/p>\n<\/li>\n<li>\n<p>uchardet-devel (your repository may not have this one, but there&#8217;s a workaround)<\/p>\n<\/li>\n<\/ul>\n<p>On Debian, the minimal list is:<\/p>\n<ul>\n<li>\n<p>libwxgtk3.0-gtk3-dev<\/p>\n<\/li>\n<li>\n<p>libuchardet-dev<\/p>\n<\/li>\n<li>\n<p>libspdlog-dev<\/p>\n<\/li>\n<li>\n<p>libxerces-c-dev<\/p>\n<\/li>\n<\/ul>\n<p>Use <a href=\"https:\/\/opensource.com\/article\/21\/5\/cmake\">CMake<\/a> to prepare the makefiles:<\/p>\n<pre class=\"highlight\">\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">mkdir<\/span> build<br>\n$ <span class=\"kw3\">cd<\/span> <span class=\"sy0\">!<\/span>$<br>\n$ cmake .. <span class=\"re5\">-DUSEUCD<\/span>=no<\/div><\/div><\/pre>\n<p>The <code>-DUSECD=no<\/code> option is required only if you don&#8217;t have the development libraries for <code>chardet<\/code> installed. If you do, then you can omit that option.<\/p>\n<p>Finally, compile the code and install far2l to a temporary location:<\/p>\n<pre class=\"highlight\">\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">make<\/span> -j$<span class=\"br0\">(<\/span>nproc --all<span class=\"br0\">)<\/span><br>\n$ <span class=\"kw2\">mkdir<\/span> ~<span class=\"sy0\">\/<\/span>far2l<br>\n$ <span class=\"kw2\">make<\/span> <span class=\"kw2\">install<\/span> <span class=\"re2\">DESTDIR<\/span>=~<span class=\"sy0\">\/<\/span>far2l<\/div><\/div><\/pre>\n<p>If you prefer to install it to your system instead of to a temporary directory, then omit the <code>DESTDIR=~\/far2l<\/code> option.<\/p>\n<p>To launch far2l, invoke the binary stored in the <code>bin<\/code> subdirectory of your install path. For instance:<\/p>\n<pre class=\"highlight\">\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span>~<span class=\"sy0\">\/<\/span>far2l<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>far2l<\/code><\/span><\/pre>\n<h2>Using far2l<\/h2>\n<p>When you first launch far2l, it creates a configuration directory in <code>~\/.config<\/code> and prompts you to choose what font you&#8217;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.<\/p>\n<p>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 <strong>Left<\/strong> and <strong>Right<\/strong> arrows to change from one column to the other.<\/p>\n<p>In the right column, you can also use the <strong>Right<\/strong> arrow to move &#8220;down&#8221; the list of files by one screen. In the left column, use the <strong>Left<\/strong> arrow to move &#8220;up&#8221; the list of files by one screen.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/12\/far2l.filemanager.png\" width=\"1107\" height=\"658\" alt=\"Image of \u200bthe far2l file manager.\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Seth Kenlon, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>This navigation takes some getting used to, especially if you&#8217;re used to terminal file managers that only use the <strong>Right<\/strong> arrow to descend into a directory. However, once you get used to far2l&#8217;s navigation, you&#8217;re likely to appreciate the added speed you gain from this simple pagination.<\/p>\n<\/p>\n<div class=\"embedded-resource-list callout-float-right\">\n<div class=\"field field--name-title field--type-string field--label-hidden field__item\">More Linux resources<\/div>\n<div class=\"field field--name-links field--type-link field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/developers.redhat.com\/cheat-sheets\/linux-commands-cheat-sheet\/?intcmp=70160000000h1jYAAQ\">Linux commands cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/developers.redhat.com\/cheat-sheets\/advanced-linux-commands\/?intcmp=70160000000h1jYAAQ\">Advanced Linux commands cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/services\/training\/rh024-red-hat-linux-technical-overview?intcmp=70160000000h1jYAAQ\">Free online course: RHEL technical overview<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/cheat-sheet-networking?intcmp=70160000000h1jYAAQ\">Linux networking cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/cheat-sheet-selinux?intcmp=70160000000h1jYAAQ\">SELinux cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/linux-common-commands-cheat-sheet?intcmp=70160000000h1jYAAQ\">Linux common commands cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/resources\/what-are-linux-containers?intcmp=70160000000h1jYAAQ\">What are Linux containers?<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/linux?intcmp=70160000000h1jYAAQ\">Our latest Linux articles<\/a><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<h2>Open a file or folder<\/h2>\n<p>To open a folder, select a folder in your file list and press the <strong>Return<\/strong> key. This causes the active panel to change to a view of that directory. The inactive panel doesn&#8217;t change, so it&#8217;s not uncommon for far2l to always be showing two different directories at the same time. That&#8217;s a feature of the two-panel file manager design, although it can take some getting used to if you&#8217;re not in the habit of splitting windows.<\/p>\n<p>After you&#8217;ve moved into a directory, you can move back into its parent folder by selecting the double dots (<code>..<\/code>) at the top of the file listing and pressing <strong>Return<\/strong>.<\/p>\n<p>To open a file, select a folder in your file list and press the <strong>Return<\/strong> key. The file opens according to your desktop&#8217;s mimetype preferences.<\/p>\n<h2>Panel and window navigation<\/h2>\n<p>To move from one panel to another, press the <strong>Tab<\/strong> key.<\/p>\n<p>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&#8217;s gone, press <strong>Ctrl+O<\/strong> (that&#8217;s the letter <code>O<\/code> not the digit zero).<\/p>\n<p>You can also adjust how much of your terminal the file panels take up. Press <strong>Ctrl+Up<\/strong> and <strong>Ctrl+Down<\/strong> to adjust the vertical size of the file panels.<\/p>\n<p>Make no mistake, though, you&#8217;re not just suspending far2l when you access the terminal underneath. This isn&#8217;t your usual terminal, it&#8217;s a far2l terminal that interacts with the file manager and adds a few features to your standard terminal experience. For example, the <a href=\"https:\/\/www.redhat.com\/sysadmin\/linux-find-command\" target=\"_blank\" rel=\"noopener\"><code>find<\/code> command<\/a>\u00a0gains graphical auto-completion.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/12\/far2l-popup.png\" width=\"984\" height=\"753\" alt=\"Image of \u200bfar2l responsive terminal. \"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Seth Kenlon, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<h2>Copying and moving files<\/h2>\n<p>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.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/12\/far2l-move-options.png\" width=\"792\" height=\"398\" alt=\"Image of far21 move options.\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Seth Kenlon, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<h2>Exiting far2l<\/h2>\n<p>To close far2l, type <code>exit far<\/code> into the command prompt at the bottom of the far2l window.<\/p>\n<h2>Far out<\/h2>\n<p>Far2l is a dynamic and responsive text-based file manager. If you&#8217;re a fan of classic two-panel file managers, then you&#8217;ll feel at home with far2l. Far2l provides an interesting and novel interpretation of a terminal, and if you don&#8217;t try far2l for its two-panel file management, you should at least try it for its terminal.<\/p>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-field-article-subhead field--type-text-long field--label-hidden field__item\">\n<p>Far2l runs in the Linux terminal and is designed around a plug-in structure, enabling compatibility with SSH, WebDAV, NFS, and more.<\/p>\n<\/div>\n<div class=\"field field--name-field-lead-image field--type-entity-reference field--label-hidden field__item\">\n<article class=\"media media--type-image media--view-mode-caption\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/12\/yearbook-haff-rx-linux-file-lead_0.png\" width=\"520\" height=\"292\" alt=\"\ufeffWhy the operating system matters even more in 2017\" title=\"\ufeffWhy the operating system matters even more in 2017\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0<\/p>\n<\/div>\n<\/article>\n<\/div>\n<div class=\"field field--name-field-tags field--type-entity-reference field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/linux\" hreflang=\"en\">Linux<\/a><\/div>\n<\/p><\/div>\n<div class=\"hidden field field--name-field-listicle-title field--type-string field--label-hidden field__item\">What to read next<\/div>\n<div class=\"field field--name-field-default-license field--type-list-string field--label-hidden field__item\"><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><br \/>\n        <img decoding=\"async\" alt=\"Creative Commons License\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/12\/cc-by-sa--28.png\" title=\"This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.\"><\/a>This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.<\/div>\n<section class=\"field field--name-field-comments field--type-comment field--label-hidden comment-wrapper\">\n<div class=\"comments__count\">\n<div class=\"login\"><a href=\"https:\/\/opensource.com\/user\/register?absolute=1\">Register<\/a> or <a href=\"https:\/\/opensource.com\/user\/login?destination=\/feed&amp;absolute=1\">Login<\/a> to post a comment.<\/div>\n<\/p><\/div>\n<\/section>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\" rel=\"noopener\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enjoy two-panel file management on Linux with far2l Seth Kenlon Thu, 12\/15\/2022 &#8211; 03:00 Far2l is a port of the Windows text-based file manager Far. And to be clear, that&#8217;s a lower-case L (as in &#8220;Linux&#8221;) not a number 1. It runs in the terminal and is designed around a plug-in structure, enabling compatibility with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":69490,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-69489","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/69489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69489"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/69489\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/69490"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}