Subject: FVWM: PPP on-off button

From: Marcel Oliver <[email-masked]>
Date: Fri, 10 Oct 1997 11:41:08 -0700

Any ideas of how to implement the following:

A "PPP on-off button" in GoodStuff which displays
an icon (telephone).  When you click on it, it
runs a script (ppp-on, for setting up a ppp connection
to your internet provider) and displays another icon
(telephone off the hook).  If you click once more
it runs another script (ppp-off, for closing the
ppp connection) and displays the first icon again.

Is this difficult?  Any nice icons for this?

  Marcel
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Paul Seelig <[email-masked]>
Date: 10 Oct 1997 21:33:06 +0200

> ppp connection) and displays the first icon again.
How about this in "~/.fvwm2rc":
-------------cut-here---------------------------
# Keyboard accelerators
Key F1         A        C       exec mount /cdrom
Key F2         A        C       exec umount /cdrom
Key F3         A        C       WindowList
Key F4         A        C       Delete
Key F5         A        C       Move
Key F6         A        C       Resize
Key F7         A        C       exec xterm +sb -fn fixed -g 118x35 -T "Midnight Commander" -e mc -x &
Key F8         A        C       exec xdos &
Key F9         A        C       Iconify
Key F10        A        C       Destroy
Key F11        A        C       exec pon <---
Key F12        A        C       exec poff <---
-------------cut-here---------------------------

"/usr/bin/pon":
-------------cut-here---------------------------
#!/bin/sh
if [ -r /etc/ppp.options_out -a -r /etc/ppp.chatscript ]; then
	/usr/sbin/pppd connect "/usr/sbin/chat -v -f /etc/ppp.chatscript" `cat /etc/ppp.options_out`
else
	echo "You do not have permissions to access /etc/ppp.chatscript or /etc/ppp.options_out"
fi
-------------cut-here---------------------------

"/usr/bin/poff":
-------------cut-here---------------------------
#!/bin/sh

# Lets see how many pppds are running....
N=`ls /var/run/ppp* 2>/dev/null| wc -l`

# If there no ppp running then poff does not make much sense
if [ $N = 0 ]; then
	echo "No pppd is running"
	exit 1
fi
# If one is running then it cal be killed with killall
if [ $N = 1 ]; then
	killall pppd
	exit 0
fi
# More than one! Aieehh.. Dont know which one to kill.
echo "More than one pppd running. None stopped"
exit 1
-------------cut-here---------------------------

Works even without a mouse!
                              Cheers, P. *8^)
--
   Paul Seelig                         [email-masked]
   African Music Archive - Institute for Ethnology and Africa Studies
   Johannes Gutenberg-University   -  Forum 6  -  55099 Mainz/Germany
   My Homepage in the WWW at the URL http://www.uni-mainz.de/~pseelig 
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Adam Kopacz <[email-masked]>
Date: Fri, 10 Oct 1997 22:16:25 +0200

Marcel Oliver wrote:
hi,

> an icon (telephone).  When you click on it, it
..

*FvwmButtonsFile /bla/.fvwm2b_inet

fvw2b_inet ist attached.

-- 
Bye,                             Linux/Babes
  Adam Kopacz (kLospatz)    http://www.rat.de/Adam

# FvwmButtons ConfigFile

Fore Black
Back gray70
Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
Geometry 805x57+0-0
Rows 1
Padding 0 0
Frame 1

(Container)
  (1x2, Frame 1) -  klo_inet.xpm Function fvwm2b_nrm
  (2x1, Title Menue, Action(mouse1) 'PopUp Main-Menu', Action(mouse2) Nop, Action(mouse3) 'WindowList')
    - mini-display.xpm Refresh
    - /root/_pixmaps/bar/max.xpm Function "maximize_func"
(End)

(Container(Rows 3))
 (2x1, Fore rgb:d580/0000/b9bf) ftp - Exec exec /usr/X11R6/bin/xterm -T 'xterm: ncftp' -e /usr/bin/ncftp &
 (2x1, Fore rgb:d580/0000/b9bf) telnet - Exec exec /usr/X11R6/bin/xterm -T 'xterm: telnet' -e /usr/bin/telnet &
 (2x1, Fore rgb:d580/0000/b9bf) eIrc - Exec exec eIrc &
(End)

(Container(Rows 3))
 (2x1, Fore rgb:d580/0000/b9bf) g_news - Exec exec  rxvt -T "Getting News..." -bg gray20 -fg white -fn fixed -e /root/bin/scripts/get_news &
 (2x1, Fore rgb:8b85/0000/7961) xterm - Exec exec /usr/X11R6/bin/xterm -T xterm &
 (2x1, Fore rgb:8b85/0000/7961) mc - Exec /usr/X11R6/bin/xterm -T mc -n mc -e mc -c &
(End)

#- mc.xpm           Exec /usr/X11R6/bin/xterm -T mc -n mc -e mc -c &
- netscape_3d.xpm  Popup FvwmNetscape

(5x1, Container(Rows 3))
 (3x1, Frame 1, Back grey78, Fore darkblue,Title (Left)" PPPCOSTS :") - 
 (1x1, Back rgb:10/90/10, Fore white, Font fixed) ppp-GO - Exec /root/bin/scripts/ppp-go &
 (1x1, Back rgb:90/10/10, Fore white, Font fixed) ppp-OFF - Exec /root/bin/scripts/ppp-off &
 (5x2, Frame 1, Back grey78) - - Swallow "pppcosts" Exec rxvt -fn fixed -bg grey78 -cr grey70 -fg darkblue +sb -geometry 56x2+3072+1127 -T pppcosts -e pppcosts &
(End)

(2x1) - whatever Swallow "FvwmPager" Module FvwmPager 0 0 &

- whatever Swallow "asclock" Exec /usr/X11R6/bin/asclock -shape -led yellow -noblink -position +3072 +768 &

---

From: [email-masked] (Paul Seelig)
Date: Fri, 10 Oct 1997 19:33:06 GMT

-------------cut-here---------------------------
# Keyboard accelerators
-------------cut-here---------------------------

"/usr/bin/pon":
-------------cut-here---------------------------
#!/bin/sh
-------------cut-here---------------------------

"/usr/bin/poff":
-------------cut-here---------------------------
#!/bin/sh