← Back to team overview

lubuntu-desktop team mailing list archive

Re: Help Needed

 

I'm feeling lazy and don't want to make another forum account, even though, for lxde, I probably should. That being said, the solution is quite simple.

For a login shell, ~/.profile is the go to file. This works where the "login" command is being used, i.e. this even works if you open lxterminal and then use said command to login within the shell, thereby creating a shell (that is using ~/.profile) within a shell (that is not using ~/.profile as it does not work for interactive shells). To put the questions to rest, this is also what is being employed by the display manager to log you in and ultimately start lxde.

I believe the OP wanted to add ~/bin to his $PATH, which, actually, ~/.profile does by default, after first checking for the existence of ~/bin. Of course, it could be explicitly added with

PATH="$PATH:$HOME/bin"

but a more elegant solution is certainly the one contained within:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

To make clear what's happening here, if -d checks to see whether the given argument exists as a directory. That being said, the comment pretty clearly describes in words exactly what is happening.

If you really want to first hand see the effectiveness of ~/.profile, try this:

echo "ace-minesweeper" >> ~/.profile

then logout and log back in again. You'll apparently be stuck in purgatory between lxdm and lxde with nothing but ace-minesweeper. Finish your game and quit and you'll be whisked off to lxde. :D

I'm going to go add this to the wiki now.

wxl/walter

On 11/07/2011 10:57 AM, amjjawad HOOHAA wrote:
Please check the OP reply: http://forum.lxde.org/viewtopic.php?f=8&t=31421 <http://forum.lxde.org/viewtopic.php?f=8&t=31421>

On Thu, Nov 3, 2011 at 1:24 AM, Andrew Woodhead <andrew.woodhead666@xxxxxxxxx <mailto:andrew.woodhead666@xxxxxxxxx>> wrote:


    On Wed, Nov 2, 2011 at 9:16 PM, Ali Linx <amjjawad@xxxxxxxxx
    <mailto:amjjawad@xxxxxxxxx>> wrote:

        A user has a problem and he posted on Ubuntu Forum but got no
        solution so he posted on LXDE Forum seeking for help:
        http://forum.lxde.org/viewtopic.php?f=8&t=31421
        <http://forum.lxde.org/viewtopic.php?f=8&t=31421>
        I don't know anything about what he's asking so hope someone
        could help him.


Follow ups

References