Sponsored Content
Operating Systems Linux Fedora Automatically execute a software without gui at boot Post 302587605 by rcmjivaro on Thursday 5th of January 2012 10:28:23 AM
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.
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 01:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy