#How can I quickly determine if a variable has been assigned a path without my specification?
128 messages · Page 1 of 1 (latest)
Have you checked:
- /etc/environment
- /etc/security/pam_env.conf
- ~/.config/environment.d/
But you can also use ripgrep to quickly search for all text files containing PATH=, or your actual path.
Eg:
rg -g '!/proc' -g '!/sys' -g '!/dev' -g '!/tmp' -g '!/usr/*' -g '!/opt' -g '!/var/lib' --no-follow '\bPATH=' / 2>/dev/null
or
rg -g '!/proc' -g '!/sys' -g '!/dev' -g '!/tmp' -g '!/usr/*' -g '!/opt' -g '!/var/lib' --no-follow '\.local/bin\b' / 2>/dev/null
Where .local/bin is the path I'm looking for. Uses standard regex rules btw.
-g '!path' is to exclude a path from your searching, to speed up searches. Feel free to exclude more paths specific to you, such as /mnt etc
Ill do all this rn and send screenshots ❤️
etc/enviroment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
export VDPAU_DRIVER=nvidia
export LIBVA_DRIVER_NAME=vdpau
/etc/security/pam_env.conf
i dont have an enviroment.d
outputs of commands
└──>>find / -type d -name "Spring" 2>/dev/null
/home/khalidwaleedkhedr/SpringBoot
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/vcs-log/Springb_9fbc23f1_bae096b4
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/springboot_app_7c80e887/targets/java-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/springboot_app_7c80e887/targets/resources-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/springboot_app_7c80e887/targets/maven-annotations-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/frameworks/detection/Springboot App.9fbc23f1
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.3/frameworks/detection/SpringbootProject.78a8b23b
┌─[15:56:41]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>
output of find / -type d -name "Spring" 2>/dev/null
Crows
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
Type which springboot
which Spring
which: no Spring in (/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin:/home/khalidwaleedkhedr/.spicetify:/home/khalidwaleedkhedr/.local/bin:/home/khalidwaleedkhedr/SpringBoot/bin:/home/khalidwaleedkhedr/.local/share/JetBrains/Toolbox/scripts:/var/lib/snapd/snap/bin)
but Spring is working
What's the actual executable called?
the command is Spring
the path to it is ~/SpringBoot/bin
it's recongized in my paths but i never put it in my bashrc
and if you type 'Spring' in the terminal, it launches?
Could be a bash function or alias then
my apologies for all the spam
i spent hours trying to understand
and im keeping documentation for anyone who wants to help
i can share my other .bash files
Yep.
want me to share them?
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ "$(tty)" = "/dev/tty1" ]]; then
pgrep i3 || startx "~/.config/X11/xinitrc"
fi
#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
picom &
exec i3
my .profile is empty
which Springboot
which: no Springboot in (/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin:/home/khalidwaleedkhedr/.spicetify:/home/khalidwaleedkhedr/.local/bin:/home/khalidwaleedkhedr/SpringBoot/bin:/home/khalidwaleedkhedr/.local/share/JetBrains/Toolbox/scripts:/var/lib/snapd/snap/bin)
find / -type d -name "*Spring*" 2>/dev/null
/home/khalidwaleedkhedr/SpringBoot
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/vcs-log/Springb_9fbc23f1_bae096b4
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/springboot_app_7c80e887/targets/java-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/springboot_app_7c80e887/targets/resources-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/compile-server/spring
boot_app_7c80e887/targets/maven-annotations-production/Springboot_App_2a1e7100
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.1/frameworks/detection/Springboot App.9fbc23f1
/home/khalidwaleedkhedr/.cache/JetBrains/IdeaIC2023.3/frameworks/detection/SpringbootProject.78a8b23b
all instances of Spring ^
Run this:
rg -g '!/proc' -g '!/sys' -g '!/dev' -g '!/tmp' -g '!/usr/*' -g '!/opt' -g '!/var/lib' --no-follow 'SpringBoot/bin\b' / 2>/dev/null
Could try temporarily renaming the ~SpringBoot/bin folder to say bin.bak or something. Then reboot and check the journalctl logs for any errors, that way it would show which program it was that tried to interact with that path. And we can proceed from there.
will do that now
i appreciate your support and help, again my apologies for being overly spammy
No worries
Yep
any specific command? i can journalctl -p err and journalctl -p err | grep -iE 'file not found|permission denied|file system error'
Yep. Could also grep for SpringBoot
nothing lol
Crows
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
└──>>journalctl -p err
Feb 29 16:12:40 KhalidComputer kernel: integrity: Problem loading X.509 certificate -65
Feb 29 16:12:44 KhalidComputer kernel: amdgpu 0000:06:00.0: amdgpu: Secure display: Generic Failure.
Feb 29 16:12:44 KhalidComputer kernel: amdgpu 0000:06:00.0: amdgpu: SECUREDISPLAY: query securedisplay TA failed. ret 0x0
Feb 29 16:12:45 KhalidComputer bluetoothd[594]: src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv Monitors: Failed (0x03)
Feb 29 16:12:45 KhalidComputer bluetoothd[594]: Failed to clear UUIDs: Failed (0x03)
Feb 29 16:12:46 KhalidComputer kernel:
┌─[16:14:07]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>journalctl -p err | grep -iE 'file not found|permission denied|file system error'
┌─[16:14:52]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>journalctl | grep springboot
┌─[16:16:22]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>
How about Spring?
nothing
And don't forget to use -i for case insensitive match
└──>>journalctl | grep Spring
┌─[16:17:18]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>journalctl | grep -i Spring
┌─[16:18:00]──[khalidwaleedkhedr]──[KhalidComputer]:$~$
└──>>
└──>>echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin:/home/khalidwaleedkhedr/.spicetify:/home/khalidwaleedkhedr/.local/bin:/home/khalidwaleedkhedr/SpringBoot/bin:/home/khalidwaleedkhedr/.local/share/JetBrains/Toolbox/scripts:/var/lib/snapd/snap/bin
somehow still in my path
think my laptop is cursed and needs to be thrown into mount doom ngl
And are you sure you're only using bash? Not zsh or fish or something like that?
i have zsh
Is that what you're typing those commands on?
How about ~/.zshenv, ~/.zprofile, and ~/.zlogin
Can you try running bash directly? Like configure some terminal (Konsole or something) to launch bash as the startup command
And check your PATH there
np
You're in bash now?
shell /bin/bash i added this to my kitty conf
~/.config/kitty/kitty.conf
echo $SHELL returns bin/bash and echo $PATH still shows me Spring despite ~/SpringBoot/bin.bak
Can you run echo $0
Can you also run ps -p $PPID -o comm=
i switched to kde to make it easier lol
and seems like there's nothing special in your kitty.conf either
ye
im probably overreacting
but im just worried for future stuff if pathing springboot is gunna cause depedency issues
or instability issues
i just dont get it
Well you can always rename the folder unless something needs that folder to be called exactly that
dont understand why it's still pathing
At this point I'm outta ideas lol
Spring isnt working since i renamed it
bin.bak
still pathed as /bin
fixed the name and spring works again
Not really familiar with Spring sorry so can't help you with that but normally you'd want to use a dev container to avoid issues like this
i could have used dockers but im not that profecient at coding youre correct
ill maintain what i have; my only last resort is it has something to do with a startup application like jetbrains toolbox
but i dont wish to go through the rabbithole of checking every application on start
regardless; i appreciate your time and professionalism truly.
you were helpful and i learned a lot
All good, but seriously you should check out containers, they're there to deal exactly with issues like these, and they make development a lot more easier.
i am doing that as we speak
this whole endevour was for me to learn springboot since im looking for work
im a newly graduate that earned my second degree
Ah OK
and then this wasted my day
Nah, you learnt some things so I wouldn't call it a waste. 🙂
It's all part of the experience. 🙂
Cool, all the best!
hey, i figured it out
Oh?