Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: AppImage version fails to run scripts on Fedora #334

Open
IzNoGud78 opened this issue Mar 21, 2024 · 4 comments
Open

[BUG]: AppImage version fails to run scripts on Fedora #334

IzNoGud78 opened this issue Mar 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@IzNoGud78
Copy link

IzNoGud78 commented Mar 21, 2024

Description

Just as described in the title, starting the script via the AppImage package on Fedora, an error dialog is shown informing of the script execution error.

The error reported, also clearly visible on the main log, is as follows:

Error Running Script - An error occurred while running the script.
This error could be caused by insufficient permissions, limited disk space, or security software interference.

To address this, you can:

  • Check if there is enough disk space and system resources are available.
  • Verify your access rights to the script's folder: "/home/user/.config/privacy.sexy/runs".
  • Check if antivirus or security software has mistakenly blocked the script. Don't worry; privacy.sexy is secure, transparent, and open-source, but the scripts might still be mistakenly flagged by antivirus software. Temporarily disabling the security software may resolve this.
  • Confirm that you have the necessary permissions to execute scripts on your system.
  • Run a different script selection to check if the problem is script-specific.
  • If the problem persists, reach out to the community for further assistance.

Technical Details: [FileExecutionError] Error during script file execution: Error during script file execution

Reproduction steps

Steps to reproduce the behavior:

  1. Assign execution permissions to the AppImage package: chmod +x privacy.sexy-0.13.0.AppImage
  2. Run the AppImage package: ./privacy.sexy-0.13.0.AppImage
  3. Select the desired level of privacy (I usually always select the Standard level)
  4. Click on the Run button
  5. See the error dialog box

Expected behavior

I would expect the script to run, just as it does when I download it (from both the Web or the AppImage version) and run it manually.

Distribution

Fedora 39 Cinnamon

Additional context

From the main log file it is also easy to deduce the cause of the error from these lines:

[info]  Executing command: x-terminal-emulator -e '/home/user/.config/privacy.sexy/runs/2024-03-20_23-00-11-privacy-script.sh'
[error] [
  'FileExecutionError',
  'Error during script file execution',
  "Error: Command failed: x-terminal-emulator -e '/home/user/.config/privacy.sexy/runs/2024-03-20_23-00-11-privacy-script.sh'\n" +
    '/bin/sh: line 1: x-terminal-emulator: command not found\n' +
    '\n' +
    '    at ChildProcess.exithandler (node:child_process:430:12)\n' +
    '    at ChildProcess.emit (node:events:514:28)\n' +
    '    at maybeClose (node:internal/child_process:1091:16)\n' +
    '    at Socket.<anonymous> (node:internal/child_process:449:11)\n' +
    '    at Socket.emit (node:events:514:28)\n' +
    '    at Pipe.<anonymous> (node:net:323:12)'
]

Unfortunately x-terminal-emulator is a virtual package that is not present on Fedora, this actually makes the AppImage package incompatible (at least partially) with Fedora. It still remains a viable alternative for downloading the script, which, however, must be run manually.

@IzNoGud78 IzNoGud78 added the bug Something isn't working label Mar 21, 2024
@undergroundwires
Copy link
Owner

Thanks for the issue @IzNoGud78, this will be addressed as high priority in a patch release.

Which version of Fedora are you using? I read that GNOME environments define x-terminal-emulator.

We should update the logic to:

  1. Check x-terminal-emulator, if exists, run the file.
  2. Check terminal emulator A, if exists, run the file...
  3. Check terminal emulator B, if exists, run the file...

However, before enumerating terminals randomly, we should try to prioritize the default terminal emulator the user has. And there seems to be no way to do that.

Then the enumeration approach would be the only way for known terminals, maybe following this order:

gnome-terminal, konsole, xfce4-terminal, mate-terminal, lxterminal, alacritty, tilix, kitty, wezterm, terminology, guake, tilda, terminator, xterm, uxterm, rxvt, urxvt, st, qterminal, lilyterm, hyper, eterm, aterm, termite, roxterm, termit, rio, foot, sakura, cool-retro-term

What do you think about this solution?

Btw, what is your default terminal and its command?

@IzNoGud78
Copy link
Author

IzNoGud78 commented Mar 21, 2024

Which version of Fedora are you using? I read that GNOME environments define x-terminal-emulator.

As previously specified I use Fedora 39 with Cinnamon but, unfortunately, even on the Workstation version (the default one with GNOME) the virtual package x-terminal-emulator isn't present. It isn't possible to define x-terminal-emulator even as a system alternatives.

x-terminal-emulator is a virtual package used only by Debian (and Debian-based distributions), so the problem occurs with all other distributions.

I believe that currently, at least as far as Fedora is concerned, there is no meta package (or specific command) that can be used to start the default terminal, so I assume that the best method that can fit all needs is to draw up a hard-coded list of the possible terminals that can be used or, alternatively, let the user specify via a dialog box which terminal to use.

Starting the default terminal on Linux

@undergroundwires
Copy link
Owner

Thank you for the context. I think asking for default terminal can be low priority feature later and then we should go for the hardcoded list.

What terminal do you have by default on Fedora? I'm asking this so I'll ensure that it will be in the list so we can test it once implemented.

@IzNoGud78
Copy link
Author

@undergroundwires I currently use the default terminal, which on both the Workstation and Cinnamon version is gnome-terminal.
Obviously, however, it is one of those components that changes depending on the desktop environment being used or the user's preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants