LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2010, 10:10 AM   #1
angelo_maci
Member
 
Registered: Apr 2006
Posts: 62

Rep: Reputation: 15
enable broadband 3G connection from desktop icon


Hello,
I am able to configure a working 3G connection but I do not want it to be enabled at startup. I want it "on-demand" and I need that it is easy for non-skilled persons, that is double-clicking a desktop icon.
So I think I have to call a script or something else but I do not know the command.
Thanks.
 
Old 10-19-2010, 11:23 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Here's a simple bash script that will toggle between two commands. It saves the current state in a hidden file in your home directory, and checks it each time to see what should be done. If the hidden file doesn't exist or doesn't contain the correct information, it defaults to running the "off" command.
Code:
#!/bin/bash

[[ -r $HOME/.netonoff ]] && . $HOME/.netonoff


case ${status:-on} in

     off) [insert "ON" command here]
          status=on
     ;;

     *)  [insert "OFF" command here]
          status=off
     ;;

esac

echo "status=$status" > $HOME/.netonoff

exit 0
You'll need to add the commands you want to use in the appropriate places.

Just save this to a text file, chmod it to make it executable, then create a shortcut to launch it. Assuming no complications, that should do it.
 
Old 10-19-2010, 12:24 PM   #3
angelo_maci
Member
 
Registered: Apr 2006
Posts: 62

Original Poster
Rep: Reputation: 15
thank you for the trick but it is not useful now. I need a command to start a 3G connection that is already configured, say "broadband1", in ubuntu lucyd linx.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enable wireless connection outside of GNOME Desktop? bgoodr Linux - Wireless Networking 2 01-01-2011 11:05 PM
GNOME SlackBuild - Broadband icon moved and renamed ? slacker_et Slackware 1 12-31-2009 05:53 PM
Enable Remote Desktop Connection in Squid anu_here Linux - Networking 1 03-24-2009 07:34 AM
script to move desktop icon to desktop/escritorio, how to know language? permalac Linux - Newbie 3 01-10-2009 08:49 AM
Desktop icons dosnt have ToolTips (apear when mouse hover above desktop icon) Acidx Linux - General 1 12-03-2006 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration