Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: there is no ~/.xsession file - what selects the DE to run?

  1. #11
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    2,023
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: there is no ~/.xsession file - what selects the DE to run?

    Quote Originally Posted by halogen2 View Post
    If I were doing this I would edit (or better, if possible, copy somewhere it would override the original and edit the copy) the /usr/share/xsessions/*.desktop files to point to a wrapper script that calls your script with the DE name as an argument, and after your script is done exec the command that was originally in said .desktop file. I'd have your script keep its own track of what DEs the user logs into.
    how does one execute a .desktop file from a script? is executing what the Exec= line has good enough?

    Quote Originally Posted by halogen2 View Post
    Unless you also need this for non-GUI/tty sessions?
    no.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer

  2. #12
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    2,023
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: there is no ~/.xsession file - what selects the DE to run?

    Quote Originally Posted by dddman View Post
    https://wiki.archlinux.org/title/Xprofile

    sounds like what your looking for
    i cannot determine from that page if my script would be run in place of some other script. if so, that would probably make it necessary to add stuff to my script, such as actually running the DE. if so, how to run it? in the background? use exec (or its python equivalent) to replace my process? retain certain environment variables?
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer

  3. #13
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: there is no ~/.xsession file - what selects the DE to run?

    Quote Originally Posted by Skaperen View Post
    how does one execute a .desktop file from a script? is executing what the Exec= line has good enough?
    What I had in mind was the reverse: have the .desktop file execute a wrapper script that calls your script. Then yes, have the wrapper script execute what the Exec= line has.

    Quote Originally Posted by Skaperen View Post
    probably make it necessary to add stuff to my script, such as actually running the DE. if so, how to run it? ... use exec (or its python equivalent) to replace my process?
    This, I think.

    If you try my implementation idea, it wouldn't necessarily be your main script though, you could write the wrapper script in bash and just use exec from there after your main script exits.
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •