You are not logged in.
For example, I had opened 5 urxvt window, each of them attatched to a single bash process, that means 5 urxvt processes results in 5 bash processes.
My quesetion:
Is it possible to make those urxvts share the same bash process/session(sorry, I don't know how to exactly describe it)? if the answer is NO. is it possible with other SHELL, like zsh?
thx a lot.
Last edited by seenxu (2009-01-17 20:08:01)
Offline
afaik it's not possible with any shell. [i think that if they'd be using the same bash process, there'd be showing exactly the same contents, like seeing the same program on three tellys next to each other.]
by the way, they might be 5 bash processes, but they'll still be using much less memory than 5*(resources for 1 bash), since they share almost everything.
Offline
take a look at urxvtd/urxvtc?
Offline
You can use screen -x to connect to an existing screen session.
You can also use dtach for this, but it resizes the windows to the last accessing window instead of the smallest.
Offline
take a look at urxvtd/urxvtc?
That's what I was going to suggest.
Offline
both heleos' and procyon's suggestions are good, they reduce the number of urxvt processes running.
but you'll still get a new shell process for a new "window".
Offline
@bender02: you can use exec screen -x or urxvt -e screen -x (not had too many good experiences with the last though (like instant closing windows))
Offline
The terminal emulator and the shell are two different programs. A terminal emulator is just a program that interprets escape sequences and text going in and out. It's the responsibility of another program to handle or control what that text actually consists of; this is usually a shell.
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
@procyon: sure, but then you'll see the same shell session in each window and i don't think that that's what OP wanted.
Offline
Thx for your guys to suggest urxvtc/urxvtd or screen combination, which I had used for quite a long time, but what I am asking is every time launching a urxvt/urxvtc or even running screen with multiple sub-windows, they all automatically open a new bash process, if there is a way to avoid this.
you can also use "top" or "ps -e | grep -i bash" to monitor the changes, open five (urxvt/urxvtc)s and open screen with 5 sub-window, there will be at least 9 bash processes there, and sometimes even more, for example, if you use midnight commander(mc) inside one of these urxvts.
I think bender02's answer is the one to explain the problem.
Offline
@bender02: you can use exec screen -x or urxvt -e screen -x (not had too many good experiences with the last though (like instant closing windows))
screen -x is nice, but just like I said each sub-windows in screen still open a new bash process. and screen sucks if you want scroll back the output history while switching between each these sub-windows, they will just messed up, this is one of the biggest reason why I always avoid using screen locally. (remote connection to use screen is an exception. ).
Offline
each sub-windows in screen still open a new bash process.
There is nothing to avoid that.
Maybe if bash would employ the urxvt method and have a bashd with bashcs as threads.
screen sucks if you want scroll back the output history while switching between each these sub-windows, they will just messed up
Screen has copy/scrollback mode for that.
C-a [
C-a C-[
C-a esc
Offline
There is nothing to avoid that.
Maybe if bash would employ the urxvt method and have a bashd with bashcs as threads.
the bashd thing is great, but for now my question is clear.
thx for all your guys!
Screen has copy/scrollback mode for that.
C-a [
C-a C-[
C-a esc
Thx a lot, I will have a look at thoes keybindings.
Last edited by seenxu (2009-01-17 20:06:38)
Offline
im sure the last update of urxvt or bash didn't make it open a bash every-time, can anyone confirm this is a new thing??
also, i used to have to 'urxvt -e bash -c "stupid command"' to manually run bash.
Last edited by gav616 (2009-04-17 11:36:43)
Offline
Is it possible to make those urxvts share the same bash process/session(sorry, I don't know how to exactly describe it)?
What is your goal? having 5 different windows with exactly the same contents (all the same bash session) ?
Why you would want that is beyond me.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
There is a daemon/client type shell, can't remember the name, but it is slower and eats more resources than spawning separate bash shells. (there is some other issues with it too.)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline