No Bash Prompt in lxterminal

Please post all general support questions for LXDE here.
Locked
whitetimer
Posts: 3
Joined: Sun Nov 21, 2010 12:35 pm

No Bash Prompt in lxterminal

Post by whitetimer »

Hi All

I am just getting used to Linux (and loving it so far) but i have a problem. I can use xterm ok, but when i try to use lxterminal, i just get a blank screen and no prompt at the top ...

I have PS1 in ~/.bashrc

Any suggestions please ?

Many Thanks
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: No Bash Prompt in lxterminal

Post by maces »

Hi,

could you please provide more informations please?

Distribution and Version, LXTerminal Version and maybe the ~.bashrc

maces
whitetimer
Posts: 3
Joined: Sun Nov 21, 2010 12:35 pm

Re: No Bash Prompt in lxterminal

Post by whitetimer »

Hi Maces

I have version lxterminal 0.1.9-1 installed with arch and this is my .bashrc

# Check for an interactive session
[ -z "$PS1" ] && return

alias ls='ls --color=auto'
PS1="[\u@\h:\w ] $ "

## Set Locales to UK/GB

## JDK HOME ##
export JDK_HOME=/opt/java
export PATH=$PATH:$JDK_HOME/bin

## IDEA_JDK ##

## Set Java Fonts
export JAVA_FONTS=/usr/share/fonts/TTF
# export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'

# Set Default Editor
export EDITOR=nano

Really stumped

Many thanks
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: No Bash Prompt in lxterminal

Post by maces »

well, mine looks the same. Currently no clue. What happens if you just type in commands? Does xterm work?

maces
whitetimer
Posts: 3
Joined: Sun Nov 21, 2010 12:35 pm

Re: No Bash Prompt in lxterminal

Post by whitetimer »

Ok if i load up xterm and type su command and login as root and then load up lxterminal, i get the bas prompt. So root works ok but user does not ....

Does that help anymore as i'm stuck really
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: No Bash Prompt in lxterminal

Post by maces »

If you are getting a promt with root, it's a permission problem, sadly I don't know it. Somebody else?

maces
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: No Bash Prompt in lxterminal

Post by Marty Jack »

Difference between .bashrc and .bash_profile comparing root and non-working account?
Do other assignments in .bashrc work (check with printenv)?
rockdoctor
Posts: 116
Joined: Tue Nov 11, 2008 4:51 pm

Re: No Bash Prompt in lxterminal

Post by rockdoctor »

The problem appears to be related to setting in /etc/bashrc (or /etc/bash/bashrc, depending on your distro), ~/.bashrc and ~/.bash_profile. On my Fedora installations, I have the following at the bottom of /etc/bashrc to override the default values of PS1:

Code: Select all

if [ $USER = 'root' ]; then
  #PS1="\w# "
  PS1='\[\033[01;31m\]\w#\[\033[00m\] ' 
else
  #PS1="\w$ "
  PS1='\[\033[01;32m\]\w$\[\033[00m\] ' 
fi
My ~/.bash_profile and ~/.bashrc files are shown below - neither resets the prompts I set in /etc/bashrc

Code: Select all

~$ cat ~/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

~$ cat .bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
Geology - It's not rocket science, it's rock science!
Locked