Skip Navigation

aebletrae [she/her]
aebletrae [she/her] @ aebletrae @hexbear.net
Posts
0
Comments
44
Joined
2 yr. ago

  • But those kinds of initialisations belong in .profile (or, if you're using a weird desktop environment, its own configuration file), particularly if you want .desktop files to work. (In .bashrc, PATH will grow longer in each subshell, which shouldn't cause problems but is wasteful.)

    So, what desktop environment (GNOME, KDE, Cinnamon, etc.) are you using?

    .profile is executed by login shells for the benefit of it and its subshells, and by DEs like Cinnamon for the benefit of .desktop launchers at login.

    So, have you logged out and back in again since adding these lines to .profile?

    And of course, the .profile has to be executed properly for its configuration to take effect, so it`s useful to know if the problem is with those specific lines, or the file as a whole.

    Add:—

     
            date >> ~/profile-execution-log-top.txt
        echo $PATH >> ~/profile-execution-log-top.txt
    
    
      

    to the top of .profile, and:—

     
            date >> ~/profile-execution-log-end.txt
        echo $PATH >> ~/profile-execution-log-end.txt
    
    
      

    to the bottom of .profile (use alternative paths as you see fit) to monitor that activity. You can test this by sourcing .profile but the real test is logging out and in again. Look at the time when you do this so you can correlate each action with each timestamp in the log files. If .profile is executed to completion, you should have two files with matching timestamps but different PATHs. If you don't have a matching timestamp in the "end" log file, there's a problem mid-execution. If neither file is being updated, .profile isn't being executed at all.

  • Since .bashrc is executed for all non-login shells, it shouldn't really source .profile, which is only meant for login shells, and might trigger expensive activity. (.profile might source .bashrc, but that`s fine.)

  • Are other lines in .profile being executed, or is the whole file ignored? Have you logged out and in again since adding these lines?

  • Ah, Enhanced, the folks that brought us interrogation.