Solved

starting an X-app automatically from boot up.

Posted on 1998-07-09
6
213 Views
Last Modified: 2010-04-20
I would like to have my Redhat 5 linux computer boot-up and automatically
startup an X application.  

I could do this (I think) if I could get linux to automatically log in a user.  That is,
I would create a user account with maybe a .login file that started X.  And
I'm guessing that startx has some command line arguments for auto starting an
app.  Does this make sense?  Is it possible?  Is there a better way to do this?

Bascially I want my app to be the only app that "appears" to be running.  I
have already created custom X config files that remove all of the menu items,
etc.  My app will also have an option for shuting the computer down.  I'm
trying to create a dedicated, bullet-proof, idiot-proof computer for running
a single program.

Any suggestions?
0
Comment
Question by:mag062397
  • 3
  • 2
6 Comments
 

Expert Comment

by:scrytch
ID: 1637520
Put any programs you want to run when X starts in the .Xclients file.  Generally the window manager is last, and has an "exec" before it, ostensibly to keep it from running slow.

As for bulletproof, you'll want to either lock all the consoles with vlock -all after X is started (it shouldn't lock X), or compile linux without vc support.  Have the user's .login "exec startx" and not just startx, the former will replace the login shell, so if X crashes, it will log the user out, not give it a shell.

As for auto-logging a user in, that one's really tough, and I don't have an answer, so I'll leave it open.


0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 150 total points
ID: 1637521
ad a line in your /etc/inittab (use a runlevel of you choice instead of 4):

al:4:respawn:/bin/login username
0
 

Author Comment

by:mag062397
ID: 1637522
That looks like it'll work.

But, will the login program prompt for a password?
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637523
Yes, it will prompt for a password.
0
 

Author Comment

by:mag062397
ID: 1637524
That looks like it'll work.

But, will the login program prompt for a password?
0
 

Author Comment

by:mag062397
ID: 1637525
Ignore previos comment.  My Netscape Reload also reposted.

0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now