Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

starting an X-app automatically from boot up.

Posted on 1998-07-09
6
216 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

829 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