You are not logged in.
Pages: 1
Everytime I wanted to run a bash file from terminal, it just dispolays an error message
"Warning: Could not find '(file location)', starting '/usr/bin/bash' instead. Please check your profile settings."
Can anyone help me?
Offline
show not working code.
Offline
Show rather its stat - the file probably lacks the executable bit.
Offline
Show rather its stat - the file probably lacks the executable bit.
I do not know what a "stat" is, I'm very sorry, therefore i'll show you the code:
#!/usr/bin/bash
# fullname="USER INPUT"
read -p "Enter fullname: " fullname
# user="USER INPUT"
read -p "Enter user: " userThe code is just to test the read command
Last edited by inxcvizor (2026-04-11 09:33:43)
Offline
I do not know what a "stat" is
a command, shows detailed info about a file (like who owns it and what permissions it has)
Edit:
https://man.archlinux.org/man/stat.1
Last edited by 5hridhyan (2026-04-11 10:06:48)
---
Online
@inxcvizor: How exactly are you trying to start the script?
Are you using Plasma/KDE ? And Dolphin as Filemanager?
I got the same message in an "empy" konsole(bash) when the script is not executable, when i start it in Dolphin via Actions->Run in konsole
stat --format='%a %A' test.sh
644 -rw-r--r--Journal says:
Apr 11 15:09:39 ws01 systemd[3084]: Started konsolerun.
Apr 11 15:09:39 ws01 konsole[24833]: "Programmdatei kann nicht gefunden werden: " "/home/gerhard/test.sh" MEANS: program could not be found
Apr 11 15:09:39 ws01 konsole[24833]: "Programmdatei kann nicht gefunden werden: " "/home/gerhard/test.sh"
Apr 11 15:09:39 ws01 systemd[3084]: Started app-org.kde.konsole-24833.scope.This makes IMHO sense, cause it's not executable.
If i make it executable
stat --format='%a %A' test.sh
755 -rwxr-xr-xDolphin give another start option:
"Ausführbare Datei starten" means: Start executable file
And now it gets a bit real "fishy" here:
-a) Starting it via Start executable file does "nothing", only in journal:
Apr 11 15:26:05 ws01 systemd[3084]: Started /home/gerhard/test.sh.
Apr 11 15:26:05 ws01 systemd[3084]: app-\x2fhome\x2fgerhard\x2ftest.sh@114ef1a838194c8c9d57a54189e3594d.service: Main process exited, code=exited, status=1/FAILURE
Apr 11 15:26:05 ws01 systemd[3084]: app-\x2fhome\x2fgerhard\x2ftest.sh@114ef1a838194c8c9d57a54189e3594d.service: Failed with result 'exit-code'.Ok, maybe //edit because test.sh is not getting started in a Terminal (konsole,...)
-b) Starting this via Actions->Run in konsole
1. This starts the script, make the two read's, BUT never terminates (even not with an exit in shell script)! Journal:
Apr 11 15:29:23 ws01 systemd[3084]: Started konsolerun.
Apr 11 15:29:23 ws01 systemd[3084]: Started app-org.kde.konsole-25305.scope.I could even not terminate it with CTRL-C.
Although/Cause all so called "apps" meanwhile get run through systemd.services(wtf), i would say this should be NOT the normal, expected behavior with shell scrips in Plasma/Dolhin/systemd.
@inxcvizor:
This/Your script runs fine when started in an open Terminal, either:
a) if the script has no executable bits set
bash -e test.shor, if executable:
./test.shLast edited by GerBra (2026-04-11 13:49:16)
My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy
Offline
The error is a known bash peculiarity (irritating everyone on first encounter) - better™ shells will tell you
◉ LC_ALL=C ./test.sh
zsh: permission denied: ./test.sh-b) Starting this via Actions->Run in konsole
1. This starts the script, make the two read's, BUT never terminates (even not with an exit in shell script)! Journal:
This will likely run "konsole --hold -e test.sh", https://docs.kde.org/stable_kf6/en/kons … tions.html
Otherwise the script would terminate and konsole close.
What you're probably is expecting to be able to drop into an interactive shell, but that doesn't just happen - your script could end w/ "exec bash"
Offline
> This will likely run "konsole --hold -e test.sh"
Yeah, i saw it currently in process list. The script terminates fine, you have to close the Terminal where it was running with STRG+SHIFT+W.
I'm new in Plasma and Dolphin as a filemanager, and i would never want to start my scripts via this way...
So, sorry for the noise.
Best solution for @inxcvizor IMHO.
a) make your script executable
b) start it in an open terminal as mentioned above, this give you easier control for running a script.
c) if you use dolphin (i assumed it), run the script via Actions->Run in console.
My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy
Offline
c) if you use dolphin (i assumed it), run the script via Actions->Run in console.
I'm sorry, but how do you do that?
Offline
Right click on the script you want to run.
In the context menu you should have a entry named "Actions". Therein is the entry: Run/start in konsole (my plasma-Language is German, so i could not 100% correctly name the entries in English).
As mentioned, the script must be executable and the opened konsole window stays open, even when the script is finished. If you work/test on a script this is IMHO a bad way to start the script.
My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy
Offline
It just displays the aforementioned error message
Offline
What's the output of
stat /path/to/your/script.sh
findmnt -T /path/to/your/script.shOffline
stat =
File: /home/lecomputer/Documents/bashStuff/tesprogramme.sh
Size: 124 Blocks: 8 IO Block: 4096 regular file
Device: 8,2 Inode: 11868186 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/lecomputer) Gid: ( 1000/lecomputer)
Access: 2026-04-18 17:57:28.043732577 +0700
Modify: 2026-04-10 21:17:03.952370853 +0700
Change: 2026-04-10 21:17:03.952370853 +0700
Birth: 2026-04-10 21:04:25.721529808 +0700findmnt =
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda2 ext4 rw,relatimeOffline
Well…
chmod +x /home/lecomputer/Documents/bashStuff/tesprogramme.shOffline
Pages: 1