IgnorantGuru's Blog

Linux software, news, and tips

SpaceFM 0.7.2

SpaceFM 0.7.2 is available.

New Bash Function
The function spacefm uses to run bash via various su programs and terminals has been redesigned and rewritten. This function had become a bit overgrown due to the inconsistency among su programs and terminals. The new version is much cleaner and should provide for more flexibility for future uses. Although the changes should be transparent to most users, you may want to note the following changes:

  • spacefm now uses a single temporary script to run bash commands and scripts, rather than separate exec and source scripts
  • a new intermediary permanent script ‘spacefm-auth’ is now installed to /usr/bin (or /usr/local/bin). This script simplifies the commands passed on the command line to su programs, and is used to authenticate temporary scripts run as another user (such as root) using sha256sum.
  • spacefm’s temporary directory (/tmp by default) can now be mounted with the ‘noexec’ option if desired
  • spacefm now supports the new ktsuss2, with some reservations (see below)

If you do notice a command/su/terminal combination that no longer works, please let me know so I can accommodate it. I have tested the new function but it is impossible to test every possible use due to the number of combinations – that’s where your feedback comes in.

ktsuss2
The developer of ktsuss has released version 2 which addresses two security problems present in ktsuss 1.4 and earlier. However, ktsuss2 has also introduced some bugs which limit its ability to be used in all circumstances. I have discussed these with David Cortarello and he said he would look at the issues.

The primary bugs which affects use of ktsuss2 in spacefm 0.7.2 is that ktsuss2 does not return the exit status of the command being run, and it discards the stderr output of the command. This means that commands run in spacefm with ktsuss2 will present no error dialog or output if the command fails – you won’t know it failed. So I cannot recommend use of ktsuss2 at this time.

Below are some of my bug reports on ktsuss2. Except for the error issues above, the rest of these issues should not affect spacefm 0.7.2 and later, but do affect earlier versions.

In the following, ktsuss1 is v1.3 from the old debian repo before ktsuss was removed. ktsuss2-su is version 2 built from source on your site with default options. ktsuss2-sudo is built using –enable-sudo.

1) Exit status and stderr output discarded

$ ktsuss1 ls xxxxxxxxxx ; echo error=$?
/bin/ls: cannot access xxxxxxxxxx: No such file or directory
error=2
(this is good behavior)

$ ktsuss2-su ls xxxxxxxxxx ; echo error=$?
error=0

(exit status and stderr have been discarded)

Many scripts and programs use the exit status. For example, in spacefm if the user runs an administrative command as root, and exit status is non-zero, a popup is displayed showing the error. With ktsuss2 the user receives no notification that an error occurred, and cannot see the error. The lack of stderr also affects users running ktsuss2 directly in a terminal.

Desired behavior: return the target program’s exit status and stderr output.

2) command line arguments not passed correctly – impossible to quote arguments

$ ktsuss2-su bash -c 'chown root:root example.file'
chown: missing operand
Try `chown --help' for more information.

$ ktsuss2-su bash -c "chown root:root example.file"
chown: missing operand
Try `chown --help' for more information.

Version 1.3 does not exhibit these problems.

In general su programs behave very poorly and inconsistently, which makes it difficult to support them in a consistent way. ktsuss has been an exception to this, but ktsuss2 introduces some critical changes and breakage on the command line. As the executable uses the same name as ktsuss1, it’s not readily apparent which version the user is using, making support difficult. Its new behavior will also break programs and scripts written for ktsuss1 (most of mine have broken), and limit the user’s ability to run programs as they wish.

Desired behavior: Use a consistent command line usage with both su and sudo builds which passes arguments verbatim to the target program (including single and double quotes and other special characters), consistent with sudo’s direct command line usage.

3) sudo build does not relay password, and interprets command line as a single argument:

$ ktsuss2-sudo ls -la /root
# asks for password here in gtk dialog, which I enter
# it then asks for password again in terminal, which I enter again:
[sudo] password for root: 
sudo: ls -la /root: command not found

It then produces an error, even though the password was entered twice, because it interprets the entire command line as a single argument, which is inconsistent with ktsuss2 su build usage and sudo usage.

Defaults settings in /etc/sudoers has no impact on this problem.

Desired behavior: Use a consistent command line usage with both su and sudo builds which passes arguments verbatim to the target program (including single and double quotes and other special characters), consistent with sudo’s direct command line usage.

4) ktsuss2 sudo build passes -E to sudo. Note the following in man sudo:
“The security policy may return an error if the -E option is specified and the user does not have permission to preserve the environment.”

While this problem does not affect me, if a user does not have appropriate permission, and since you have hard-coded -E, this will apparently break ktsuss for them. Would it be better to allow the user to control env reset via their sudoers file?

Icons Sizes
The icon sizes 20×20 have been replaced with 22×22 to prevent unnecessary scaling which caused blurring of some icons.

Also, the close buttons on tabs now use a smaller icon.

Also, the icons in the Devices and Bookmarks lists, and in the directory tree side pane now obey the small icon size set in preferences. Some custom icons you have specified may look different or not work in version 0.7.2 due to changes in the way they are loaded.

MBR & FSArchiver
spacefm can now create MBR and FSArchiver backups of mounted volumes. For FSArchiver, the volume generally has to be mounted read-only, or you have to specify ––allow-rw-mounted

User’s Manual
The SpaceFM User’s Manual has been updated to reflect changes and minor corrections.

For a more complete list of changes please see News.
 
Crashes?
Although most users across many distros are reporting high stability using spacefm, some users have commented about crashes but have not filed bug reports. In case you think the developer sees these too, I do not – spacefm never crashes for me, and if it does, I fix it. The only way other crashes will be fixed is if they are reported with enough detail on what triggers them. Preferably, also install gdb, build spacefm with the appropriate flags, and provide a backtrace. Otherwise fixing such bugs is like finding a needle in a haystack.

As of version 0.7.2, the only reproducible and sufficiently detailed crash is this one, which is caused by a bug in libgdk-pixbuf which they have done nothing to correct thus far. However, that crash only affects one known particular icon file, although there could be others.

Although 100% stability is simply not possible in the environment spacefm is run in, the way it will achieve its highest stability is for the users experiencing such problems to take the time to make detailed reports. This goes for more minor bugs too. spacefm has many flexible functions which makes it hard to test completely. If you find a minor bug, please report it. Your testing and feedback is appreciated and helps to improve the software.

Distributions
More distributions have added spacefm to their repositories or have test packages available. These now include:

  • Gentoo’s portage tree includes spacefm
  • Sabayon includes spacefm in its repositories
  • Arch Linux’s AUR includes spacefm
  • PCLinuxOS has spacefm test packages available (see forum)
  • VectorLinux has spacefm test packages available

Press
spacefm has been getting some good press, which is helpful for letting new users know about it. Linux Format magazine will have an article about spacefm in their April 2012 print issue, in the LXFHotPicks section. I received a complimentary copy and they gave a very positive review. WEB UPD8 also has an online review.

SpaceFM Homepage

March 5, 2012 Posted by | Software, Tips | Comments Off

   

Follow

Get every new post delivered to your Inbox.

Join 123 other followers