Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdm failed to stop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Tue Dec 10, 2002 7:54 am    Post subject: gdm failed to stop Reply with quote

i get that when i shut off my box
Is there anyway i can fix this
thanx
Back to top
View user's profile Send private message
Uranus
Guru
Guru


Joined: 07 May 2002
Posts: 438
Location: Portugal, Braga

PostPosted: Tue Dec 10, 2002 8:09 am    Post subject: Reply with quote

I get it also
Back to top
View user's profile Send private message
woboz
n00b
n00b


Joined: 24 Oct 2002
Posts: 65

PostPosted: Tue Dec 10, 2002 8:16 am    Post subject: Reply with quote

When you start gdm it is started automatically by an rc-script. When you shutdown the machine you are doing it from the gdm screen. One of the steps for gdm when it shuts down is to shut itself down then start the rc-script for shutdown. Because rc started GDM it now wants to stop it, but gdm has already been stopped by gdm.

Hope this makes some sense. Basically its not a problem other than to many programs trying to shut it down.
Back to top
View user's profile Send private message
li1_getoo
l33t
l33t


Joined: 20 Oct 2002
Posts: 661
Location: Queens , NY

PostPosted: Tue Dec 10, 2002 6:43 pm    Post subject: Reply with quote

it makes a whole lot of sense and i can live with it thank u
anyways if theres a way for me to stop seeing that error while shoting off my box :)
Back to top
View user's profile Send private message
woboz
n00b
n00b


Joined: 24 Oct 2002
Posts: 65

PostPosted: Tue Dec 10, 2002 7:10 pm    Post subject: Reply with quote

The only way I know how is to close your eyes while your computer shuts down. :lol:
Back to top
View user's profile Send private message
BlackPhoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2002
Posts: 124

PostPosted: Wed Dec 11, 2002 12:44 am    Post subject: Reply with quote

Wow woboz! It works!!! Thanks! I just close my eyes...and poof, I don't see the error!

*takes it in note, along with the trick about using "format c:" to prevent Windows ME of crashing...*
Back to top
View user's profile Send private message
tactless
l33t
l33t


Joined: 14 Jul 2002
Posts: 642
Location: Mitzpe Adi, Israel

PostPosted: Wed Dec 11, 2002 5:37 pm    Post subject: Reply with quote

Basically, we need to get gdm to "zap" itself (/etc/init.d/xdm zap) when it exits. That resets its status, so the rc-script doesn't try to close it. I can't find any way to do this short of changing the code though... any ideas?
_________________
Tactless

"If it wasn't for fog, the world would run at a really crappy framerate."

Jabber: tactless@amessage.info
Back to top
View user's profile Send private message
xr31Daisy
Guru
Guru


Joined: 19 Jul 2002
Posts: 326
Location: Paris, France

PostPosted: Wed Dec 11, 2002 6:00 pm    Post subject: Reply with quote

Maybe we could alter the rc-script to test whether gdm is alive or not before trying to close it ? That should be possible.
Back to top
View user's profile Send private message
tuxmeister
n00b
n00b


Joined: 28 Jan 2003
Posts: 3

PostPosted: Tue Mar 11, 2003 4:58 am    Post subject: gdm shutdown fix..... Reply with quote

Woboz is right, it's not really an error, it's just that GDM has already been stopped. It's a simple fix. In you're /etc/runlevels/default/xdm script (mine's default because I lumped everything in there, change the runlevel name for whatever is appropriate for your setup) you need to change some things in the "else" section of the stop() function. The "if" for this statement is just checking to see if the process exists. In this case it doesn't, and defaults to the else which assigns retval the value 1. This indicates an error. I changed mine as follows:

FROM...

if [ "$(ps -A | grep -e "${myservice}")" ]
then
start-stop-daemon --stop --quiet \
--exe ${myexe} &>/dev/null

retval=$?
else
retval=1
fi

#switch back to original vt
chvt "${curvt}" &>/dev/null
eend ${retval} "Error stopping ${myservice}."

return ${retval}




TO....


if [ "$(ps -A | grep -e "${myservice}")" ]
then
start-stop-daemon --stop --quiet \
--exe ${myexe} &>/dev/null

retval=$?
else
# Drew's mods, for a prettier exit....
retval=0
chvt "${curvt}" &>/dev/null
echo " ${myservice} already stopped."
eend 0
return ${retval}
fi

#switch back to original vt
chvt "${curvt}" &>/dev/null
eend ${retval} "Error stopping {myservice}."

return ${retval}



Notice the extra whitespace for the "gdm already stopped" message. This makes it line up, so it's looks nice, and not like some poser psych major hacked it :)

This way you'll still get an error if there is a genuine problem shutting down gdm. If gdm is simply not running (because you clicked reboot/shutdown from gdm's system menu), then it will say that gdm is already stopped, and give you a nice color green "ok". Hope this helps with the eye sore :)



-Drew
Back to top
View user's profile Send private message
jcosters
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2003
Posts: 104
Location: Gent, Belgium

PostPosted: Sat Mar 29, 2003 7:50 pm    Post subject: Reply with quote

I use an simpler mod of xdm:

Code:
 retval=$?
else
# Ice-o-lator's mod, for a prettier exit....
retval=0
fi

#switch back to original vt
chvt "${curvt}" &>/dev/null
eend ${retval} "Error stopping {myservice}."

return ${retval}


This way the script only complaines when gdm really failed to stop. When gdm is already down, nothing extra is printed out.
Back to top
View user's profile Send private message
Tonar
n00b
n00b


Joined: 18 May 2003
Posts: 17

PostPosted: Sun Jun 15, 2003 12:10 pm    Post subject: Reply with quote

I choose another way. I did a "rc-update del xdm" and added "gdm &" to /etc/conf.d/local.start.

I works well for me.
Back to top
View user's profile Send private message
souji
n00b
n00b


Joined: 02 Aug 2004
Posts: 8

PostPosted: Wed Mar 02, 2005 4:07 pm    Post subject: Reply with quote

i made a mod too :)

before:
Quote:

stop() {
local retval=0
local curvt="$(fgconsole)"
local myexe="$(get_options "service")"
local myservice="${myexe##*/}"

ebegin "Stopping ${myservice}"
rm -f ${svcdir}/options/xdm/service

if [ "$(ps -A | grep -e "${myservice}")" ]
then
start-stop-daemon --stop --quiet \
--exe ${myexe} &>/dev/null

retval=$?
else
retval=1
fi

#switch back to original vt
chvt "${curvt}" &>/dev/null
eend ${retval} "Error stopping ${myservice}."

return ${retval}
}


after:
Quote:

stop() {
local retval=0
local curvt="$(fgconsole)"
local myexe="$(get_options "service")"
local myservice="${myexe##*/}"

if [ "$(ps -A | grep -e "${myservice}")" ]
then
ebegin "Stopping ${myservice}"
rm -f ${svcdir}/options/xdm/service

start-stop-daemon --stop --quiet \
--exe ${myexe} &>/dev/null

eend $? "Error stopping ${myservice}."
fi

#switch back to original vt
chvt "${curvt}" &>/dev/null

return ${retval}
}


tested few times and works great 8)
_________________
YuanGH at Gmail dot com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum