All posts by PCMan

PCManFM Qt 0.1.0 released

Hello world,
I just released PCManFM Qt file manager 0.1.0, the first Qt port of PCManFM.
The tarball is available for download from our project page.
You’ll need libfm to build it (which is included in many distros).
P.S. When running the program for the first time, please choose an icon theme from the [Edit] / [Preferences] menu. Otherwise you’ll get no file icons.
If you install the program into /usr/local, don’t forget to run “ldconfig” after installation, or libfm-qt won’t be correctly loaded by the loader.
This release contains no thumbnail support yet.
However a fully working thumbnail support is already in the git.
Because this requires some changes to the upstream libfm library,
it’s scheduled for the next release and not make public at the moment.
To turn on the desktop icon management feature, run with the command:
> pcmanfm-qt –desktop
Generally it’s a good idea to add this command to your session startup script.
To turn the desktop icon manager off again, do this:
> pcmanfm-qt –desktop-off
If you don’t want to use the desktop icons, you can still add the
command to your session startup script:
> pcmanfm-qt –daemon
In this way, it will becomes a background daemon. Every time you need
to open a folder with pcmanfm-qt, it can be shown “immediately”.
BTW, please don’t mail me and ask if PCManFM will shift to Qt.
The Gtk+ and Qt versions will coexist.
There will still be new releases for the Gtk+ version in the future.
The Qt port is only an alternative, not a replacement.
Thank you!
I, however, need to admit that working with Qt/C++ is much more pleasant and productive than messing with C/GObject/GTK+.
Since GTK+ 3 breaks backward compatibility a lot and it becomes more memory hungry and slower, I don’t see much advantage of GTK+ now. GTK+ 2 is lighter, but it’s no longer true for GTK+ 3. Ironically, fixing all of the broken compatibility is even harder than porting to Qt in some cases (PCManFM IMO is one of them).
So If someone is starting a whole new project and is thinking about what GUI toolkit to use, personally I might recommend Qt if you’re not targeting Gnome 3.
Update 2013-03-27:
I got some feedback about the toolkit choice above. Don’t get me wrong. I’m not saying that gtk+ is bad and did not intend to start a toolkit flame war. If you’re going to use python, C#, or other scripting language, gtk+ is still a good choice due to its mature language bindings.
Vala  is attractive initially, but after trying it in real development, you’ll see the shortcomings of this approach. Because it sometimes generates incorrect C code that still compiles, we got some really hard-to-find bugs. So we need to examine the generated C code to make sure it does things right. This takes much more time than just writing plain C code myself. Besides, the generated C code is not quite human-readable and debugging becomes a problem. Another issue that’ll hit you is the problems in the library bindings. Though there exists many vala bindings for various C library, their quality is uncertain. Finally, debugging, examing, and fixing the bindings all the time takes even more time and offsets the time saved by using Vala.
To sum up, for compiled binary programs, Qt IMHO is a good choice to consider if you don’t hate C++.

PCManFM Qt port is 85% finished now!

A picture is worth a thousands words so again let’s see the screenshot first.

PCManFM Qt with desktop manager turned on

This is the Qt port of PCManFM with desktop management feature turned on. The desktop icons and the wallpaper were painted by PCManFM-Qt, just like the gtk+ version of the original PCManFM. The new Qt port is in a pretty good shape now.
Although it’s not yet ready for production use, it’s almost there. About 85% of the planned features are finished.

What already works:
  1. Nearly all folder browsing features
  2. Change icon theme
  3. Preferences dialog (most options work)
  4. Load/save settings
  5. Single instance + dbus service
  6. Command line options
  7. Desktop icon manager: enable with “pcmanfm-qt –desktop”. You can add “pcmanfm-qt –desktop” to the startup script of your desktop environment/window manager.
  8. Change wallpapers via “Desktop Preferences” dialog
  9. Mount remote filesystems and removable devices (requires gvfs)
  10. Split into pcmanfm-qt and libfm-qt library.
  11. Install libfm-qt header files to /usr/includ/libfm-qt along with a pkgconfig file, so later libfm-qt can be used in other Qt programs
  12. Most file operations, move/copy/symlink/trash/rename, change file attributes in the file properties dialog.
  13. Basic drag and drop support (very basic)

Things which do not work or are still work in progress:

  1. Create new folders/files
  2. Edit bookmarks
  3. Auto-mount/auto-run for removable devices
  4. No thumbnail support yet. (This may require some changes of the upstream libfm library)
  5. No ABI version (libtool soname not set yet)
  6. No translations yet (Qt Linguist and the *.ts files are hard to work with and lack features I need, I consider using GNU gettext instead)
Also noted that the git repository is now moved to:
The original libfm-qt repo will be removed later.
The binary program pcmanfm-qt and the library are bundled in the same package.
Please help test and give some comments.
If anyone is interested in helping the development, patches are welcomed.
Thank you!

PCManFM file manager is ported to Qt?

No, LXDE will NOT use Qt. Don’t panic!!
It’s just one of my side projects and was an experiment to test how good libfm and Qt are. Since the core library of PCManFM, libfm, is carefully separated from its Gtk+ UI code, theoratically it can be ported to other GUI toolkits. To give it  a test, I played with Qt recently. The result is quite satisfactory and impressive. I must admit that working with Qt is quite pleasant.

Everybody loves screenshots so here is one.

At first glance, this looks like the original GTK+ version very much. Because I choose “Cleanlook” Qt style, it highly resembles Gtk+ “Clearlooks” theme. Besides, I load the “elementary” icon theme. Though it matches the looks and feels of typical Gnome/Gtk+ programs, this is an 100% pure Qt program.

The most interesting and unique part of the PCManFM Qt port are:

  1. No KDE dependency. Really, it’s a lightweight pure Qt4 program.
  2. Almost as fast as the original Gtk+ version. I have not taken any time to do optimization yet. It’s possible to make it faster after optimization.
  3. Uses Libfm + glib/gio, and supports gvfs. So you can mount remote filesystems.
  4. Source code is clean and short, written in C++.
  5. Desktop independent, do not depend on any specific desktop environment (although it uses glib/gio/gvfs, it does not require Gnome)
  6. Built with cmake. No more autotools.
  7. Later, when the APIs becomes stable, I’ll make it two parts, PCManFM main binary and libfm-Qt, which can be used in other pure Qt programs.

For decades, people from the Gnome/Gtk+ camp and the KDE/Qt camp don’t work each other sometimes. Each of them likes to reinvent the wheel and create functionally equivalent programs with different toolkits. The fact is, technology from both camps can be mixed very well. Qt-based UI sit on top of low level platform APIs from Gnome stack is another good option.

PCManFM Qt, when finished, will be a perfect mix of Gnome libraries + Qt-based UI.  I think it’s a good news for who like Qt but don’t want to install KDE.

The source code is available here:
git clone git://

It’s still a work in progress and many parts don’t work yet.
If you’re a Qt developer and is interested in helping the development, feel free to contact me.

P.S. Special thanks to KDE developers Aaron Seigo and Will Stephenson. I met them last year during an open source event “COSCUP 2012” in Taipei, Taiwan. They gave some instructions about how to use Qt. Then, I finished the basic skeleton of this port at that night.

Call for review: PCManFM is almost ready for a new release

I’m here to call for a review for PCManFM as the source code in git isin quite good shape now.Many known bugs are fixed and I did much refactor to the tabbedbrowsing part and merge changes in tab-rework3 branch with master.Please help test and update translations in various distros. If things are ok, I propose a new release.

Some major changes:

  1. “Reload Folder” is available now in View menu.
  2. “Directory Tree” mode is available in side pane.
  3. Filesystem size is updated in a more correctly and efficient way.
  4. Many bugs causing crashes are fixed.
  5. Shows a warning icon in toolbar when running as “root”.
  6. Supports menu keys.

Minor changes:

  1. Fixed some memory leaks.
  2. ~ and / to move focus to location bar
  3. Improve internal structure of PCManFM.
  4. Code cleanup.

A new release as 0.9.9 is required. Please help review and test the code in git.Thanks a lot!

Directory tree is now available in PCManFM!

Everybody loves screenshot!

Directory tree in side pane was a feature in PCManFM 0.5 series, but it’s not yet implemented in the latest rewrite. Yesterday, I finished the rewrite for directory tree and added it to PCManFM. This new feature is now availble in git repository. I also added a drop-down menu to side pane to swtich between different kind of side panes. Currently there are only “Places” and “Directory Tree”. Later I plan to add more modes.

I also reworked the tabbed browsing part yesterday. Due to the limitations of GTK+, I did some dirty hacks for it to reduce resource usage. This comes at the price of less readable source code, though. After the tab-browsing rework, I fixed an old bug causing incorrect and outdated info shown in status bar so now the info in status bar is up-to-date most of the times.  Later, I’ll try to add a “Reload” button so remote filesystems without notifications on changes can be refreshed manually.

To test the latest features, grab the source code from git.

You have to install libfm first:
This is the supporting library required by PCManFM.

Then install pcmanfm. Notice that the new feature is in "tab-rework" branch, not in "master"

If you don’t know how to compile libfm/pcmanfm from source code, read this:

Now, it’s time to fix the remaining bugs in the bug tracker and keep heading for 1.0 release.

Finally, Directory Tree is Back!

A picture is worth a thousand words.

Directory tree demo

The directory tree is not yet added to PCManFM itself. This screenshot is the demo program included in libfm. A very primitive directory tree is finished. Later I’ll add this to PCManFM.

Many people are curious about this feature since it used to be available in old PCManFM 0.5 series, but why it’s not implemented in the new series?

  1. We want a better one which supports asynchronous I/O and does not block the UI.
  2. It supports gio. So later we may add remote filesystem supports to it.
  3. It might run faster than the old one
  4. The source code is cleaner and more well-structured
  5. The “<Empty>” items look weird and less elegant, but detecting whether a folder contains sub folders and keeping all the nodes updated in real time requires much more resources since you have monitor all of them one by one. On Linux it’s not an issue since inotify supports monioring of tons of files. On other POSIX systems, this can potentially use up all file descriptors available to a process. So, finally I do it like this way.

Please, stay tuned. I’ll put this in PCManFM soon.

Status Update for the File Manager

OK, it’s time to tell the world what we’re doing to the file manager Here is a status report for PCManFM.

  1. Several bugs are fixed, and others are not. I’m currently working on fixing them.
  2. Directory tree will be available from side pane again in next release. I have finished 50% of the feature and hope that I can make it in the following weeks
  3. Tabs now takes less space when showing filenames that are too long.
  4. The location bar is re-written. Now auto-completion for directory paths works more correctly.
  5. I have implemented a simple button-style path bar recently, but to add it to PCManFM, some changes to the UI are needed so this might not be available yet in the next release.
  6. Integration with lxshortcut is planned. So you can create new application shortcut on the desktop easier, but this is not yet implemented.
  7. Status messages are now more correct and human readable.
  8. Some code cleanup was done to make the source code more readable to future contributors.
  9. While fixing bugs of PCManFM, I found a severe bug in udisks regarding to CD-ROM polling. This bug leaves the filesystem on CD-ROM mounted even after the media has been removed via pressing physical eject button on the device. I made a patch for it, but upstream authors did not accept the patch. They came up with a new solution utilizing the latest in-kernel polling provided by Linux kernel and did some fixes themselves. So in the near future, this bug will be resolved anyways.

So these are basically what I’m doing on the file manager recently. Please help if you can. Thanks a lot.

Desktop icons are now freely movable!

I just merged the latest movable desktop icon support to master branch.
So now it’s available in git repository. If you’re installing from git you’ll get it.

There are still some usability issues, but it mostly works quite well.
After two years, finally we have movable desktop icons. Really thank you all for the patience.

To test the latest source code and help debug, please follow this guide:


Desktop icons of PCManFM becomes movable!

I just did very primitive partial support for moving desktop icons.
Let’s see a screenshot.
Now the position of icons can be saved and restored, but there are sitll some bugs. As a proof of concept, however, it works already.
For the interested, the source code is in “move_icon” branch of our git repo.
So the desktop icons will become movable in version 0.9.8, finally.
Now PCManFM is much closer to a final stable release. This can become one of the best lightweight file manager ever. If you’re a programmer who is familiar with C language and GTK+ and want to help, please contact me. Help is needed! Or if you’re not coders but still want to contribute, my PayPal account is “”. (Special thanks to Mihai Militaru and Seth Smar who did donations to support the development!)