On Tue, 3 Aug 2021, Ekkard Gerlach wrote:


Am 03.08.21 um 13:04 schrieb Andrew C Aitchison:
On Tue, 3 Aug 2021, Ekkard Gerlach wrote:

Hello,

/etc/X11/xdm/Xsetup_0 in�  is NOT executed, what could be the reason? I inserted on top of file

echo "hello123" > /tmp/test123
and the file is not created! Who can help?


I'm managing SL 6.10, its deprecated I know, but no way arround, its server of a customer

Finally I want to start x11vnc in Xsetup_0, like I am used to do it in Suse-Installations with /etc/X11/xdm/Xsetup , the it works perfectly sind 15 years. Now my first contact to SL/ RedHat.

Background: red hat tells that Xsetup_0 is for customizing login: https://urldefense.proofpoint.com/v2/url?u=https-3A__access.redhat.com_documentation_en-2Dus_red-5Fhat-5Fenterprise-5Flinux_6_html_deployment-5Fguide_s2-2Dx-2Drunlevels-2D5&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=FzQidEJ4_tyOpfrm9kxOLH_kfZZcz_swssRrQu-WlI0&s=k7QNNvmJ93Rn99wd0Z1pZBkkx6TwNa1xBiPJA4NMBAE&e= Xsetup_0 is the right file to do customizations in red hat, here a comparison of Suse and Red Hat: https://urldefense.proofpoint.com/v2/url?u=https-3A__virtualgl.org_vgldoc_2-5F0_&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=FzQidEJ4_tyOpfrm9kxOLH_kfZZcz_swssRrQu-WlI0&s=YixEiCS5nZ03PM7w2lW9Heisf9Ly4cGDtVpudN1vk8k&e=


I still have a Scientific Linux 6 "virtual machine" (actually a chroot
"container") so I may be in a better position to help than most.

Are you using display :0 and display manager xdm (not gdm or kdm) ?

I just detected one big bug on my side: gdm is *not* using xdm! They are different. (you ask the same)

Thats why gdm does not care about Xsetup_0 , the file belongs to xdm!

Then I searched the aquivalent for gdm: and I found /etc/gdm/Init/Default : https://urldefense.proofpoint.com/v2/url?u=https-3A__tldp.org_HOWTO_XFree-2DLocal-2Dmulti-2Duser-2DHOWTO_automation-5Flogin-5Fscreen.html&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=FzQidEJ4_tyOpfrm9kxOLH_kfZZcz_swssRrQu-WlI0&s=mi6C5sU64FWHNTH5-dSb60hJmjxXG6CKi7xKEs8xUoM&e=
On my SL 6.10 there is neither a "Init" directory no "Default".

Odd. My SL6.10 has /etc/gdm/Init/Default - from gdm-2.30.4-69.el6
# ls -Z /etc/gdm/Init/Default
-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /etc/gdm/Init/Default

Might be worth reinstalling the gdm package.

I created Init directory, then created a "Default", with bash script inside that makes that echo "Hello">/tmp/test123.txt

But /etc/gdm/Init/Default is not executed/ used, I chmod +x , but does not help.

Then I detected a registered bug, that "Default" is not used due to selinux policy: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.redhat.com_show-5Fbug.cgi-3Fid-3D851769&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=FzQidEJ4_tyOpfrm9kxOLH_kfZZcz_swssRrQu-WlI0&s=gkRfClTL54zjgEKvfpRDaCgxz8tG_q6IJsumHTTxMCM&e=
Can you help me for next steps?

Reading that bugzilla, I think that they did find a fix (at comment 9)
        chcon -Rt bin_t /etc/gdm/Init
but SELinux (RH's equivalent of apparmor) kept changing with newer
versions of Fedora.
If you can try permissive mode in /etc/selinux/config (IIRC you need to reboot after changing it) that should bypass theisue and give you better diagnostics.

Do you/your client need to do this for all users ?
If not you could add your X11vnc command to $HOME/.Xclients

As the system isn't going to change now, you could modify
 /etc/gdm/Xsession which is a symlink to /etc/X11/xinit/Xsession

I haven't run the X server or xdm/gdm on my SL6 VM/container
and I am not sure how, since I don't actually boot it
(I just chroot the image and run X clients on the host display.

Do you need both the hardware display and the VNC mirror,
or could you just run a standalone VNC server ?

--
Andrew C. Aitchison                                     Kendal, UK
                        [email protected]

Reply via email to