bash script

Code junkies hangout here

Moderators: ChriThor, LXF moderators

bash script

Postby liaty » Tue Jul 25, 2006 7:49 pm

I'm trying to create a single link to enable/disable xgl.

So far I have two bash scripts.

gnomesu start_xgl

which calls

gnome-xgl-switch --enable-xgl;killall gdm;gdm

The problem I have I think is that the script itself is being shutdown with gnome session.
It worked once, xgl was enabled, gdm shutdown and then gdm logged into gnome session.

Most of the time though it crashes the x server and a reboot is needed.
Other times it gets to the console but does not restart gdm.

Can anyone see where I am going wrong?
Is there a better way to restart gdm?
Posts: 30
Joined: Tue Mar 14, 2006 5:10 pm

RE: bash script

Postby towy71 » Tue Jul 25, 2006 9:34 pm

you don't say which distro you're using and how you install xgl etc.?
still looking for that door into summer
Posts: 4317
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

RE: bash script

Postby nelz » Tue Jul 25, 2006 10:07 pm

If you are running the script from an X terminal, it will stop when the X session shuts down.

Try having the first script do
Code: Select all
gnomesu screen start_xgl
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
Site admin
Posts: 9048
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby liaty » Tue Jul 25, 2006 10:23 pm

Thanks, got it with.
/etc/init.d/xdm restart in the second script

I can now call start/stop xgl from links on desktop.
Distro is OpenSuse 10.1
For other distros the command could be /etc/init.d/gdm restart
Posts: 30
Joined: Tue Mar 14, 2006 5:10 pm

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests