Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

Report Bugs, Issues and non- package Requests
Message
Author
Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

#1 Post by Jakob77 »

If it is compatible with MX I think all users without a file like this ought to receive it automatically in an update:

Code: Select all

~/.config/xfce4/xinitrc

Code: Select all

#!/bin/sh

# set Xfce PATH so it includes user's private bin if the folder exists

if [ -d "$HOME/bin" ] ; then
    PATH="$PATH:$HOME/bin"
fi

exec /etc/xdg/xfce4/xinitrc

It might as well be next week.? :smile:

Documentation and background discussion:
viewtopic.php?p=724064#p724064

If it is not compatible with MX, I would like to know why.

Thank you. :penguin:

Edit: the last line in the script was missing but is now added.


Edit june 1. 2025:
Update MX25 added to headline
and this post added:
viewtopic.php?p=821066#p821066
Last edited by Jakob77 on Sun Jun 01, 2025 4:10 pm, edited 2 times in total.

User avatar
Eadwine Rose
Administrator
Posts: 14618
Joined: Wed Jul 12, 2006 2:10 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#2 Post by Eadwine Rose »

I wager if things need to be added, the devs will do so on their own time. Thanks.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
CharlesV
Global Moderator
Posts: 7313
Joined: Sun Jul 07, 2019 5:11 pm

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#3 Post by CharlesV »

Jakob77 wrote: Mon May 15, 2023 3:41 pm If it is compatible with MX I think all users without a file like this ought to receive it automatically in an update:

Code: Select all

~/.config/xfce4/xinitrc

Code: Select all

#!/bin/sh

# set Xfce PATH so it includes user's private bin if the folder exists

if [ -d "$HOME/bin" ] ; then
    PATH="$PATH:$HOME/bin"
fi

It might as well be next week.? :smile:


Documentation and background discussion:
https://forum.mxlinux.org/viewtopic.php ... 64#p724064

If it is not compatible with MX, I would like to know why.

Thank you. :penguin:
@Jakob77 The first issue I see here is that unless you add this line to the end of your xinitrc file your going to have a login that goes no where. (ie cannot log in !)

Code: Select all

exec /etc/xdg/xfce4/xinitrc
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
CharlesV
Global Moderator
Posts: 7313
Joined: Sun Jul 07, 2019 5:11 pm

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#4 Post by CharlesV »

Second thing, I would advocate that the user bin should be *infront* of the rest of the path.

The ability for a knowing user to *override* anything in the other bin's... really give that path idea some strength.

so... I would advocate for this instead:

Code: Select all

#!/bin/sh

# set Xfce PATH so it includes user's private bin if the folder exists

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

exec /etc/xdg/xfce4/xinitrc

Then I would + 1
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#5 Post by Jakob77 »

CharlesV

Thank you for adding the line I forgot. :thumbup:

CharlesV wrote: Mon May 15, 2023 5:02 pm Second thing, I would advocate that the user bin should be *infront* of the rest of the path.

The ability for a knowing user to *override* anything in the other bin's... really give that path idea some strength.
Yes but can't it be a risk for the users if they by accident give their script the same name as a command the system uses during boot up or elsewhere.?
And maybe if they are smart enough to make a new command system they are also smart enough to change the PATH.

Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#6 Post by Jakob77 »

Eadwine Rose wrote: Mon May 15, 2023 4:40 pm I wager if things need to be added, the devs will do so on their own time. Thanks.
That is what I take for granted and why I asked.
I have no idea about how much work and time it takes to set up an update to copy one file to all MX Xfce users who hasn't got it already, but I would like to know.

Changing PATH has been a forum subject for about 1½ month.
I over did it by missing a line but my request is minimalistic in order to get a faster result.
I can dream of the delicious MX-tool we could have made instead and maybe will later. I just think we need to do something faster.

But of course only if it is MX compatible, and in spite of minimalism and a long discussion with no warnings about problems in that direction I have to respect that it might not be all easy to determine.




@CharlesV

Do you think we ought to add one more line as a warning to the users.?

Code: Select all

# This file can be overwritten later by automatic updates or a MX-tool.

Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#7 Post by Jakob77 »

And maybe:

Code: Select all

# In order to work this script needs permission to run like a program (  chmod +x ~/.config/xfce4/xinitrc ). 

Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#8 Post by Jakob77 »

Since every single folder name in the file only will be a part of PATH if the folder exist I think it will be a good idea to add more default folders.



~/bin_first

A folder to be placed first and before all the other folders in PATH
As CharlesV wants it.



~/bin_pre

A folder to be placed before ~/bin in PATH




~/bin

The basic user folder for scripts placed last in PATH to protect the scripting user from over ruling basic commands by accident.




~/bin_post

A folder to be placed after ~/bin in PATH




~/mx_home_automation

I don't know about name, rank or need for this folder in PATH.
It is just meant to bring it to the @developers attention before it might be too late to prepare.





Maybe someone wants to add a sixth or a seventh folder to PATH if the folder exist.?



I can vote for letting the developers vote about it. :-)
Maybe it is already implemented in MX23.?



My main priority is still to make it significantly more user friendly for the scripting culture among new users.
And an addition of ~/bin to PATH is in itself enough to do that.

User avatar
thomasl
Posts: 477
Joined: Sun Feb 04, 2018 9:26 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#9 Post by thomasl »

Jakob77 wrote: Mon May 15, 2023 3:41 pmIf it is compatible with MX I think all users without a file like this ought to receive it automatically in an update:
I agree with @Eadwine Rose's take on that.
Jakob77 wrote: Mon May 15, 2023 3:41 pm

Code: Select all

~/.config/xfce4/xinitrc
Additionally, whatever a system update puts onto my system, I strongly object to putting stuff willy-nilly into my ~/.config directory. Doing this would mean getting onto a very slippery slope.

Or as any Englishman will tell you, my $HOME is my castle!
Frugal installs on Lenovo ThinkPad L14 Ryzen 5 4650U/24GB * HP Pavilion Ryzen 3 3300U/16GB * Toshiba R950 i5-3340M/12GB
I have a reservation... What do you mean it's not in the COMPUTER!

User avatar
CharlesV
Global Moderator
Posts: 7313
Joined: Sun Jul 07, 2019 5:11 pm

Re: Requesting update file for PATH (21.3 Wildflower Xfce)

#10 Post by CharlesV »

Jakob77 wrote: Thu Nov 02, 2023 8:53 am Since every single folder name in the file only will be a part of PATH if the folder exist I think it will be a good idea to add more default folders.



~/bin_first

A folder to be placed first and before all the other folders in PATH
As CharlesV wants it.

I do not recall ever saying that I wanted that? Infact, I am pretty sure that this is the first time I have ever seen or heard a "bin_first"
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Locked

Return to “Bugs and Non-Package Requests Forum”