View Full Version : [SOLVED] Script to run the modeswitch command in boot

July 28th, 2011, 07:25 AM
I am having one Huawei EC156 modem for my wireless broadband connection. Everytime when I boot the machine, I have to run the following commands in the terminal. The commands are as follows

cd /etc/usb_modeswitch.d followed by

sudo usb_modeswitch -I -W -c 12d1\:1505

I would be very grateful if I can have a launcher which run this script automatically in terminal by clicking on it.

Thanks in advance

July 28th, 2011, 04:00 PM

July 28th, 2011, 04:30 PM
Script to run the modeswitch command in boot
1.Open the gedit
2.Type the two commands which you want to run in two separate lines.
3.save the file with the extension .sh on the disk where ever you want and make this file as executable in the properties
4.Then right click on the desktop
5.Create new -link to application
6.Give your desired name
7.Go to the properties of the new link on desktop
8.Go to application
9.Give the path of file with the extension .sh in the command box
10.Go to advanced options
11.Tick the coloumns of run in terminal and run as a different user
12.Hit ok

open the link created on the desktop

type the password if required


July 29th, 2011, 11:11 AM
Thanks Jayadeep
You have done a wonderful job...........