Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

.profile not finding new ~/bin directory - SOLVED

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: .profile not finding new ~/bin directory

#16 Post by Dai_trying »

When you added the .xsessionrc file you would have to re-boot (or maybe just logout and back in might work) for it to take effect, the difference is that with this being in .bashrc file the $PATH is only set when using a terminal (with bash) and not system-wide, I have used this method for quite some time and it is only since this thread provided me with the (now preferred) alternative of using .xsessionrc the path will always be available.

For instance if you use .bashrc and have a script in your ~/bin/ folder called myscript.sh and try to run it from the application finder (Alt+F2) it will not find your myscript.sh file, whereas if you put the $PATH direction into .xsessionrc it will be available globally and can be run from Application Finder (after a reboot).

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: .profile not finding new ~/bin directory

#17 Post by Head_on_a_Stick »

I've just tested the live version of Cinnamon and it doesn't read ~/.profile, which is strange because my GNOME desktop does. Perhaps this is a bug in the Cinnamon desktop.

I can confirm that ~/.xsessionrc works in Cinnamon, make sure you log out & back in again to see the effect (as Dai notes).
deadbang

DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

Re: .profile not finding new ~/bin directory

#18 Post by DocTomJP »

Gentlemen : you have steered me to success!

I set the xsessionrc file as you instructed, and now I have the ~/bin file appended.

For information, the difference between the latest and the earlier attempt (that failed) was simply that after deleting the original .bashrc file, and importing the one from skel, the files created thereafter were set to root as owner. This I did not notice on the first attempt with .xsessionrc. But on the latest successful pass at it, I did notice the root ownership, so I changed the owner to me, and all was good after that.

So I am up and running with the ~/bin file in the PATH, as required.

I am extremely grateful for all your help. Not only have you got my issue solved, but you have taught me a few things in the process.

So regards and very many thanks, Tom.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: .profile not finding new ~/bin directory

#19 Post by Dai_trying »

You're welcome, if you could mark the post as solved (edit title of first post) others could find it easier in the future.

Post Reply