LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Constant errors in .bash_profile and startx does not load automatically (https://www.linuxquestions.org/questions/linux-newbie-8/constant-errors-in-bash_profile-and-startx-does-not-load-automatically-830264/)

mmoi5 09-04-2010 12:23 AM

Constant errors in .bash_profile and startx does not load automatically
 
Hello one and all.
I am already grateful for coming across this site not to mention the delight in reading many earlier responses that have aided me in resolving issues with linux installations.

Here is to hoping that you guys would aid once again.

I have installed Damn Small Linux on an old laptop.
Every boot reports that the SSH has loaded as I have configured it to do so but does not load startx as instructed in .bash_profile.

After bootup, the following is reported by the system.

-bash: /home/dsl/.bash_profile: line 12: syntax error: unexpected end of file

This is the content of the .bash_profile
#!/bin/bash
export IRCNICK=DSL
export DISPLAY=:0
SSH=`env | grep SSH_CONNECTION`
RUNLEVEL=`runlevel|cut -f2 -d' '`
if [-z"$SSH"];then
if[$RUNLEVEL -eq 5];then
startx
fi
fi


I have tried to # entries and realized that I had to # starting from the IF statement and all the way to the end in order to eliminate the error.

Startx will load properly after boot but will not load automatically as a part of the boot.

I can also load startx from a SSH session but the minute I terminate the SSH session the GUI unloads back to prompt.

If you know were I have gone wrond I would greatly appreciate it if you point it out.

In advance, thanks....... Mmoi5

crts 09-04-2010 06:33 AM

duplicate post of
http://www.linuxquestions.org/questi...ically-830265/


All times are GMT -5. The time now is 12:19 PM.