Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911787 - x11-wm/openbox: xsession file is missing shebang, preventing startup with startx (and $XSESSION=openbox)
Summary: x11-wm/openbox: xsession file is missing shebang, preventing startup with sta...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LxQt maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-05 21:41 UTC by callison caffrey
Modified: 2023-08-05 22:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description callison caffrey 2023-08-05 21:41:43 UTC
startx won't work with openbox, because in /etc/X11/Sessions/openbox the #!/bin/bash is missing. Added that, now it works.

I would have asked the IRC people where to file this properly, but the real people are upset with me as usual. So my apologies for pestering whoever has to sort this out.

I'm on musl (dev). OpenRC, no systemd. 

x11-wm/openbox
Installed versions:  3.6.1-r5(3)(23:11:39 07/30/23)(imlib -branding -debug -nls -session -startup-notification -svg -xdg PYTHON_SINGLE_TARGET="python3_11 -python3_10")

If there's anything else you need let me know. 

Should it turn out this was my fault, I apologize for wasting your time. Though I can't see how. I didn't mess with the /etc/X11/Sessions/ files.

Thanks for reading.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 21:46:46 UTC
Yeah, it seems to need a shebang.
Comment 2 callison caffrey 2023-08-05 21:54:28 UTC
(In reply to Sam James from comment #1)
> Yeah, it seems to need a shebang.

Glad I could help.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 22:00:45 UTC
From /etc/X11/chooser.sh:
```
[...]
if [ -n "${XSESSION}" ]; then
        if [ -f /etc/X11/Sessions/${XSESSION} ]; then
                if [ -x /etc/X11/Sessions/${XSESSION} ]; then
                        GENTOO_EXEC="/etc/X11/Sessions/${XSESSION}"
                else
                        GENTOO_EXEC="/bin/sh /etc/X11/Sessions/${XSESSION}"
                fi
        elif [ -n "${GENTOO_SESSION}" ]; then
                if [ -x "${GENTOO_SESSION}" ]; then
                        GENTOO_EXEC="${GENTOO_SESSION}"
                else
                        GENTOO_EXEC="/bin/sh ${GENTOO_SESSION}"
                fi
        else
[...]
```

So a file in /etc/X11/Sessions with just the path that's *not* executable is fine, but if it's executable, it's reasonably treated as a script. Oops.

There's a bunch of other examples in tree which I'll check now.
Comment 4 callison caffrey 2023-08-05 22:21:48 UTC
(In reply to Sam James from comment #3)
> From /etc/X11/chooser.sh:
> ```
> 
> So a file in /etc/X11/Sessions with just the path that's *not* executable is
> fine, but if it's executable, it's reasonably treated as a script. Oops.
> 
> There's a bunch of other examples in tree which I'll check now.

Just don't forget to be polite about it.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 22:29:00 UTC
Please leave personal comments out of it, thanks.
Comment 6 Larry the Git Cow gentoo-dev 2023-08-05 22:29:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9198feb0dc9af82c863c7839d339c6a54bd76c

commit 7f9198feb0dc9af82c863c7839d339c6a54bd76c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:28:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:31 +0000

    x11-wm/openbox: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Closes: https://bugs.gentoo.org/911787
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/openbox/openbox-3.6.1-r6.ebuild | 126 +++++++++++++++++++++++++++++++++
 x11-wm/openbox/openbox-9999.ebuild     |  11 ++-
 2 files changed, 134 insertions(+), 3 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d81dc9697b969a8ae9f0dd1ff0f77a1584795eb0

commit d81dc9697b969a8ae9f0dd1ff0f77a1584795eb0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:27:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:31 +0000

    x11-wm/matwm2: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Bug: https://bugs.gentoo.org/911787
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/matwm2/matwm2-0.1.2_pre3-r3.ebuild | 65 +++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98cb41a01f37e5161de5c6ae159d3dfe80c29376

commit 98cb41a01f37e5161de5c6ae159d3dfe80c29376
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:26:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:30 +0000

    x11-wm/fvwm3: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Bug: https://bugs.gentoo.org/911787
    
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/fvwm3/fvwm3-1.0.7-r1.ebuild | 168 +++++++++++++++++++++++++++++++++++++
 x11-wm/fvwm3/fvwm3-9999.ebuild     |   8 +-
 2 files changed, 173 insertions(+), 3 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4c3f929cab9e7a7009a8eb62f8b1e68bbbb7e93

commit e4c3f929cab9e7a7009a8eb62f8b1e68bbbb7e93
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:25:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:29 +0000

    x11-wm/fvwm: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Bug: https://bugs.gentoo.org/911787
    
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/fvwm/fvwm-2.7.0-r1.ebuild | 171 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 171 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d1d7ad795b467317f1daf54f724b8ec123816a4

commit 8d1d7ad795b467317f1daf54f724b8ec123816a4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:25:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:28 +0000

    x11-wm/blackbox: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Bug: https://bugs.gentoo.org/911787
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/blackbox/blackbox-0.77-r1.ebuild | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2956204eeed14e65a51c7d727c3ef76a3dbf0700

commit 2956204eeed14e65a51c7d727c3ef76a3dbf0700
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-05 22:12:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-05 22:28:23 +0000

    x11-wm/wmii: fix shebang in /etc/X11/Sessions file
    
    A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
    but if it's executable, it's reasonably treated as a script. Oops.
    
    Bug: https://bugs.gentoo.org/911787
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-wm/wmii/wmii-3.9.2-r8.ebuild | 86 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
Comment 7 callison caffrey 2023-08-05 22:36:11 UTC
(In reply to Sam James from comment #5)
> Please leave personal comments out of it, thanks.

You can always ban me if you don't like it.