1

This question already has an answer here:

I want implement like this at terminal A, open a new terminal B, run command in B, leave B runing, and back to terminal A, run other command.

I have following script, but not what I expected

#!/bin/bash
konsole -e 'sh -c "./tel"'
echo test

The problem is, echo test command won't run, until I close terminal B. terminal A output

"failed to get the current screen resources QXcbConnection: XCB error: 170 (Unknown), sequence: 170, resource id: 90, major code: 146 (Unknown), minor code: 20"

and wait for terminal B close. after I close terminal B, terminal A output "test".

Is there a way to solve the problem?

marked as duplicate by JigglyNaga, schily, user34720, Scott, Kusalananda linux Dec 15 '18 at 10:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • konsole -e 'sh -c "./tel"'& add & at the end of first command makes no difference. – user1932637 Dec 14 '18 at 17:55
  • what about running sh -c "./tel && exit" – Pierre-Alain TORET Dec 14 '18 at 18:26
  • Welcome on U&L! I cannot reproduce your issue using konsole 18.08.3, Plasma Desktop 5.14.4, bash 4.4.23. No error here. May you add details about your environment? Are you using some virtual desktop (VNC...)? – fra-san Dec 14 '18 at 19:05
  • my konsole is 16.08.2. SUSE OS could you run konsole -e 'sh -c "ls ; exec bash"' in your terminal, see what happen. mine switch to terminal B, and terminal A is suspended. – user1932637 Dec 14 '18 at 19:24
  • Pierre-Alain TORET, won't work – user1932637 Dec 14 '18 at 19:25