DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

TIP: How to transfer terminal session between IDE and terminal Emulator?

Most IDE's embed a terminal session in my case it was the pycharm community (but can apply in most IDEs). On that I was developing a process take long time and I wanted to switch between projects.

But if I did that I was not sure whether the terminal session would end or not. Sometimesd I may even needed to close the IDE as well.

So in my case upon my IDE terminal I've run:

screen
Enter fullscreen mode Exit fullscreen mode

Because, I was developing a python project I needed to re-initialize the virtual environment (ommit if not developing in python):

source ^path_to_venv^
Enter fullscreen mode Exit fullscreen mode

(^path_to_venv^ is the path in which I have initialized the virtual environment if developing upon python replace with your own)

Then I run my script in my case was a python one.
Once my script was running I pressed CTRL+A+D in order to detatch the screen session.

Afterwards, I switched to another project, closing the IDE now was not an issue because the task was running into a detatched session.

If I wanted to see the execution progress of my script now I needed to open any terminal session and run:

screen -r
Enter fullscreen mode Exit fullscreen mode

And then I could re-detatch it by pressing CTRL+A+D again. I could see the progress again by typing screen -r.

I hope it is usefull. I am using linux for my development, Idk if approach above is applicable upon mac as well, I assume it is.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay