SmartFinn / eve-ng-integration

integrates EVE-NG (aka UNetLab) with Linux desktop
http://git.io/eve-ng-integration
MIT License
322 stars 117 forks source link

Terminal opens and closes instantly #63

Closed hinpa closed 10 months ago

hinpa commented 1 year ago

Hello! I've tried using eve-ng-integration with urxvt. The problem I've met is that when I tried to connect to my switch, it didn't work. Command "eve-ng-integration telnet://192.168.34.128:30024" in my urxvt does nothing (urxvt just promptly appears and disappears on my screen). I tried to connect using PuTTY and it worked.

I don't know if this is a correct solution but: I found the problem to be in the python file "eve-ng-integration/bin/eve-ng-integration" in the function "execute" in the Terminal class:

    def execute(self, command):
        if isinstance(command, (str)):
            command = command.split('\n') # here is the problem

        term = self._terminal_emulator_cmd()

        Popen(term + command)

When command = command.split('\n') is changed to command = command.split(' '), everything seems to work. The terminal window appears and I have the control of the switch.

I hope it gets fixed soon. Thank you in advance!

hinpa commented 1 year ago

I tracked back the problem to commit fixing #8 issue. Reverting back seems to fix the problems of these issues too (at least on my machine). I needed to change _current_desktop to _is_command though. Maybe that was the problem