Solved

starting an X-app automatically from boot up.

Posted on 1998-07-09
6
215 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cannot connect to openvpn server 9 73
VMware Workstation 12 Player 16 73
curl SSL certificate unable to get local issuer certificate 15 64
LINUX backups with VEEAM 8 79
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

776 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