IgnorantGuru's Blog

Linux software, news, and tips

SpaceFM Development Notes

Some development notes on SpaceFM for those who are interested…

My blog has been littered with a lot of GNOME and GTK complaints, rants about corporate development, and other problems affecting Linux lately. The simple reason for this is that I’ve been bringing myself up to speed on these issues and sharing the results in the process. This blog is my workspace as well as a place to network and publish, so thanks for all the comments and input.

SpaceFM has a certain momentum now, based on the number of users and the amount of work that has gone into it. It’s a bit like piloting a large boat – fast changes are discouraged and impractical in terms of stability and the work such changes create, so one tends to look and plan ahead a bit. And SpaceFM is intended to be an ark in the storm – something which allows me or you to distro hop and change DEs and WMs while still having the file manager and its customizable tools be consistent and functional. It’s designed to survive and work in a variety of environments meeting its minimum, and fairly light requirements. It doesn’t get too involved in or dependent on the ecosystem around it, sticking to core compatibility via CLI programs and direct kernel access.

GUI programming is particularly time consuming, which is why app developers are particularly sensitive to toolkit evoluton, changes and breakage. As I’ve made clear, I don’t trust who is controlling GTK development or the directions it’s taking, so SpaceFM’s use of GTK has become a liability, less so now, but potentially greatly in the future. So I’m pondering what direction to take through this sea of Linux icebergs, which have sunk other lightweight apps already, or destined them to bugs and crashes.

SpaceFM was forked from PCManFM, rather than written from scratch, to give GTK a good test without commiting a complete rewrite to it. So in that sense the growing sense of failure in GTK represents a success of that strategy. I knew that I didn’t know any GUI toolkit well enough to make a long-term decision on it.

No decision on this yet – this is why I’ve been examining Red Hat’s and others’ motives and agendas so carefully, and trying to understand what is happening in lower levels of Linux like udev, udisks, and systemd as well. I want to take a path with SpaceFM that basically doesn’t waste a huge amount of work, and doesn’t create an app that performs badly.

I’m not sure what SpaceFM’s future is, but there are a few key positions I take. Backwards and forwards compatibility are a very high priority. How often has your SpaceFM config been borked? Hopefully not once. In developing and testing it I crash it hundreds of times, run assorted old and new versions using the same config file, and my config has survived all of this, and I’m still using the same config file that I started several months before SpaceFM’s initial alpha test release! While problems can always occur, the configuration is built to keep things working between crashes, upgrades, and downgrades.

SpaceFM depends directly on bash, rather than just a general shell, so that custom commands and plugins are running in a well-defined, consistent environment. You can always use other kinds of script in SpaceFM, but the initial data integration is done with true bash.

SpaceFM Dialog, a built-in feature of SpaceFM which allows custom commands to integrate dialogs into it (along the lines of zenity or yad), is also designed to have a predictable usage. Same for the socket commands which allow you to tap into and alter the GUI as its running.

So overall, while SpaceFM may grow, or even its GUI toolkit or other key components may someday change, the goal is to provide a continuity to the user experience, and to honor the customizations the user has added. One big reason for this is that I am one of those users, and I don’t like having my stuff broken!

I have become something of a distro hopper lately. Just as I’m not particularly happy with some of the limitations in the Linux tools available for stable, flexible development, I’m also not entirely happy with any distro I’ve tried thus far, from a user perspective. So I want to be flexible and surf on the changing waves of Linux, rather than nesting in a particular distro, DE, or set of libraries. During these days of Linux ‘climate change’, it seems wise to stay mobile, with a somewhat independent and self-sufficient set of tools which are resistant to breakage and which don’t constantly change your way of working.

Having a file manager with a configuration which is largely independent of the larger system configuration is valuable in this mobility. Having custom tools to maintain the system and perform other tasks, and having those tools available and working consistently as I change other components is also key. For me the file manager/desktop manager is a central point of access to the system and its functionality. Most of everything else is an app being spawned to do a particular job such as edit a file, watch a video, etc., or an app which adds a panel or other workspace tool or ornament.

Beneath this, these are the days of changing udev and udisks, consolekit, and all the incumbant problems they are creating with careless, lazy migration. Being able to alter the mount solution used in SpaceFM, and being able to use command line programs for that functionality, makes SpaceFM very adaptable. Users are beginning to ask that other file managers provide similar flexibility, although this will be tough to implement for those that depend on APIs and monolithic libraries for this.

Many DEs encourage you to use their file manager and desktop manager. Yet this means if you change DEs or distros, even to just try others, you may lose your ‘home base’ and associated tools, or they may change in various ways (differing incompatible versions, etc). Whenever I install a new distro I always feel lost until I have my file manager up and running as I want, along with my file type associations. bash – the old-fashioned ‘shell’ – is always there in a similar manner. I know how to get some stuff done in bash even if the distro or DE or available tools have changed.

So in that sense I think of SpaceFM as a spacecraft – out there exploring the Linux galaxy, while providing some of the comforts of the familiar and highly functional. A space oddessy (let’s just be glad HAL is no longer with us! Then again, udev…)

Although not having a lot of free dev time lately, I’ve also been taking a little break from SpaceFM development proper to work on a burning plugin. This will present a quick and dirty dialog for burning data discs initially. It interfaces with the GUI a bit to make composing the disc contents easy, and it runs cdrecord, cdrskin, or other CLI burning programs directly, allowing you to edit the command easily if the graphical interface doesn’t suffice. So far it’s going very well, and its developmemt gave me a chance to try some of SpaceFM’s new dialog and socket features – nothing like using an API in a real situation. It also revealed a few problems in SpaceFM in the process.

The biggest challenge there was getting the burning programs to cooperate with the shell and pipes in any reasonable manner. After some very helpful consultation with Thomas Schmitt, author of the libburn-based cdrskin and xorriso, and OmegaPhil, a long-time contributor to SpaceFM in various capacities ‘behind the scenes’, we came up with some solutions and most of those issues are resolved. Still some work to go on finishing up the intended functionality and getting it polished, but I hope to include an initial version within the next release or two. This won’t make SpaceFM a do-everything burning app ootb, but it will provide a handy tool for burning a disc quickly which can be extended in unlimited ways.

December 10, 2012 - Posted by | Software


  1. thx for the update, always very happy when a blog post of yours pops up in greader, great and insightful read as always!
    keep on your great work on spaceFM!


    Comment by Anonymous | December 10, 2012

  2. talking of udisks and its related functionality,permission to introduce myself. i am a developer of a project called zuluCrypt. The url to the project page is at http://code.google.com/p/zulucrypt/

    The component of the project that maybe of interest to you is zuluMount.The other component is zuluCrypt.This component deals with giving a GUI front end to most cryptsetup functionality relevant to desktop use.

    The zuluMount component is meant to act as a replacement for tools like udisks.All it does is mount and unmount partitions including those in encrypted containers.The GUI is an optional component written in Qt/C++ but the backend is written in C with dependencies only in libmount,libblkid and libcryptsetup.

    The backend can mount file systems residing in files( like iso image files or encrypted containers residing in files) as well as partitions.
    It can mount cryptsetup luks volumes,cryptsetup plain volumes as well as truecrypt volumes if git versions of both cryptsetup and zuluMount are used since truecrypt support is not in release versions of both projects.

    The zuluMount backend, as it is written in C and with very little dependencies may fit well in your file manager or any other light system.

    I read your blog and i remember you writing about udevil not supporting encrypted volumes because you dont know how to work with them.I will be more than happy to give any assistance you may ask of me when you come around to add support to encrypted volumes in udevil. All in the interest of making free software more usable to more people more comfortably.

    Comment by mhogomchungu | December 10, 2012

    • Hi, thanks for letting me know about your zuluCrypt project. I looked over your site and it looks like a great independent solution – nice job avoiding polkit and all those inherent problems, as well as other large, frequently-breaking deps.

      It looks likes zuluCrypt can already be easily integrated into SpaceFM via some custom commands. It looks like it would be suitable for udevil integration if I decide to add that at some point, but as your mount solution runs suid there really isn’t any need for udevil to be involved. It looks like your tools are self-sufficient and ready for integration at the non-root level.

      For starters, I’ll add a link to this on some of the spacefm/udevil materials shortly – maybe someone will create an initial spacefm plugin for it to get things started. And I’ll certainly keep it in mind for integration into the fm. I leave a lot of that to users and plugin creators – I made spacefm extensible because I can’t code all the possible uses myself – but there might also be some opportunities here for spacefm to work with encrypted volumes ootb, which as you say improves usability.

      Comment by IgnorantGuru | December 11, 2012

      • I looked at spacefm closely on how it mounts/unmounts devices and it looks like it has a list of binary executables it checks and call at runtime to do the mounting/unmounting and a user can add their own preferred tool if its not in the shipped list.This is a very nice design as it allows users to choose their preferred tools practically “on the fly”.

        This means a user can already just add zuluMount to the list and start using it to mount unencrypted partitions. zuluMount will probably need to create a gtk based GUI window to get a password when asked to open an encrypted volume.

        zuluMount/zuluCrypt uses a plugin architecture to allow additional ways to get keys from users and a gtk based GUI plugin to get the key should be all it takes to get full support for encrypted volumes in spacefm or any other gtk based GUI tools.

        Comment by mhogomchungu | December 11, 2012

        • just added a plugin called keydialog-qt to generate a Qt based dialog asking for a password to open an encrypted volume.Ideally,since this is a gtk app, a dialog to generate would be a gtk one but i dont know anything about gtk GUI development.

          With git code,the custom command to use in spacefm to mount volumes should be “zuluMount-cli -m -d %v -G keydialog-qt”

          If the volume is encrypted, a Qt dialog will pop us asking for a password.A gtk plugin called “keydialog-gtk” will follow when/if i manage to generate anything in gtk.

          The unmount custom command is “zuluMount-cli -u -d %v”

          The spacefm currently does not seem to notice when an encrypted volume is opened using zuluMount-cli and hence nothing happen in the UI to indicate the mount was successful and hence the device still appear to be unmounted. This reveals a bug in your program since unmounting still works even though the device is indicated as being unmounted.

          Comment by mhogomchungu | December 11, 2012

          • SpaceFM’s Mount Command is used for all devices, so if you wanted to tap into that, you’d probably want to write a script which handles the encrypted volumes with zulucrypt, and passes normal volumes on to udevil, etc. IOW the configured mount command must be able to handle all device mounts.

            The better way to approach this might be to add a command to the right-click menu for devices (you can add custom commands in most menus of spacefm by right-clicking on the menu). This way a user can right-click on an encrypted volume and select zuluMount, etc. Or, if the command is installed to the Plugins menu, it gains root protection, which may be advisable from a security perspective for this.

            Also note that SpaceFM Dialog can be used to create quick GTK dialogs, including a password box.

            I’ve made a note of the lack of detection on encrypted mounts. That’s not an area I’ve addressed at all yet, so I’m not sure of the behavior. Spacefm doesn’t detect mounts made below the root of the filesystem for one thing – this may change as it affects smb for one thing. Or the relevant line from /proc/self/mountinfo would be helpful to determine why its not detected. Otherwise I’ll try this out when I have a chance to do some testing. May be awhile just to warn you, but I think some support for this would make a nice addition overall – if it detects the mount properly then most of the rest can be done via plugins. Also, perhaps the zulu tools could be added to the built-in list of mount solutions. It could also run the command in a terminal for the password – that’s how spacefm typically handles passwords in external programs.

            Thanks for the input! I’m glad to see there’s such a well-developed set of tools for this already.

            Comment by IgnorantGuru | December 11, 2012

            • “SpaceFM’s Mount Command is used for all devices, so if you wanted to tap into that, you’d probably want to write a script which handles the encrypted volumes with zulucrypt, and passes normal volumes on to udevil, etc. IOW the configured mount command must be able to handle all device mounts.”

              zuluMount-cli handles all devices.
              You give it a device with a luks volume and it will open and mount it,after it asked and got the password.
              You give it a device with a plain volume and it will open and mount it,after it asked and got a password.
              You give it a device with a truecrypt volume and it will open and mount it,after it asked and got a password.( currently,give versions required)
              You give it a path to a regular file with any of the three above and it will open and mount it,after it asked and got the password.
              You give a regular partition residing in a file or a partition and it will mount it.
              You give it an iso image in a file and it will mount it.
              You give it a path to a cdrom with a cd or dvd and it will mount it.
              Whatever it is,if it can be reached with a file system path and it has a file system,zuluMount-cli should be able to mount it and hence it can sufficiently be used to in all cases as far as devices are concerned.

              i will have to look at how other tools that need passwords work to see if i need to change anything to accommodate your program,but a generic gtk GUI plug in to request for a password on encrypted devices seem like the right way to do it since it will work with your tool and everybody else’s.

              i will have a look at why encrypted volumes are not detected,where would you prefer me to contact you with info of where file manager is failing to detect encrypted mounts?

              Comment by mhogomchungu | December 11, 2012

              • just to add, for clarity, i said previously the custom command to use to mount volumes is “zuluMount-cli -m -d %v -G keydialog-qt”.

                That command will work for both encrypted and unencrypted partitions.

                If zuluMount-cli found the partition is not an encrypted partition,then the “-G” option will not be used,it will be ignored.

                If zuluMount-cli found the partition to be encrypted,it will ask for a key and the “-G” option is a way to give it a key through a plugin architecture it provides.

                This is the right way to do it because the same command works in all cases.

                To run the command on the terminal on encrypted volumes as you suggest implies knowing in advance the device is encrypted and act differently if it is not.Thats not how zuluMount is suppose to work.A user is supposed to just give it a path and let it mount it and then being prompted for a key if zuluMount figure out that the device is encrypted.

                ok,going to see how the works of your hands work at the code level :-)

                Comment by mhogomchungu | December 11, 2012

              • I dropped you an email – thanks.

                IMPORTANT: Dec 11, 2012: For users considering using zuluMount: After reviewing the security protocols used in zuluMount, I cannot recommend it at this time because of some potential exploits and overly liberal policies. If you do use zuluMount, I recommend reviewing the security policies carefully – for the most part the documentation accurately reflects the approach, but some of the implications may not be obvious (not getting into specifics here until the developer has time to address them). Also note that merely installing zuluMount will render many of udevil’s security checks by-passable, in that zuluMount is much more liberal in its mounting policies.

                Nevertheless, this collection of tools look very promising and has managed to avoid some of the more troubling dependencies – thanks to mhogomchungu for introducing them and I look forward to seeing this developed further.

                Comment by IgnorantGuru | December 11, 2012

                • Thats a fair point and thanks for the shoutout,wish we had the discussion not through private emails but in a public forum to discuss our approach to security and default permissions policies and let the public decide whose approach is better or works best for them.

                  As i have written in the email i just wrote to you,your tool also seem to have issues i find serious but you see as “a matter preference”.

                  Anyway,if anybody is interested in my explanations for my decisions.My explanations are at: http://code.google.com/p/zulucrypt/wiki/FAQ

                  An opened bug report to discuss the issues publicly in the interest of increasing community’s knowledge in proper computer security vs convenience will be more appropriate in the future.

                  Comment by mhogomchungu | December 12, 2012

                  • That’s fine I just didn’t know if you wanted the issues published yet. I have added a zulucrypt issue summarizing my concerns. That includes a link to our emails so users can evaluate these issues.

                    Comment by IgnorantGuru | December 12, 2012

                    • Just though i should add here for completeness sake.I just made a new release,version 4.6.1 to address the concerns that were raised here and in the bug report that was opened as a result of this discussion.Thanks for the effort you put into looking into it.

                      Comment by mhogomchungu | January 22, 2013

  3. the goal is to provide a continuity to the user experience, and to honor the customizations the user has added.

    It’s really appreciated. I never had to modify my custom commands to adapt them to a newer version of SpaceFM. I don’t regret my choice to use SpaceFM as my only file manager.

    Comment by jpfleury | December 11, 2012

  4. Really? a burning plugin? Respectfully, that seems like a solution looking for a problem.

    Comment by Willem | December 11, 2012

    • Actually I’m writing it primarily because I want to use it for my own use. I don’t like the GUI burning apps I’ve seen (pretty much all of them) – I much prefer to use SpaceFM to compose a disc, especially with the added features of the plugin. I have been using my bic script to do the burning previously, but it will be nice to have this functionality integrated into SpaceFM.

      I’m sure most users will prefer full-featured burning apps, but I like this approach, and it also allows you to control burn commands exactly as you like. To me this approach is much easier and flexible.

      Try it out when its available and tell me it isn’t cool – I dare ya. ;)

      Comment by IgnorantGuru | December 11, 2012

  5. Sorry to veer off topic, but you mentioned that you have been distro hopping as of late. Out of curiosity, what distros have you taken a look at? I was wondering what your assessment is of Salix OS (http://www.salixos.org/) or Foresight Linux (http://www.foresightlinux.se/), if you had tried either of those? Though it’s currently alpha quality, DracoLinux (http://code.google.com/p/dracolinux/) looks interesting (as it is a fork of Slackware that uses pkgsrc and OSS).

    Comment by Anonymous | December 12, 2012

    • My last move was from Arch To Aptosid, and at that time I also tried Gentoo and reviewed a few others based on user comments, etc. I hope to do some more hopping – just an issue finding time for it. Salix provides SpaceFM, and Foresight uses SpaceFM as its default FM. I haven’t tried those though. Calculate (Gentoo based) has also come highly recommended. If you read some of the comments to my PPA you can read some additional feedback.

      So I’m not the greatest source of info on this at present, but as I get a chance to try some more I generally publish a review of my experiences. I’m thinking of giving Gentoo another try next.

      Comment by IgnorantGuru | December 12, 2012

  6. This is one of the best posts you’ve made in my opinion :)
    I started using PCManFM-Mod when you first announced it on the pcmanfm forums.(I hated nautilus from the first time I used it) Version 1.24 still runs on a couple of my computers. I’ve just been too lazy to update them to spacefm :)
    You got rid of icons in the menus and I suggested it might be a good idea to have them back again if you remember?

    My whole reason for using spacefm is exactly what you’ve just written in this post. That and the fact that it just works :) Oh and I can keep my system free and pure away from that Gnome dictatorial shit that’s been going on for over ten years now.

    Like you I want my linux system to be what unix was supposed to be. A system of many small apps that specialize in their tasks. Not some monolithic bloated piece of goop that tries to shoe horn you into its way of doing things. This is not linux, it’s not the linux I grew up with and as long as I can, it won’t be the linux the likes of canonical or gnome think it should use. Just look at the mess ubuntu has made to the whole community. I’m also getting the feeling Debain is moving in the same wrong direction. The dependencies on somethings these days are staggering even if installing without recommends. Just try to purge bullshit avahi-daemon grrr! It gets to the point you have to start compiling everything yourself just to get rid of a hundred libraries you’ll never use but have to upgrade every other day. WHATFOR!

    Anyway I feel your pain regarding distro’s, But I’m getting to old for the treadmill. I just want to sit back and relax these days, it’s all got too hard. My software system is getting on 7 years now and is still humming away beautifully, a combination of wheezy/sid/experimental. with the liquorix kernel. And fluxbox just keeps on keeping on :)

    Thanks for the wonderful file manager, I have it backed up and stowed away for that time when the revolution starts. I’ll be one of the first to water the tree of liberty with the blood of garden gnomes :)

    Comment by RawMustard | December 13, 2012

    • Thanks for your feedback. Your name is familiar but I don’t recall removing icons from pcmanfm-mod – jog my memory.

      There are still some users of pcmanfm-mod, as expected. It must be odd for you to go back and forth between the two! jfyi spacefm can be installed alongside pcmanfm-mod, and it should run on your older machines (current version is buildable back to lenny gtk 2.18).

      I agree debian is not improving for the better. The only good news is that they’re slow to change in general. :) And I know how you feel about not wanting to hop around so much. Linux can use more stability and non-breakage. Anymore I view this as a deliberate attack to keep it generally fragmented and to discourage free projects from maturing and overtaking commercial ones. It’s very hard to develop anything stable and useful in Linux now. If you rest 5 minutes it’s broken by rapidly and carelessly changing libraries, etc. Idiots or corporate stooges at the helm of most major components. They’ll see to it that nothing works except their ‘solutions’ – which work in current form only until their next version is released.

      It’s a new Linux. :/

      Comment by IgnorantGuru | December 13, 2012

  7. I like your burning plugin idea. I am also thinking about how many things could be simply done via FM, without all those big programs.
    My wife is a teacher and she have to deal with lots of documents, media conversion, image editing etc. I have done some additional actions in Thunar for her, like Convert to mp3 (using ffmpeg, so flv also can be converted). Burning would be very useful for her also. I have XFCE for her on our laptop, but I am dwm+cli user myself.

    Thunar is there because while using Slackware it’s just working. But I am not satisfied with it (my wife likewise). I am tracking development of SpaceFM a bit for some time now and maybe I will install it in near future.

    For many years I am thinking about writing my own simple FM. I am more on suckless.org side of development paradigm and GTK+ is not an option for my needs. What you and me really want is graphical shell. Your main place to live inside computer, just like traditional shell. Not graphical shell in sense of GNOME3, but something tied to files. Files are data and data is what only matters for users, because they want to have something done.

    I will try to make graphical terminal first. Or maybe some more specific thing like icon view.

    Linux ‘climate change’ is result of loose development IMHO. Everybody watch big guys like Red Hat, Ubuntu or freedesktop.org. They search for direction and they can only notice big entities. What these big guys want is to imitate. They were imitating MS in the past and now they want to be like Apple. I would prefer to be more Unix than Unix ;)

    I am using Linux now only because of hardware support (especially hardware accelerated OpenGL, which I use professionally). If I could put that aside I would use one of BSDs or Plan 9 (it’s great development platform, but without software it’s not suitable for my wife).

    Comment by wh | December 14, 2012

  8. FLTK/Fluid is pretty easy to program and part of most distros.

    Comment by humpty | June 8, 2013

Sorry, the comment form is closed at this time.