# Can I create another thread that has a second prompt without XPCE in terminal?

**URL:** <https://swi-prolog.discourse.group/t/can-i-create-another-thread-that-has-a-second-prompt-without-xpce-in-terminal/5116>\
**Category:** General\
**Created:** [March 13, 2022, 6:01pm UTC](https://swi-prolog.discourse.group/t/can-i-create-another-thread-that-has-a-second-prompt-without-xpce-in-terminal/5116 "2022-03-13T18:01:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PasiK](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/pasik/32/84_2.png) [@PasiK](https://swi-prolog.discourse.group/u/PasiK)\
**Post date:** [March 13, 2022, 6:01pm UTC](https://swi-prolog.discourse.group/t/can-i-create-another-thread-that-has-a-second-prompt-without-xpce-in-terminal/5116/1 "2022-03-13T18:01:06Z")

</div>

I am thinking about the [Bash job control](https://man7.org/linux/man-pages/man1/bash.1.html#JOB_CONTROL) with `fg 1` and `bg 1` and maybe pengine\_rpc/2 or some other pengine related idea.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [March 14, 2022, 8:12am UTC](https://swi-prolog.discourse.group/t/can-i-create-another-thread-that-has-a-second-prompt-without-xpce-in-terminal/5116/2 "2022-03-14T08:12:25Z")

</div>

Theoretically I guess that should be possible. As is though, two threads reading from the console make a mess. Best options are `swipl-win` (both the Windows version and the Qt version) or use the `libssh` pack that allows to login into Prolog using ssh. For the latter, make sure you use the `libedit` based commandline editor to get commandline editing on each connection (libedit can have multiple editor instances where readline only has one).
