You are not logged in.
If you put the "date > /tmp/startx.date" on the top of your statusbar script (above the print_bat function block), does that create/update the file?
Offline
No it doesn't create it.
Edit: I've even tried with a test script:
#!/bin/bash
tocuh ~/file1And it does nothing. It just won't touch the script.
Last edited by Stafer (2020-06-11 15:36:09)
Offline
"touch", not "tocuh"
stat /path/to/statusbarOffline
Yeah, sorry that was just a mistype.
File: .local/bin/statusbar
Size: 397 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 12585171 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 1000/ ktl) Gid: ( 998/ wheel)
Access: 2020-06-11 17:31:22.914720213 +0200
Modify: 2020-06-11 17:28:55.534710022 +0200
Change: 2020-06-11 17:28:55.661376696 +0200
Birth: 2020-06-11 17:28:55.534710022 +0200Offline
Add
echo $PATH > /tmp/startx.pathto your xinitrc.
Offline
It is in the path:
/usr/local/sbin:/usr/local/bin:/usr/bin:~/.local/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlLast edited by Stafer (2020-06-11 15:58:31)
Offline
In the path of *what*?
Where is that path defined?
startx does not interpret the xinitrc w/ bash, you can't rely on your bashrc nor bashisms nor bash variables.
Can you "/home/ktl/.local/bin/statusbar" in your xinitrc?
Offline
I didn't add to path in bashrc but in /etc/profile
...
appendpath '~/.local/bin'
unset -f appendpath
export PATH
...Can you "/home/ktl/.local/bin/statusbar" in your xinitrc?
This worked.
Am i just supposed to do this from now? I was on manjaro cli and i ran the scripts as i did before.
Offline
You could export the path or ". /etc/profile" in your xinitrc - if you consider that a good idea.
Offline
You should not use "~" in /etc/profile as that is used in processes other than your own user's. That should be in your user's shell profile, e.g., ~/.bash_profile if you use bash.
If the PATH is set and exported from ~/.bash_profile it will be available under xinit, and almost certainly startx (unless startx has recently changed to override it ... which sadly wouldn't be a huge surprise to me).
EDIT: D'Oh, the actual problem is that you quote the tilde so it is never expanded. While it is still not ideal to have that in /etc/profile, it will work if you get rid of those single quotes.
However, if these scripts work in your interactive shell, you are already appending ~/.local/bin to your PATH somewhere else. Consolodate these into the proper place: ~/.bash_profile.
Last edited by Trilby (2020-06-11 16:45:38)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You should not use "~" in /etc/profile as that is used in processes other than your own user's. That should be in your user's shell profile, e.g., ~/.bash_profile if you use bash.
If the PATH is set and exported from ~/.bash_profile it will be available under xinit, and almost certainly startx (unless startx has recently changed to override it ... which sadly wouldn't be a huge surprise to me).
EDIT: D'Oh, the actual problem is that you quote the tilde so it is never expanded. While it is still not ideal to have that in /etc/profile, it will work if you get rid of those single quotes.
However, if these scripts work in your interactive shell, you are already appending ~/.local/bin to your PATH somewhere else. Consolodate these into the proper place: ~/.bash_profile.
Well, it's better than that. From a POSIX sh shell, you can define the PATH variable to have the string literal "~/.local/bin" in it, and it will NOT be used, because POSIX sh doesn't interpret that, and even bash --posix will not interpret that.
If you later start a bash shell, with that existing PATH, the bash shell will see the tilde and actually look in the current user's home directory. Because you started bash.
Am i just supposed to do this from now? I was on manjaro cli and i ran the scripts as i did before.
My god. People warned me about arch forums but did't expect they would be this bad.
Did they also warn you that this is not the Manjaro support forums, and you don't get to ask about other distros here?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
If anyone's facing this non-issue, just ad an script in your /etc/profile.d/script.sh
export PATH="$HOME/.local/bin:$PATH"Or whatever directory you want to add to path. After doing that you'll have to either logout or reboot.
Offline
# 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
fiThis default comment in /etc/X11/xinit/xinitrc already suggests where some nice programs should be.
Offline