Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6413 closed defect (fixed)

Open Terminal from OMEdit not working

Reported by: Andreas Heuermann Owned by: Adeel Asghar
Priority: high Milestone: 1.17.0
Component: OMEdit Version: 1.18.0-dev
Keywords: Cc:

Description

On Windows nothing happens when I try to open a terminal from OMEdit by clicking Tools->OpenTerminal.

On my Windows Subsystem for Linux I get a error message like

[3] 15:34:28 Scripting Error
Terminal command is not set. You can define a new terminal command in Tools->Options->General->Terminal Command.

When I switch back to my Windows OMEdit I can see that the terminal command is cmd.exe, so that should be correct. I suspect that CMD is started and immediately closed again.

Change History (14)

comment:1 by Adeel Asghar, 4 years ago

Well the error message says no terminal command is set.

comment:2 by Andreas Heuermann, 4 years ago

Ah sorry, I was a bit unclear.
I tried the same thing on two different OS (Windows and Linux), namely starting a terminal from OMEdit.

  • On Windows nothing happens (no error messages or anything).
  • When doing the same thing on Linux I got an error message because my settings are different there.

comment:3 by Adeel Asghar, 4 years ago

So the problem is in Windows or Linux or both?

What settings you have for terminal command?

comment:4 by Adeel Asghar, 4 years ago

Maybe this is relevant here https://stackoverflow.com/questions/42051405/qprocess-with-cmd-command-does-not-result-in-command-line-window

In the meanwhile try setting terminal command to something else like calc.exe and see if it works.

comment:5 by Andreas Heuermann, 4 years ago

The problem is (probably) only on Windows, since I don't have a Linux with a working GUI (WSL).
So I'll stick to Windows for this ticket from now on.

My Settings in Tools->Options->General

Terminal Command: cmd.exe
Terminal Command Arguments: 

When changing it to use calc.exe it starts my calculator.

When I change it to a different shell, e.g. C:/Program Files/Git/git-bash.exe from Git it will start and immediately close it again.

comment:6 by Francesco Casella, 4 years ago

Milestone: 1.18.01.17.0

I also get the same issue as @AnHeuermann. Terminal is set to cmd.exe (I guess that's the default. Neither Tools | OpenModelica Command prompt nor Tools | Open Terminal produce any result.

BTW, what is the difference among those to supposed to be?

comment:7 by Francesco Casella, 4 years ago

@adeas31, BTW, when I go to Tools | Options and click Reset, the message popup window has a link to "file" but if I click on it, nothing happens. I guess the root cause is the same.

comment:8 by Adeel Asghar, 4 years ago

Apparently the Qt version upgrade was not so smooth. I just tested them and they work fine in 1.16.5.

comment:9 by Adeel Asghar, 4 years ago

Resolution: fixed
Status: newclosed

in reply to:  6 comment:10 by Adeel Asghar, 4 years ago

Replying to casella:

I also get the same issue as @AnHeuermann. Terminal is set to cmd.exe (I guess that's the default. Neither Tools | OpenModelica Command prompt nor Tools | Open Terminal produce any result.

BTW, what is the difference among those to supposed to be?

Tools | Open Terminal just starts a terminal in OMEdit working directory.
Tools | OpenModelica Command prompt also starts the terminal in working directory but it also sets the paths needed for simulation executable.

in reply to:  7 comment:11 by Adeel Asghar, 4 years ago

Replying to casella:

@adeas31, BTW, when I go to Tools | Options and click Reset, the message popup window has a link to "file" but if I click on it, nothing happens. I guess the root cause is the same.

This works fine for me. omedit.ini is opened by clicking on this link in the system default editor for *.ini files.

comment:12 by Francesco Casella, 4 years ago

Resolution: fixed
Status: closedreopened

@adeas31, please also port this to maintenance/v1.17

comment:13 by Adeel Asghar, 4 years ago

Resolution: fixed
Status: reopenedclosed

Done.

comment:14 by Francesco Casella, 4 years ago

Thanks!

Note: See TracTickets for help on using tickets.