You are not logged in.

#1 2008-10-25 12:16:25

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

[solved] zsh and awesome

I'm running awesome v3.0 using zsh as my shell. The problem is that, by default, zsh runs background apps with their nice set to 5.

I've already set no_bg_nice on both ~/.zprofile and ~/.zshrc, but it didn't solve the problem. Does anyone have any idea of what I can do?

Last edited by andre.ramaciotti (2008-10-26 13:19:21)


(lambda ())

Offline

#2 2008-10-26 13:18:59

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [solved] zsh and awesome

I solved the problem. I'll post the solution as someone may have the same problem:

Now I start X with 'SHELL=/bin/sh startx', of course, I made an alias to it. It'll solve the problem of having the nice of your apps set to 5 by default, but it'll create a new problem: when you start any terminal on X, it'll be using sh and not zsh.

To solve this new problem, change your ~/.config/awesome/rc.lua and put "SHELL=/bin/zsh" before the command you use to run the terminal.

-- terminal = "urxvtc"
terminal = "SHELL=/bin/zsh urxvtc"

(lambda ())

Offline

#3 2008-10-26 15:25:44

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: [solved] zsh and awesome

Dumb question: What's the downside to background apps having nice set to 5?

Offline

#4 2008-10-26 15:28:56

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [solved] zsh and awesome

Well, what is called background apps here are apps like firefox, liferea, emesene... The problem is that sometimes they feel a little sluggish because of that.


(lambda ())

Offline

#5 2008-10-26 16:13:15

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [solved] zsh and awesome

I'm just wondering.. in your original situation, what processes had niceness<5 besides system processes?

Last edited by creslin (2008-10-26 16:16:02)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#6 2008-10-26 16:41:53

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [solved] zsh and awesome

my ~/.xinit first runs '~/.bin/start.sh' and then 'exec awesome' (e.g. conky is on ~/.bin/start.sh, so it runs with niceness = 0).

The problem was with apps that I started from awesome.


(lambda ())

Offline

#7 2008-10-26 17:04:27

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [solved] zsh and awesome

Ah your autostart script, of course.. I couldn't think of what would still be running at niceness=0.  I knew I was missing something.


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#8 2008-11-17 15:29:05

ST.x
Member
From: Sydney, Australia
Registered: 2008-01-25
Posts: 363
Website

Re: [solved] zsh and awesome

andre.ramaciotti wrote:

I solved the problem. I'll post the solution as someone may have the same problem:

Now I start X with 'SHELL=/bin/sh startx', of course, I made an alias to it. It'll solve the problem of having the nice of your apps set to 5 by default, but it'll create a new problem: when you start any terminal on X, it'll be using sh and not zsh.

To solve this new problem, change your ~/.config/awesome/rc.lua and put "SHELL=/bin/zsh" before the command you use to run the terminal.

-- terminal = "urxvtc"
terminal = "SHELL=/bin/zsh urxvtc"

Just a question, because I just saw the same thing. So by using 'SHELL=/bin/sh startx' you are starting X with sh not zsh - which is in to not have app nice set to 5 by default. Okay so you just made an alias for startx as SHELL=/bin/sh startx ? and did the other trick in the rc.lua as well.

thanks

Last edited by ST.x (2008-11-17 15:30:27)

Offline

#9 2008-11-17 15:39:21

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [solved] zsh and awesome

Yes, I made an alias for startx. In my ~/.zshrc I put this line:

alias startx='SHELL=/bin/sh startx'

And I changed ~/.config/awesome/rc.lua. On the beginning of the file there's a variable named "terminal". Just change its contents to:

terminal = "SHELL=/bin/zsh urxvtc"

and it should work fine. Notice that I use urxvtc as my terminal, change it to the one you use.


(lambda ())

Offline

Board footer

Powered by FluxBB