Author Topic: Simple bash script & how to change window manager in GNOME 2 or KDE 3 ???  (Read 1225 times)

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
i can't figure out how to change the window manager in GNOME 2 or KDE 3. can anybody tell me some ways to do this? i'd like to change the default, but i can't even change it for the current session right now. How can this be done?

also, take a look at this:
Code: [Select]
now i have never done any bash scripts, or read about them, i just thought this should work.
What it does is, opens kppp, then plonks mozilla on top of it immediately afterwards. what i want is for mozilla to open up, then kppp to open up in the foreground, in front of it. Either that or (and this would be better) i'd like to have kppp run, then once it has connected, it should minimise and mozilla should then start.
Any hints?
thanks as usual...
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism

ravuya

  • VIP
  • Member
  • ***
  • Posts: 517
  • Kudos: 0
Well, if kppp gives off some kind of status condition when it finishes connection, you could base the script off that.

In pseudocode, it'd go something like this:

kppp
if(kppp_connected_status)
 mozilla &
end

or whatever.

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
well the script to open kppp and then open mozilla immediately would simply be

#!/bin/bash
kppp &
mozilla &

I've never used kppp before, but does it exit upon successful connection? if so you can take out the ampersand from after kppp and then mozilla won't start until kppp has closed.
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Or if you set up diald all you have to do is open mozilla and it will automatically make a PPP connection. I used to use this, way back in the stone ages when I had dialup.  
Someone please remove this account. Thanks...

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
diald, eh? righto, got it.
strangely, make exited with 'Error: 1' whatever that is, when i tried to install from source. Anybody know where a list of make's errors can be found? i couldn't see it on the make man page and i have got this error more than once.

I will check out diald today, thanks void main,
as for kppp, as far as i can see it does not exit upon connection, but sits around and waits until you physically exit it, which will close the connection (or you can set it to close itself when the connection is closed).

As for the " &" in the script, i kept getting errors when i put a space in there, which is why i put brackets round the one with a space in it, which seemed to work. is this right or am i missing something?

as for gnome, i think i found a page telling me how to do the window manager thing, so that will be tried by me today too.

thanks guys!
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
You're a Mandrake user right? Here's an RPM for Mandrake 9.0 (if that's not what you need there are RPMS on rpmfind.net for other distros):

http://www.rpmfind.net//linux/RPM/mandrake/9.0/i586/Mandrake/RPMS/diald-1.0-2mdk.i586.html

Now when I used it, it wasn't the easiest thing to set up and get working. You basically really had to understand TCP/IP, slip and ppp. But once you got it working it worked very well. Remember that kppp is just a frontend for pppd. When you have diald set up it will monitor your TCP/IP traffic and if it determines you are trying to make a connection outside of your local network it will use pppd to dial the internet. You can configure it to disconnect after a specified period of inactivity. It is actually quite configurable. It would be cool if this were implemented in kppp.

In fact I used to have my home network set up exactly as it is now except instead of having a cable connection into my proxy/firewall/gateway machine I had a modem. I used diald on that server to connect to the net any time any of my machines attempted to connect to the internet. Worked quite well.

But I haven't used diald (or even kppp for that matter) in a couple of years now so I don't know how much help I will be for you (probably not much).
Someone please remove this account. Thanks...

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
thanks for doing the footowrk, void main, i have it installed from the rpm, but as always, not knowing how to fix the error messages pisses me off a lot.

as for getting diald to work, i don't understand networking beyond a very general thing, so maybe you or somebody sould point me in the direction of some sort of 'how does ppp work - in specific' type of website. i read the man for diald, but am none the wiser for how to set it up (although i now know what it's supposed to do!) so maybe i need some sort of info on how slip, ppp and so on work, any ideas, folks?
visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism