You are not logged in.

#1 2009-12-13 02:59:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

[SOLVED] Shell prompt takes 20 secs to appear

Over the last couple of days my terminal prompt has been taking longer and longer to appear.

I start a terminal (urxvt or xterm, it doesn't matter which) and there is a cursor in the top right hand corner that just sits there. After 15-20 seconds, the prompt appears and then it works fine. The problem repeats if I open another instance.

I am starting urxvtd from .xinitrc. I have dialled back the bash history to 200, but the problem persists.

Anyone else seen this sort of thing? Any pointers as to where I should look?

Last edited by jasonwryan (2009-12-13 22:40:22)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#2 2009-12-13 03:02:49

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

Weird.  What happens when you try to login to a VT?  Also, does "strace bash" pause for a long time on any one call?

Offline

#3 2009-12-13 03:21:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

Same thing in a VT - marginally quicker, probably only 10-12 seconds...

strace chokes at:

rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(0,

/edit

I've rolled back to a vanilla prompt and that has fixed the problem. I'll mark the thread solved when I work out what the problematic prompt was breaking...

Last edited by jasonwryan (2009-12-13 04:04:41)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2009-12-13 16:14:36

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

have you tried another terminal shell ?

instead of bash try zsh or another one to check if it is bash.

maybe it's something in the ~/.bashrc
you can check the pacman.log to see if something has changed.

Last edited by quarkup (2009-12-13 16:15:21)


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#5 2009-12-13 17:40:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

I think it was something to do with the PS1 - I haven't been able to isolate the problem, but using the standard one fixed it.

I'll reintroduce bits of it at a time to see where it breaks...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2009-12-13 19:43:19

Kitty
Member
From: The Burning Desert
Registered: 2008-01-11
Posts: 88

Re: [SOLVED] Shell prompt takes 20 secs to appear

Could you post the problematic PS1? It'll be interesting to see, also, enabling bash completion can slow things down some too.


/etc/rc.d/ is where daemons reside. Beware.

Offline

#7 2009-12-13 19:50:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

Sure:

 PS1="┌─[\[\e[36m\]\h\[\e[0m\]][\[\e[32m\]\w\[\e[0m\]]\n└─╼ "

It has worked fine for months, but I copied and pasted it into an email for someone and I may have messed up the formatting around that first character - that's my current theory anyway...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2009-12-13 22:06:22

Kitty
Member
From: The Burning Desert
Registered: 2008-01-11
Posts: 88

Re: [SOLVED] Shell prompt takes 20 secs to appear

Copied and pasted exactly as your have into my .bashrc, and have no problems. FWIW in gnome-terminal.


/etc/rc.d/ is where daemons reside. Beware.

Offline

#9 2009-12-13 22:07:18

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

you would just need to change temporarily your PS1 variable then
i guess you could give it a try (im not sure if you need to reboot)

probably you just need to change the PS1 variable and then source ~/.bashrc or open another shell (by executing bash or xterm)

anyway, i use this one and it is fast although it has no symbols
PS1="\[\e[1;01m\]\#)\[\e[0;00m\] \u\[\e[0;36m\]@\[\e[0;00m\]\h \[\e[1;31m\]\W\[\e[1;36m\e[0;00m\] \$ ";


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#10 2009-12-13 22:40:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Shell prompt takes 20 secs to appear

Thanks for the pointers.

@Kitty the version I posted wasn't the broken one - it was a backup.

@ quarkup I had rolled back to a vanilla PS1 - and that fixed the problem.

I'll mark it solved as it seems it was related to that first character getting munged.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB