14
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 14 Aug 2023
14 points (93.8% liked)
Linux
48740 readers
1564 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
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:—
to the top of
.profile
, and:—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 differentPATH
s. 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.Hi, Thanks for the response. Sorry for disturbing you. I have tried what you have suggested here. There are two files with matching timestamps but different PATHs. I am using i3wm in Debian 11. Please tell me how to deal with this issue.
Admittedly, I have much less experience with i3, so I fired up a virtual machine with Debian 11.6 and installed
i3
(along withlightdm
) and was able to recreate the problem of.profile
not being executed when logging in, so this isn't unique to your particular setup. Great!Fortunately, this combination does execute commands in
~/.xsessionrc
, so I added:—to that file, then logged out and back in again. That did the trick for me, with the commands in
.profile
then successfully modifying thePATH
variable (and writing additional lines to the execution log files), so I suggest you try creating/modifying.xsessionrc
in the same way.Oh, thanks a lot for the efforts! You really are one of a kind to conduct an experiment to help out a stranger on the internet. Yeah, this actually works. I just added those lines to .xsessionrc and all problems were solved.
If you don't mind my asking. Do you work in IT as a sysadmin or a developer or a cybersecurity expert? Or something else? I am just curious as to how may have gained such knowledge.
Helping one another out is invisibilized, not rare. A good chunk of what I know comes from other people taking the time to explain why something works the way it does and how you can see that for yourself. The rest is from curiosity, experimentation, and hammering away at something until it fits. It's not professionally specialized knowledge.
@aebletrae @liberatedGuy this just happened to me today and I am forever grateful to that person for explaining it instead of "shit.just.works."