Menu

#41 All terminal commands do not work

next
closed
None
5
2023-03-04
2021-08-16
Shumkar
No

Hi!

I have been successfully used Worker as a unique file manager for more than 10 years on a lot of desktops and laptops with Debian and Gentoo. And I like it very much.

Today I've suddenly met an interesting issue on a laptop with a recently installed Gentoo: all Worker terminal commands do not work. It does not matter which command it is, even a simple echo "Test" does not work. Creating a new file with a built-in command does not work too, because it uses the terminal. After entering the desired name of the new file the terminal window is appearing for a fraction of the second and then disappears, and the new file is not being created.

I don't think that this issue has something to do with Gentoo, so I decided to create a ticket here, upstream. Maybe this issue is due to some absent dependency because the system on that laptop is pretty minimal. I will uppreciate much if you help me to resolve it.

My terminal is xterm. The command for the terminal is the default xterm -e %s.

What I tried:
- to compile Worker with "debug" key; unfortunately, there is no any text during the failed commands.
- to change bash settings in ~/.bash_profile and /etc/bashrc; I couildn't find any error, copied all the files from a machine where Worker works fine - it didn't resolve the issue.

Discussion

  • Shumkar

    Shumkar - 2021-08-16

    Errata:
    /etc/bashrc -> /etc/bash/bashrc
    couildn't -> couldn't

     
  • Shumkar

    Shumkar - 2021-08-16

    I tried 2 Worker versions: 4.6.1 and 4.7.0.

     
  • Shumkar

    Shumkar - 2021-08-16

    Terminal commands do work in other programs (I checked in fbpanel).

     
  • Ralf Hoffmann

    Ralf Hoffmann - 2021-08-17

    Can you check if /tmp (or $TMPDIR if set) is mounted so that files cannot be executed (noexec flag)? That could explain the behavior.
    Also, try setting the option "Terminal returns early" in terminal program settings section. Then use the test command with "run in terminal and wait for key". It probably won't work, but the tmp files should still be lying around in /tmp/worker-$USER/... If so, you can try if running "xterm -e /tmp/worker-$USER/..." actually runs or if there is some error message.

     
  • Shumkar

    Shumkar - 2021-08-17

    Can you check if /tmp (or $TMPDIR if set) is mounted so that files cannot be executed (noexec flag)? That could explain the behavior.

    Exactly! I looked in /etc/fstab and found noexec there, for /tmp.

    After removing it, everything works as expected.

    Thank you very much, Ralf!

     
  • Shumkar

    Shumkar - 2021-08-18

    While the issue itself is resolved, I would like to ask:
    is there a possibility to preserve noexec option for /tmp and in the same time to use the functionality of terminal commands?

    I tried to make /tmp/worker-USER a soft link to ~/worker-USER and got the error "/tmp/worker-USER is not a directory" (Worker refused to launch).

    I found that "fix" in the changelog for 2013-11:
    "fixed external command execution if the tmp directory is mounted with NOEXEC option"
    https://sourceforge.net/p/workerfm/mailman/workerfm-users/?viewmonth=201311
    Is it relevant for this issue?

     
  • Ralf Hoffmann

    Ralf Hoffmann - 2021-08-19

    First of all, you can use the env variable TMPDIR to point it to some other directory.
    The fix in version 3.2 apparently works for external programs not run in a terminal, but not when the terminal is used. I'm not sure it actually worked at that time or if I made some other changes later on which broke it again. Anyway, if you use "xterm -e /bin/sh %s" as a terminal command, it will work even for noexec tmp dirs. I think I will make such a change for the default terminal program for future releases.

     
  • Shumkar

    Shumkar - 2021-08-20

    Thank you again! I'll try both these ways.

     
  • Shumkar

    Shumkar - 2021-08-20

    I've tried.

    The approach with /bin/sh worked flawlessly.
    The approach with TMPDIR worked too, but only after changing the relative path (with ~/) in TMPDIR to the absolute one. Is it a feature?

     
  • Ralf Hoffmann

    Ralf Hoffmann - 2021-08-22

    Yes, TMPDIR must be absolute. While testing I also noticed that it won't work either if TMPDIR contains spaces or other special characters. This will be fixed in the next release.

     
  • Shumkar

    Shumkar - 2021-08-23

    Thank you!

     
  • Ralf Hoffmann

    Ralf Hoffmann - 2022-09-18

    Fixed in version 4.9.0

     
  • Ralf Hoffmann

    Ralf Hoffmann - 2022-09-18
    • status: open --> closed
    • assigned_to: Ralf Hoffmann
     

Log in to post a comment.