SliTaz SliTaz Forum

You are not logged in.

#1 2014-01-03 23:29:30

slo.sleuth
Member
Registered: 2013-12-31
Posts: 20

Rolling: SpaceFM 0.9.2 commands fail to execute properly

I'm working with the rolling distribution and trying to extend SpaceFM with tools and plugins.  Creating a tool, such as the sample suggested in the SpaceFM manual ("Current Time" built with the 'date' command) results in errors as if the command lines is not being parsed correctly.  However, there is no useful debug information, even if executing SpaceFM from the command line.  The same version of SpaceFM with the same "Current Time" tool executes properly in Ubuntu. 

I thought maybe bash was a dependency based on the error window, but that does not appear to be the case.  Does anyone have any ideas?  I will continue to troubleshoot.

Offline

#2 2014-01-04 03:01:56

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: Rolling: SpaceFM 0.9.2 commands fail to execute properly

Helps if you show us the error message you're getting. Otherwise, we'll have to guess as to what is the cause - from Busybox's date command flags being different from the 'normal' date to bash not being properly installed or maybe a few minor issue like a missing command

Offline

#3 2014-01-05 07:20:06

slo.sleuth
Member
Registered: 2013-12-31
Posts: 20

Re: Rolling: SpaceFM 0.9.2 commands fail to execute properly

Yes, it does and I should have done so, sorry.  To recap, I set up a "Current Time" tool following the SpaceFM manual.  It is a simple process of giving the tool a name, ie, Current Time, and entering a shell command, in this case 'date' without flags.  The result of the shell command is displayed in a dialog box, normally, and this functions as expected in Ubuntu.  In slitaz-stable or slitaz-rolling, instead and error window appears with content such as this:

/tmp/spacefm-tux-76e7d9f7.tmp/6bef4aea-tmp.sh: line 45: fm_pwd_panel[1]=/home/tux: not found

/tmp/spacefm-tux-76e7d9f7.tmp/6bef4aea-tmp.sh: line 47: fm_tab_panel[1]=1: not found

/tmp/spacefm-tux-76e7d9f7.tmp/6bef4aea-tmp.sh: line 82: fm_pwd_panel1_tab[1]=/home/tux: not found

/tmp/spacefm-tux-76e7d9f7.tmp/6bef4aea-tmp.sh: line 83: fm_pwd_tab[1]=/home/tux: not found

/tmp/spacefm-tux-76e7d9f7.tmp/6bef4aea-tmp.sh: line 88: syntax error: unexpected "("

Unfortunately, the temp file is removed after execution and cannot be instpected.  I wonder if anyone recognizes what is going on, possibly a missing dependency.  I'm going to next try to rebuild SpaceFM but welcome any suggestions.

Offline

#4 2014-01-05 13:24:56

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Rolling: SpaceFM 0.9.2 commands fail to execute properly

Slitaz runs on busybox which has ash shell.

There is code in spacefm that works on bash but not busybox ash. The errors are from ash being unable to execute the non compliant code which generates the random.number-tmp.sh script in /tmp/spacefm-tux-random.number.tmp folder which opens a dialog,terminal,etc.

If you install bash shell and link /bin/sh to /bin/bash it works.

But it breaks a multitude of functions in slitaz which is written for ash.

A programmer knowledgable of the differences of the shells would have to review and edit the spacefm source code to make it ash compliant.

Offline

#5 2014-01-07 18:18:34

slo.sleuth
Member
Registered: 2013-12-31
Posts: 20

Re: Rolling: SpaceFM 0.9.2 commands fail to execute properly

Thank you mojo. 

It was my supposition that this was a shell issue and that bash was needed.  I made the mistake of assuming that installing bash alone was the solution, but adding the step of linking /bin/sh to /bin/bash solved the issue. 

It's unfortunate that this in turn breaks slitaz scripts.  I'll communicate with the SpaceFM devs about the possiblity of making SpaceFM compliant with busybox.  The tools/plugins features of SpaceFM are spot-on for the Recovery flavor of Slitaz I am developing.

I'll be submitting some packages to the repository toward this goal.

Offline

#6 2014-01-08 21:48:20

slo.sleuth
Member
Registered: 2013-12-31
Posts: 20

Re: Rolling: SpaceFM 0.9.2 commands fail to execute properly

I have been in contact with the SpaceFM developer.  After some analysis, it appears that the version of SpaceFM packaged for Slitaz is modified to call /bin/sh instead of /bin/bash.  Problem is, SpaceFM works expressly with bash4 to achieve all its functionality.  While I am fairly certain the alteration to the source code was made to remove the bash4 dependency and thus lighten the Slitaz distro, it breaks core functionality in the file manager.

I have posted a bug and will leave the topic unresolved for now.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]