How to Launch. Sh from Third Party Program?

How to Launch. Sh from Third Party Program?

I have the program Lutris installed on my computer and I am going through adding all my linux games. However some are .sh execs others are .bins and executables which both added fine. the .sh ones are giving me some grief.

I don't know what to put in the argument section to help launch the game. It's an easy fix I know it is. I just can't think of it, a little brain dead here :P

-EDIT-

I just threw sudo sh in there as something to see if it worked but it didn't.

Example:

The games that are in .sh launch straight from the shell script file there are no install screens or anything I just run the terminal command and the game is open, Lutris just simplifies that by adding them all together in a manager so I don't have to type as much :P

So if I don't need an argument that is for after the program is launch do I need a preload library? As Lutris sees the file (I think) its supposed to be an executable that I just double click on the icon and the game starts.

I can simplify this cause I know I am sometimes a little confusing with my words.

Lutris is a launcher for linux games and gaming on ubuntu in general. The games I have are .sh format, They aren't installers but launchers. I can go into terminal and type the sh commands and run the game fine, I am just trying to add said games to Lutris and I guess Lutris doesn't see it as an Executable even though I have it checked under permissions in the GUI

2

1 Answer

Running bash files

To run an .sh (bash) file, you have two options

  1. Force run with bash

    • $ bash /path/to/file.sh
  2. Allow execution

    • $ chmod +x /path/to/file.sh
    • $ ./path/to/file.sh

Typically, files downloaded from the internet are not marked as executable (+x) until you specifically mark them so.

Creating "Shortcuts"

You may want to create a "Shortcut" or clickable icon that launches your games

  • gnome-desktop-item-edit ~/Desktop/ --create-new

To ensure that the file runs, use the bash /path/to/file.sh method when inputting the command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.