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
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.