Automatically execute a software without gui at boot

 
Thread Tools Search this Thread
Operating Systems Linux Fedora Automatically execute a software without gui at boot
# 1  
Old 01-01-2012
Automatically execute a software without gui at boot

hi all,
this is my first post here...i hope that this is the correct section to write my question.

I have a distro linux without gui, only text mode.
So, it's possible run automatically a command or a program as "top" or "ping" and get the result on the main shell , after the boot and after username and password input ?
I don't want run the command or the software as a service (init.d/.....).

Thanks to all.
Regards
Emiliano
# 2  
Old 01-01-2012
can you please be spcific wht exactly you want
# 3  
Old 01-01-2012
Yes - there is a console. The console is analagous to the DOS window in Windows XP, in the sense that you can execute commands that do not require gnome or some other windowing interface, like ls and top.

Since you've given almost no information about your system, that is all I can say for now.
# 4  
Old 01-01-2012
Quote:
Originally Posted by gangiaemi
hi all,
this is my first post here...i hope that this is the correct section to write my question.

I have a distro linux without gui, only text mode.
So, it's possible run automatically a command or a program as "top" or "ping" and get the result on the main shell , after the boot and after username and password input ?
I don't want run the command or the software as a service (init.d/.....).

Thanks to all.
Regards
Emiliano
What's your system?

Certainly it's possible. I've made login systems that ran top, another that generated openvpn keys, and another that played a 'net radio station on login. Among other things.

How depends on your system, which you haven't stated yet. What is it?
# 5  
Old 01-02-2012
Hi all ,
thanks for yours sentences.
So,
my distro is an ubuntu distro for beagle board...... you know?
It's like a mini pc.
I need to run automatically a program in my main shell.
Those are the steps that i do when turn on the minipc.
  1. Turn on minipc (very easy);
  2. Waiting for loading kernel while request user and password input.
  3. I type username and password on screen (emi - emi);
  4. i type on my shell this commands : ping;
  5. I open another shell with keys combination : ALT+Fx(x is my number shell:2-3-4-5)
  6. I type the "top" command;
  7. I see the command's results on my shells.
So, i would like to run automatically those command and see the result on screen.
I don't know how to do that. Im at beginning of this world.
I don't want a service that run in background or at least , if it's only possible build up a service, i would like to see the result of my service on my shell.


Thank to all.
PS : Unfortunately I have no other information about the system.


Regards

Emiliano.
# 6  
Old 01-02-2012
Assuming you are using Bash, one way would be to add the required commands (top, ping) to your ~/.bash_profile.
# 7  
Old 01-05-2012
I am more familiar with Fedora and Redhat so I can't provide exact steps to follow, but what you want to accomplish is:
1. Autologin to 2 virtual terminals
2. start your program from ~/.bashrc and direct it to run on the appropriate terminal.

If you add this code to ~/.bashrc it will do the trick.
Note that as written, it checks to see if there are running processes on tty10 (that you are logged in) and that top is not running. If not, then run top. Same procedure is followed for ping, using tty11.

<code>
ps -a | grep tty10 | grep -v top && top

ps -a | grep tty11 | grep -v ping && ping 192.168.1.2

</code>

If login shells are established via /etc/inittab then you would have to start autologin getty's for tty10 and 11 as I have written it (you can use whichever ones you want for it).

I would add that to me this is a horrifying bit of code. It works properly ONLY because it runs from .bashrc. Otherwise the checks for what is happening in the system before initializing the programs would be totally inadequate.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create a simple web portal/GUI to execute scripts?

Very new to this..... What I would like to do: Create a simple GUI/Web portal with 3 buttons and 1 text field The three buttons need to take the input into the text field and use that as the variable to execute scripts located on a server Problem: How can i get the buttons on the... (3 Replies)
Discussion started by: poops
3 Replies

2. Linux

CD Burning in Linux, GUI Software

Hi.. I just brought a CD writer. It has nero for windows bundled with it. I found nero very easy to use as well as usefull.. I then see that wht we have in linux.. I found that in my Redhat 9 i have two CD writers software but both are no where nare nero... So is there any GUI based cd... (5 Replies)
Discussion started by: billcrosby
5 Replies

3. Shell Programming and Scripting

Create a GUI from where in we can execute unix commands

Hello Experts, In my current job I need to upgrade a web GUI to execute Unix commands in a server....I am completely new to programming--So can anyone here help me out with initial steps... Please notice that statement completely new to programming means-I never did it, SO I might keep on coming... (1 Reply)
Discussion started by: mhadi
1 Replies

4. Linux

ArchLinux - GUI (DE) set to boot up

Okay I'am not using ArchLinux but one of girlfreinds needs it (or it recommend by her work) and she need a desktop - so how do we do so the computer boot up with GUI instead of console ? - I'am a newbie to Arch so I have no idea, is it like SlackWare where you change the inittab file or is it some... (10 Replies)
Discussion started by: looop
10 Replies

5. Shell Programming and Scripting

Automatically execute all programs in a directory

Hello. The last days I extended an open-source C++ library by some faster functions. This library provides a lot of short test programs which guarantee that the library works exactly. The compilation of each test works in a Makefile automatically. What I need is a shell script which... (5 Replies)
Discussion started by: max3000
5 Replies

6. Solaris

Accessing software's GUI from CDE

Hi, Can anyone please let me know if any installed software on solaris can be accessed with GUI on CDE. I just installed putty from sunfreeware.com and try accessing it but no way to access it's GUI. Thanks, Deepak (1 Reply)
Discussion started by: naw_deepak
1 Replies

7. Ubuntu

How can I automatically start a daemon at boot time.

Hi masters, I am still learning trades in kernel. I am trying to learn the basic of daemon programming. Can any one tell me how can I start a daemon automatically during boot up. I will be greatfull if anyone post some example code to the above task. Also what are... (3 Replies)
Discussion started by: iamjayanth
3 Replies

8. UNIX for Dummies Questions & Answers

Initialization Problems - Cannot execute automatically

Figured out the first half but am still having a little trouble shooting problem with the Initialization Files. I am working in bash on a remote server. When I log on I am seeing the correct prompt but right before that I am also seeing this the id -u integer expression expected is what... (2 Replies)
Discussion started by: moonunit
2 Replies

9. UNIX for Advanced & Expert Users

i want a script to execute if the time is 12:00 automatically

i write a script for displaying a xmessage.But i want it to run automatically for every one hour.can any one help me. (2 Replies)
Discussion started by: lakshmananindia
2 Replies
Login or Register to Ask a Question