<---- template headericclude ----->
wierd problem with prefdm, can't exec from /etc can from /tmp
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    a8hex Guest

    wierd problem with prefdm, can't exec from /etc can from /tmp

    I've just installed Fedora 8 onto a USB 4GB key. Everything when great, I left it updating last night and then let it reboot this morning. When I did this however X didn't startup. On the console I just get

    init: Id "x" respawning too fast: disabled for 5 minutes

    So I go and take a look at the inittab file, and it's trying to execute

    [root@duck ~]# grep ^x /etc/inittab
    x:5:respawn:/etc/X11/prefdm -nodaemon

    So I try this from a ssh session, I just get the prompt back.
    After checking the file, I see it's a shell script so I try

    sh -xv /etc/X11/prefdm -nodaemon

    and it starts no problem.
    I try adding a

    set -xv

    into the script to see where it fails ...

    # Fallbacks, in order
    exec gdm "$@" >/dev/null 2>&1 </dev/null
    + exec gdm -nodaemon

    So it's trying to exec gdm.

    Before I make any further changes to the script I copy it to /tmp and try things from there. It works no problem.

    cp /etc/X11/prefdm /tmp
    /tmp/prefdm -nodaemon

    works with no problem

    /etc/X11/prefdm -nodaemon

    the exec fails.


    hmmm I'm confused!

  2. #2
    a8hex Guest
    OK, I tried another test.

    cp /etc/X11/prefdm /etc/X11/prefdm2
    /etc/X11/prefdm2 -nodaemon

    also works fine.

  3. #3
    jnilsson Guest
    We had a similar issue with Oracle Linux (Red Hat). I believe that the issue was related to GDM...

    I believe that I fixed it by reinstalling GDM using yum.

  4. #4
    a8hex Guest
    Thanks for the response.

    I can get it to work, just by making a copy of the script, what I don't understand is why I get such different behaviour from a couple of copies of a shell script.

    When I run /etc/X11/prefdm -nodaemon

    The script execs

    gdm -nodaemon,

    and looking at the output this generates I get

    /etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
    /etc/X11/prefdm: line 38: /usr/sbin/gdm: Success
    exec kdm "$@" >/dev/null 2>&1 </dev/null
    + exec kdm -nodaemon

    Yet the copy of the script (prefdm2)
    gives the expected


    test -f /etc/profile && . /etc/profile
    + test -f /etc/profile
    + . /etc/profile
    # /etc/profile
    ...

    Which is the stuff at the start of the gdm script


    The prefdm instance is actually not getting a far as executing gdm at all.

    If I remove all the output redirections so I get the end of prefdm looking like.

    ### [ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null
    [ -n "$preferred" ] && exec $preferred "$@" </dev/null

    # Fallbacks, in order
    exec gdm "$@" </dev/null
    exec kdm "$@" </dev/null
    exec wdm "$@" </dev/null
    exec xdm "$@" </dev/null
    # catch all exit error
    exit 1


    Then running it I get

    ### [ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null
    [ -n "$preferred" ] && exec $preferred "$@" </dev/null
    + '[' -n '' ']'

    # Fallbacks, in order
    exec gdm "$@" </dev/null
    + exec gdm -nodaemon
    /etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
    /etc/X11/prefdm: line 38: /usr/sbin/gdm: Success
    exec kdm "$@" </dev/null
    + exec kdm -nodaemon
    /etc/X11/prefdm: line 39: exec: kdm: not found
    exec wdm "$@" </dev/null
    + exec wdm -nodaemon
    /etc/X11/prefdm: line 40: exec: wdm: not found
    exec xdm "$@" </dev/null
    + exec xdm -nodaemon
    /etc/X11/prefdm: line 41: exec: xdm: not found
    # catch all exit error
    exit 1
    + exit 1
    [root@duck ~]#


    Don't worry about the failure of kdm et al... I don't think they are installed.

    but

    /etc/X11/prefdm: /usr/sbin/gdm: /bin/sh: bad interpreter: Permission denied
    /etc/X11/prefdm: line 38: /usr/sbin/gdm: Success

    has me confused.
    Why is it saying that it's getting permission denied from /bin/sh ?

    You get the same type of error message if you start a script with

    #!/home/ken/file

    when file exists but does not have execute permission.

    Could this be some "SE" Linux feature?

    Cheers
    Ken

  5. #5
    jnilsson Guest
    It could be several things:

    1. That the GDM startup scripts got corrupted during the update.
    2. The SELinux polices got corrupted during the update.

    Thats why I advised you to try to reinstall GDM and see if it recreates the scripts that are causing the issue.

    J

  6. #6
    a8hex Guest
    The GDM startup scripts work fine.

    I think it's the SE Linux policy. Digging into this there is an entry for prefdm.
    I don't really understand the SELinux stuff. but prefdm has an SE File type of initrc_exec_t:s0

  7. #7
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having the same problem...

    Fedora 8 fresh install
    Worked fine until I installed the updates.
    I can hit the return after x dies, after the respawn message, and then log in, and startx with no problems.
    I have downloaded and installed NVidia's driver, but the same driver works great when I boot from a different harddrive that has my Fedora 7 on it.

    Also, only refresh rates available under the Screen Resolution Preferences is 50, and 51 Hz. It's 60 in Fedora 7.

    I've:
    1. made a copy of /etc/X11/prefdm, then replaced the original with the copy; Didn't help
    2. relabeled the entire file system on reboot for SE Linux; didn't help.
    3. changed SELInux to permissive; Didn't help.
    4. replaced my /etc/X11/xorg.conf with the one from my Fedora 7 install; Didn't help.
    5. installed the latest updates as of tonight; Didn't help.

    I'm open to suggestions...

    (x86_64; NVidia 7600GT; Core2 Dual 2.66)

    Everything works fine in Fedora 7.

  8. #8
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I finally solved it.

    I'm not certain why when I did a yum info gdm it showed it as installed,
    but, when I ran yumex, and searched for gdm, it did not list it as installed,
    and I checked the box, and updated.

    Everything is working now...

Similar Threads

  1. Wierd log in problem
    By infernosoft in forum Using Fedora
    Replies: 0
    Last Post: 2nd September 2009, 06:37 PM
  2. Apache/PHP/Perl exec() problem
    By jmaynard in forum Servers & Networking
    Replies: 2
    Last Post: 25th February 2008, 04:36 AM
  3. problem with the prefdm process
    By unky in forum Using Fedora
    Replies: 2
    Last Post: 15th September 2006, 08:16 AM
  4. Plz help wierd cvs problem
    By ShadeAtNight in forum Servers & Networking
    Replies: 5
    Last Post: 13th March 2005, 04:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]