[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Launching KPPP from desktop with root loses dsktop icons and wallpapers...

On Fri, 4 Feb 2005, Phillip Pi wrote:

I placed KDE v3.3.1's KPPP icon on my desktop on my Debian v3.1 box

I could only guess as to what is going on since I have never used KPPP. Make sure the user is a member of the "dip" and "dialout" groups (use the "groups" command), then try it without the su to root.

To get an icon on the desktop without using KPPP I did the following:

As root...
# pppconfig
and setup for your ISP, then place the ppptoggle script in /usr/local/bin and do
# chmod a+x /usr/local/bin/ppptoggle.sh
to make sure it is executable.

--- /usr/local/bin/ppptoggle.sh ---
# ppptoggle
# toggles ppp network access
# synopsis: ppptoggle <provider>
# <provider> is the name of a provider configured with pppconfig

pppup=`/sbin/ifconfig | grep ppp0 | cut -d" " -f1`

if [ "$pppup" = "ppp0" ]; then
  poff \
  && sed -i 's/Icon=nfs_mount/Icon=nfs_unmount/' \
  pon $1 \
  && sed -i 's/Icon=nfs_unmount/Icon=nfs_mount/' \

A user places the following *.desktop file on their Desktop and clicks to connect or disconnect. Note: replace all occurrences of ISP with the name you used with pppconfig (default: provider).

--- $HOME/Desktop/ISP.desktop ---
[Desktop Entry]
Exec=/usr/local/bin/ppptoggle.sh ISP
GenericName=toggle the PPP network interface
Comment=connect/disconnect from ISP


The icon can get out of sync with the state of the ppp connection if you (or a script) does "poff" or "pon" instead of "ppptoggle", it will sync with the next click. ppptoggle assumes ppp0. Errors not handled.


- create ppp_on and ppp_off icons
- integrate with RBM->Create New->Device
- integrate with pppconfig
- support other desktops
- ...

- Bruce (hoping he didn't make any typos while cleaning it up :-)

Reply to: