WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it  (Read 13901 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #30 on: December 20, 2020, 07:23:40 PM »
Hi jazzbiker
@Rich
 ... what's Your opinion about these sort's in .xsession? Probably andyj is using persistent ~ too.
I'm a big fan of consistent behavior, so my opinion is include the sort command.
« Last Edit: December 20, 2020, 09:42:56 PM by Rich »

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #31 on: December 20, 2020, 09:20:47 PM »
Using ls for creation time based sorting:
Code: [Select]
[ -d "/usr/local/etc/X.d" ] && ls -tc $(find "/usr/local/etc/X.d" -type f -o -type l) | while read F; do echo "$F"; done

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #32 on: December 20, 2020, 10:24:29 PM »
GNUser, sorry for disturbing and making so many noise.
It's an interesting discussion, not noise, so nothing to be sorry about :)

My two cents on the thread so far:

1. I love how conservative TCL is, and how much care goes into making sure that changes cause no breakage. This is yet another of TCL's many outstanding qualities.

2. I agree that predictability and controllability are both important. It seems that having "sort" in the /usr/local/etc/X.d line would add predictability and, for extensions where it is important, would give the extension maintainer controllability. TCL11 x86_64 repo currently has only one extension (open-vm-tools-desktop.tcz) that puts something in /usr/local/etc/X.d, so it would not be difficult for extension maintainers to coordinate in the unlikely event that execution order matters.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #33 on: December 20, 2020, 10:40:05 PM »
Hi jazzbiker
Changing file names to control order of execution is more practical and intuitive than changing creation times.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #34 on: December 26, 2020, 03:12:46 AM »
I haven't updated Xlibs so far as it looks like we didn't come to an agreement on changes to the start-up script?

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #35 on: December 26, 2020, 03:55:52 AM »
Hi, Juanito!

I feel guilty, that my attempt to propose sorting improvement leads to GNUser's proposal refusal. In my opinion we all agreed that adding "sort" to both ~/X.d and /usr/local/etc/X.d chains will provide predictability and controlability - this is GNUser's second submitted extension. If You expect this controversial, please post the first GNUser's submission with links added to ~/.X.d chain and without any sortings.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #36 on: December 26, 2020, 11:28:23 AM »
My impression was that we had reached agreement. To summarize:

1. Supporting links in $HOME/.X.d is an add-on feature that does not break anything; curaga gave the green light and there were no objections.

2. Adding  sort  to the $HOME/.X.d line would ensure predictable execution order of user's jobs; any breakage that arises from the change (going from unpredictable to predictable execution order) would be easy to fix by user renaming jobs so that names reflect desired execution order.

3. Adding  sort  to the  /usr/local/etc/X.d  line shouldn't break anything because it seems only rare extensions (I can only find open-vm-tools-desktop.tcz) use that directory. It seems advantageous to have  sort  in there going forward, to ensure predictability if/when more extensions use that directory.

Objectors and supporters, please speak up! If no objections are voiced, perhaps it would be reasonable to assume agreement and move forward with the changes.

P.S. My second Xlibs.tcz submission is the one that contains all of the proposed changes.
« Last Edit: December 26, 2020, 11:34:50 AM by GNUser »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #37 on: December 26, 2020, 11:38:23 AM »
To avoid confusion, please post the startup script here.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #38 on: December 26, 2020, 11:42:51 AM »
Hi GNUser
My impression was that we had reached agreement. To summarize: ...

1. Agreed.

2. Agreed. It also removes the unpredictability between RAM and hard drive behavior mentioned here:
http://forum.tinycorelinux.net/index.php/topic,24585.msg156066.html#msg156066

3. Agreed. Since andyj approves, that's good enough for me.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #39 on: December 26, 2020, 12:02:33 PM »
Hi, Juanito. Here is /etc/skel/.xsession (part of Xlibs.tcz) with all three proposed changes:

Code: [Select]
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "/usr/local/etc/X.d" ] && find "/usr/local/etc/X.d" -type f -o -type l | sort | while read F; do . "$F"; done
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -o -type l | sort | while read F; do . "$F"; done

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #40 on: December 26, 2020, 02:33:32 PM »
3. Agreed. Since andyj approves, that's good enough for me.
8)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #41 on: December 26, 2020, 07:16:19 PM »
To close any doubts in the full consensus, my answers to GNUser's questions put in the #36 post are:

1. Yes (links in ~/.X.d)
2. Yes (find $HOME/.X.d | sort)
3. Yes (find /usr/local/etc/X.d | sort)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #42 on: December 27, 2020, 04:26:14 AM »
Xlibs updated in 11.x x86/x86_64 repos and 12.x armv6/armv7/aarch64 repos

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: [Solved] links in ~/.X.d/ don't work, a small change to Xlibs.tcz fixes it
« Reply #43 on: December 27, 2020, 09:02:24 AM »
Hurray!
Thank you all for the interesting discussion and Juanito for posting :)