A twin-panel file manager based on Python 3/GTK3
Double Flower
Following in the footsteps of Norton Commander and its clones, the Sunflower twin-panel file manager takes a giant leap forward with a switch to Python 3 and GTK3.
Some programs, such as Netscape, Adobe Photoshop, and Microsoft Office, set the benchmark for future products. For file managers, the discontinued Norton Commander paved the way to easier copying, moving, and editing files at the MS-DOS command line. Norton Commander's view, which was divided into two halves (hence the umbrella term "twin-pane file manager") let users select files from a directory list in one pane by pressing Insert and then transfer them to the directory opened in the other pane by pressing F8.
Norton Commander quickly spawned numerous clones, including Total Commander [1], Midnight Commander [2], Gnome Commander [3], PCManFM [4], and Krusader [5], as well as several other candidates. One of the classics, the graphical Sunflower [6] file manager, has been under continuous development for many years. With version 0.4, the project has switched to Python 3 and GTK3, a radical change that cost the project a great deal of time, which explains the four years between versions. Sunflower 0.4 offers an easy-to-use, highly customizable twin-pane file manager that integrates seamlessly with (but is not limited to) the Gnome desktop.
Installation
Sunflower is not available in the package sources of most popular distributions. But Arch Linux users will find two packages, sunflower and sunflower-git, in the Arch User Repository (AUR) organized by the community. With an AUR helper like Yay, you can install the program by typing:
yay -S sunflower
For other distributions, the Sunflower project offers deb and RPM installation packages, including ones for Debian, Ubuntu, and Fedora [7]. In testing, the installation worked without problems on Ubuntu 20.04 LTS and Fedora 32.
After launching, Sunflower offers a typical twin-pane file manager window (Figure 1). On both sides, you will find your home directory's contents. With a mouse click, you can navigate through the folder structure, or you can open files in the associated applications by double clicking. To launch a selected file with a different program, right-click to open the context menu and select Open with. In the menu, you will also find the usual functions for creating folders or files, functions for file operations, and options for changing the file permissions or associations (via Properties).
Operations
In the file list, you can use the mouse or the keyboard to navigate. Use the Up and Down Arrow keys to select an entry. In the usual style for Commander clones, you can reverse the selection of a file or folder by pressing Insert. Alternatively, hold down the Shift key and use the Up and Down Arrow keys to highlight a selection.
The Right Arrow key expands the folders' contents in a tree view, while the Left Arrow key collapses the tree. Clicking on Mounts takes you directly to your home directory or to mounted external drives like USB memory sticks or Android smartphones.
Choosing Selection from the hamburger menu in the window's upper right corner gives you further possibilities for selecting files or folders, including selecting or deselecting files according to a pattern or their file extension. Compare Directories in the same menu is also practical if you want to synchronize a backup directory. This option selects the files that do not exist in the other opened subwindow, but it ignores files that have just changed.
Use Ctrl+Right Arrow to expand the selected folder on the left in the right pane, while Ctrl+Left Arrow collapses the selected folder. Press Ctrl+T to open the current folder in a new tab, while Ctrl+Shift+T opens the selected folder in a new tab (see Table 1 for additional shortcuts).
Table 1
Sunflower Shortcuts
Abbreviation | Function |
---|---|
File operations |
|
F2 |
Rename selection |
F3 |
View selected element |
F4 |
Edit selected element |
F5 |
Copy selection |
F6 |
Move selection |
F7 |
Create new directory |
Del or F8 |
Move selection to trash |
Actions in file list |
|
Insert |
Invert selection |
Shift+Up Arrow |
Select top element |
Shift+Down Arrow |
Select bottom element |
Ctrl+Right Arrow |
Expand selected folder |
Ctrl+Left Arrow |
Collapse selected folder |
Tabs |
|
Ctrl+T |
Open current folder in new tab |
Ctrl+Shift+T |
Open selected folder in new tab |
Ctrl+Tab |
Move to the next tab |
Ctrl+Shift+Tab |
Switch to previous tab |
Ctrl+W |
Close current tab |
Terminal |
|
Ctrl+Z |
Open current folder in terminal |
Ctrl+Shift+C |
Copy selection in terminal to clipboard |
Ctrl+Shift+V |
Paste content from clipboard to terminal |
The Display menu lets you customize the application window. The Horizontal Split option divides the file manager into two areas arranged one above the other. Dark theme lets you enable your desktop environment's default theme for multimedia applications (Figure 2).
One of Sunflower's strengths lies in the terminal integrated directly in the interface. You can access it by clicking on the terminal icon in the buttonbar above the two panes or with the keyboard shortcut Ctrl+Z (Figure 3). By default, Sunflower uses the VTE terminal library, upon which other terminal applications, such as the Gnome terminal or Terminator, are also based. To adjust the font size and other details, go to Preferences | Terminal in the hamburger menu. Optionally, Sunflower will also launch an external terminal program, but it does not offer a context menu. For example, to insert pathnames, you have to click on the terminal icon and select Insert.
Sunflower offers an integrated preview function for text and source code files (Figure 4). To view a file, select the file in question and click on Preview in the lower menubar or press F3. The preview automatically highlights variables and instructions in the source code. You can also disable this highlighting by clicking on Text in the preview window's header.
To modify a file, select Edit or press F4. Sunflower then opens the selected file in the desktop environment's standard editor. You can optionally choose a different editor in the settings in View & Edit or enter an external command.
Conclusions and Outlook
The switch to Python 3 and GTK3 sets Sunflower on course for the future. With version 0.4, it is now far easier to develop the application and expand the range of functions. In testing version 0.4, I found a few areas still under construction. For example, selecting plugins for finding or renaming files results in an error message that tells you to enable a plugin – but a plugin with the stated name does not exist.
Sunflower still needs to do a bit of catching up in terms of network support. While other file managers, such as Gnome Files (formerly Nautilus) or KDE's Dolphin mount network shares directly via a URL such as smb://<User>@<Server>
or ssh://<User>@<Server>
, Sunflower completely lacks this function. Network drives can only be accessed if they have previously been permanently mounted in the folder structure or integrated into Nautilus. Afterwards, the contents can be viewed via the corresponding mount point or, in the case of Gnome's GVfs virtual filesystem, in /run/user/<UID>/gvfs
.
Infos
- Total Commander: https://www.ghisler.com
- Midnight Commander: https://midnight-commander.org
- Gnome Commander: https://gcmd.github.io
- PCManFM: http://pcmanfm.sourceforge.net
- Krusader: https://krusader.org
- Sunflower: https://sunflower-fm.org
- Download packages: https://sunflower-fm.org/download
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.