You are not logged in.

#1 2010-09-10 14:22:50

Kansl
Member
Registered: 2009-10-08
Posts: 15

Screen question

Hello,

i want to use every zsh in screen, how can I do that. I use Xmonad en zsh and want to manage every screen/terminal/app on my desktop.

Thank you

Offline

#2 2010-09-10 14:43:37

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Screen question

I'm sorry, your question is a little confusing.

Is Zsh your "default shell"?

http://wiki.archlinux.org/index.php/Zsh … ault_shell

chsh -s `which zsh`

Is that good?

Offline

#3 2010-09-10 14:45:51

Kansl
Member
Registered: 2009-10-08
Posts: 15

Re: Screen question

Yes

Offline

#4 2010-09-10 14:46:54

Kansl
Member
Registered: 2009-10-08
Posts: 15

Re: Screen question

I want screen as default shell

Offline

#5 2010-09-10 14:48:32

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: Screen question

Look if there is a file /home/your-user-name/.screenrc and if there is a line like "shell bash" in it. If there is such a line, change bash (or whatver there is) to /bin/zsh

I'm just guessing what you mean though, so dunno if this is what you meant.

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#6 2010-09-10 15:02:53

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Screen question

Oh! You want to automatically start "screen" when you use a terminal window, right? Good idea. Me too. wink

But, I don't know how to do it.

Maybe somebody else knows how to do it...

Offline

#7 2010-09-10 15:08:01

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Screen question

in your bashrc or zshrc you can test for $STY.
[ $STY ] || screen

Offline

#8 2010-09-10 15:26:15

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Screen question

In ".zshrc":

[ $STY ] || screen

It works! Thank you.

Kansl, is that a good answer?

Offline

#9 2010-09-13 00:13:22

Kansl
Member
Registered: 2009-10-08
Posts: 15

Re: Screen question

drcouzelis wrote:

In ".zshrc":

[ $STY ] || screen

It works! Thank you.

Kansl, is that a good answer?

It works when I login on my TTY, when I logged in I get screen, but when I start X, screen disappeared sad.

In X, I get a normal terminal (urxvtc) as configured in Xmonad, so no, this is not my answer...

Offline

#10 2010-09-13 02:20:50

codycarey
Member
Registered: 2009-08-21
Posts: 154

Re: Screen question

Kansl wrote:
drcouzelis wrote:

In ".zshrc":

[ $STY ] || screen

It works! Thank you.

Kansl, is that a good answer?

It works when I login on my TTY, when I logged in I get screen, but when I start X, screen disappeared sad.

In X, I get a normal terminal (urxvtc) as configured in Xmonad, so no, this is not my answer...

If you're using a menu in Xmonad to start a terminal it's probably using whatever terminal app is in it's config file, not your default as you've previously set up. You need to modify Xmonad's configuration files to use screen instead of urxvtc.

Last edited by codycarey (2010-09-13 02:21:23)

Offline

#11 2010-09-13 08:59:58

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Screen question

Put unset STY in your .xinitrc

The same thing will happen if you start a terminal from within screen. The environment has STY and will pass it to the new terminal, bashrc finds it and won't start screen.

In this case all of X has the STY variable set.

Another option is to launch X before you launch screen in your bashrc, checking for the DISPLAY variable in similar fashion.

Offline

Board footer

Powered by FluxBB