I'm using Veins (v5.1) along with SUMO (v0.32) and OMNeT++ (v5.6.2) in Linux Ubuntu 20.04 and I'm trying to run the Qtenv from the terminal with the opp_run command. When the simulation window opens I still need to click run (F5) in order to start the simulation. Is there any way to start the simulation directly while using the Qtenv?
Asked
Active
Viewed 165 times
1 Answers
1
In Qtenv there is no way to start simulation automatically after opening the window.
EDIT
However, based on that question you may try use xdotool
to start simulation by sending F5, for example:
xdotool search --name Qtenv windowactivate --sync %1 key F5 windowactivate `xdotool getactivewindow`
where Qtenv
is a part of the title of window with your simulation.

Jerzy D.
- 6,707
- 2
- 16
- 22
-
Do you think it would be possible to focus to the open window and then execute commands from terminal? – Christina Apr 13 '21 at 10:17
-
1I have added a solution to send a key stroke to the window from console. Could you try it? – Jerzy D. Apr 13 '21 at 12:06
-
Thanks! I found the same solution and it works! – Christina Apr 13 '21 at 15:14