LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-14-2006, 12:57 AM   #1
coolblue
Member
 
Registered: Feb 2005
Posts: 126

Rep: Reputation: 15
How do I make a simple script and make it run on bootup??


Every time when I get to my Linux desktop I have to do the folowing to turn on the internet connection:

sudo -i (i give my password here)
/root/24onlineClient -u alfatek (this too asks for a password I've to give)

Is there anyway I can make all this happen automatically on every bootup?

I've heard that scripts can do such things.

So plz help me make such a script and get it to run automatically on bootup.

Thanks a lot for ur help

Btw "sudo /root/24onlineClient -u alfatek" does not do the task so I've to turn to the root user's path.
 
Old 12-14-2006, 01:02 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
What distro are you using? Is there a way to make 24onlineClient not request a password?
 
Old 12-17-2006, 12:55 AM   #3
coolblue
Member
 
Registered: Feb 2005
Posts: 126

Original Poster
Rep: Reputation: 15
I'm on Ubuntu Dapper.
I don't think theres a way to make the 24onlineClient to not ask for the password.

Thanks
 
Old 12-18-2006, 04:31 PM   #4
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
I would think there is a way to do what you are asking and the software would document it. You could probably write a script and add it to the /etc/rc.d/rclocal file. That would execute after all the init scripts during boot and get your 24online client started.

Here is another option. There is a project called linc on Sourceforge that may solve your problem. This client uses a configuration file to store your password and other login information. The client is a daemon process that can be started up when your system boots. Here is the linc homepage and their project page.

If I get some time I may try to write something that simulates what you are trying to do.

Bill

Last edited by wmakowski; 12-18-2006 at 04:40 PM.
 
Old 12-18-2006, 07:45 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,452

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
sudo + expect may do want you want, or just use expect from root user; http://wiki.tcl.tk/201
 
Old 12-18-2006, 10:55 PM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If this 24onlineClinet requires a password to be interactively entered, you can still automate fairly easily if you enter the password at the prompt and there is only text-based input necessary. For this you can use expect. Can you tell us exactly how this 24onlineClient thing is working? Is there a demo of it in action somewhere?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 make a script run on login? roseplant SUSE / openSUSE 11 01-24-2006 05:09 PM
Can't make a script run hanasi Linux - Newbie 14 08-27-2005 04:14 PM
I need to make simple script. sly_guy69 Linux - Newbie 4 01-22-2005 09:23 PM
How to make a simple addition in a shell script. philipina Programming 2 03-16-2004 05:38 AM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 09:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration