0

I have downloaded scilab and extracted it to /home/user/apps/scilab-6.0.1/. There isn't any problem executing from command line and scilab runs perfect after I type the following command:

~/user/apps/scilab-6.0.1/bin/scilab

To link scilab to the gnome application menu and favorite apps, I've created the following scilab.desktop file in the path /usr/share/applications/:

[Desktop Entry]
Comment=Scientific software package for numerical computations
Exec=/home/user/apps/scilab-6.0.1/bin/scilab %f
GenericName=Scientific Software Package
Icon=/home/user/apps/scilab-6.0.1/share/icons/hicolor/256x256/apps/scilab.png
Name=Scilab
StartupNotify=false
Terminal=false
Type=Application
Categories=Science;Math;

The scilab icon appeared in the menu as a result, but when I click on it, it opens and closes immediately. What should I do to solve this problem?

Zanna
  • 69,223
  • 56
  • 216
  • 327
mstfyghm
  • 11
  • 1
  • Welcome to AskUbuntu! You have `Exec=/home/user/apps/scilab-6.0.1/bin/scilab %f`, maybe `scilab` expects a file to read (`%f` expands to the filename passed as an argument)? – Daniele Santi Sep 06 '18 at 08:40
  • @MrShunz I've tried without '%f' or with any other like '%d,%D, ...' but not working yet! – mstfyghm Sep 06 '18 at 09:19
  • what happens if you call the binary directly from a terminal? – Daniele Santi Sep 06 '18 at 09:25
  • Sorry, didn't notice you already tried from the command line. It might be it needs a terminal to work, try configuring `Terminal=true` in the `.desktop` file. – Daniele Santi Sep 06 '18 at 09:33
  • Thanks. changing `Terminal=false` to `Terminal=true` keeps scilab open. please add it to your answer. Now is there any way to close terminal while kipping scilab open? – mstfyghm Sep 06 '18 at 10:42
  • I don't think you can close that terminal, as it's the one launching `scilab`. Maybe you can try running scilab in the backgroup (append `&` to the `Exec` string). – Daniele Santi Sep 06 '18 at 10:51

1 Answers1

0

I found a bug report for the exact same problem.

Looks like it's a bug of scilab more than a problem with Gnome/Ubuntu.

As a workaround, change your Exec command as described:

Exec=env LC_ALL="en_US.UTF-8" xterm -e /home/user/apps/scilab-6.0.1/bin/scilab

EDIT based on comments

Looks like configuring Terminal=true has the same effect and is enough to keep scilab open.

Daniele Santi
  • 3,084
  • 4
  • 30
  • 30