screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setup screen session as an IDE on shell


From: Neal Fultz
Subject: Re: setup screen session as an IDE on shell
Date: Fri, 27 Dec 2019 12:08:14 -0600

I would try doing 

     chdir build
     screen -t build tmux

instead of doing `screen cd build` - the error message is correct: cd is not a program you can run, it's typically built in to the shell. It isn't clear to me what you are trying to do with the final step, I haven't ever used tmux inside screen.





On Fri, Dec 27, 2019 at 9:25 AM Stdcerr <address@hidden> wrote:
I would like to write a script that uses screen to automatically create
a few windows within which particular commands will be executed. Think
of it like an IDE on the shell. Now I know that I can create windows and
applications launched within them. Now, I would like to launch the
following commands in window's given descriptive names:

     chdir ~/src/projectA
     * vim
     * git pull
     * cd build/
     * cd build/ && tmux

The intention is to launch the session from a script with:

     /usr/bin/screen -dmS name -c /home/user/scripts/.screenrc_name

Where `~/scripts/.screenrc_name` looks like:

     #bind keys to move between regions
     bind j focus down
     bind k focus up
     bind l focus right
     bind h focus left
     # don't display the copyright page
     startup_message off

     # increase scrollback buffer size
     defscrollback 10000

     # don't kill window after the process die
     zombie "^["

     # create windows
     chdir ~/src/scaper
     screen -t code vim &
     screen -t git git pull &
     screen -t build cd build/ &
     screen -t exec cd build/ tmux

When I connect to the session with `screen -r name`, I get into the
`exec` window correctly, but it's stuck and it says `Cannot exec `cd`:
No such file or directory`. And I'm getting the following:

     $ which cd
     which: no cd in
(/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin)

     [ron@OldNotebook scripts]$ type cd
     cd is a shell builtin

I was wondering how I best address this issue?

Thank you!



  ~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]