WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] relationship between bootlocal --- .xsession---.X.d  (Read 2603 times)

aus9

  • Guest
[Solved] relationship between bootlocal --- .xsession---.X.d
« on: August 21, 2018, 03:07:50 AM »
Hi

For various reasons I need to play with different contents of .xsession.

I attempted to see if bootlocal was processed before or after .xsession but none the wiser.


Some Questions
Can anyone confirm if bootlocal is processed before loading your session via .xsession?

2) Does .X.d only work for those booting into Xorg or does it work for anyone booting into libX as well?

3) What I am really after.....is a way to boot up into a session and by script....delete the current .xsession

putting a delete command into shutdown.sh only works if I have no freeze ....and assumes I can  use exittc.

thanks for reading

PS some distros have an "autostart" type dir where I could place scripts once a graphical environment has started.
« Last Edit: August 21, 2018, 08:50:13 PM by Rich »

Offline Nathan_SR

  • Jr. Member
  • **
  • Posts: 82
    • Quick-Save-Live
Re: relationship between bootlocal --- .xsession---.X.d
« Reply #1 on: August 21, 2018, 04:55:12 AM »

Hi aus9,

To answer your questions, I will use my experience with designing the Quick-Save-Live Rescue CD ( https://sourceforge.net/projects/quick-save-live/ ) wherein :

1. I have added automount filesystem commands in the bootlocal.sh file and they get executed first
2. I have autostarted spacefm file manager using a .sh file under .X.d folder and it gets started after the xsession starts. By the way, this concept is similar to the autostart folder of other linux systems, wherein you add the .desktop file there.
3. I have used the plain vanilla tiny core base for creating this live cd, for maximum compatibility, which means it uses Xvesa instead of Xorg and it works well
4. You can test/check this live cd, by writing it on to a CD/USB drive ( For USB, use the MultiBootUSB-Live DVD at https://sourceforge.net/projects/multibootusb-live/ )

P.S. For a quick video preview of this Rescue CD, Watch : https://youtu.be/CXRZiwJlqgs

Hope this helps.

Regards,

Nathan SR

aus9

  • Guest
Re: relationship between bootlocal --- .xsession---.X.d
« Reply #2 on: August 21, 2018, 08:06:16 PM »
Nathan_SR
Thanks.
I have yet to play with your iso or the advice from your answers but will do so soon.

To anyone

so the answers are:
1 bootlocal then .xsession
2  after .xsession.....scripts in X.d

Moderators
Can you mark this as solved pls

cheers



Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11589
Re: [Solved] relationship between bootlocal --- .xsession---.X.d
« Reply #3 on: August 21, 2018, 08:56:09 PM »
Hi aus9
...
2  after .xsession.....scripts in X.d
 ...
The scripts in  .X.d  are called by the last line in  .xsession.

aus9

  • Guest
Re: [Solved] relationship between bootlocal --- .xsession---.X.d
« Reply #4 on: August 22, 2018, 02:01:25 AM »
to anyone
skip reading this....Question has been solved thanks

Rich

yes and I should have re-read corebook.pdf which says the same thing. Chapter 19.9 and 19.10

Altho I observe it gives no examples and does not appear to need a shebang so to answer my OP Question (3)

Code: [Select]
cat .X.d/session
/bin/rm -rf /home/tc/.xsession

with no entries in either bootlocal or shutdown as just been tested and works OK for a libX WM (openbox)
and should in theory work for all WM/DE except  Wayland compositors (IMHO)

hidden agenda....I am testing using xsession to swap between libX and a Wayland compositor

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11589
Re: [Solved] relationship between bootlocal --- .xsession---.X.d
« Reply #5 on: August 22, 2018, 08:52:53 AM »
Hi aus9
... Altho I observe it gives no examples and does not appear to need a shebang ...
That's because the files in  .X.d  don't actually run or execute.

The scripts in  .X.d  are called by the last line in  .xsession.
Technically that's incorrect. The  .xsession  script reads and executes line by line the contents of each file in  .X.d.