| View previous topic :: View next topic |
| Author |
Message |
liaty
Joined: Tue Mar 14, 2006 5:10 pm Posts: 30
|
Posted: Tue Jul 25, 2006 8:49 pm Post subject: bash script |
|
|
I'm trying to create a single link to enable/disable xgl.
So far I have two bash scripts.
#!/bin/bash
gnomesu start_xgl
which calls
#!/bin/bash
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? |
|
| Back to top |
|
 |
towy71 Moderator

Joined: Wed Apr 06, 2005 3:11 pm Posts: 4176 Location: wild West Wales
|
Posted: Tue Jul 25, 2006 10:34 pm Post subject: RE: bash script |
|
|
you don't say which distro you're using and how you install xgl etc.? _________________ still looking for that door into summer |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8036 Location: Warrington, UK
|
Posted: Tue Jul 25, 2006 11:07 pm Post subject: RE: bash script |
|
|
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: | | gnomesu screen start_xgl |
_________________ "Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein) |
|
| Back to top |
|
 |
liaty
Joined: Tue Mar 14, 2006 5:10 pm Posts: 30
|
Posted: Tue Jul 25, 2006 11:23 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|