ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My situation is similar to the one outlined here, but I don't want the user to be able to log out either.
Basically I want this terminal to always be running this application. I have it running on startup (using tty1.conf to auto-login, .profile to launch the app). But if the user kills the application (ctrl-c), I want it to start up again.
I know it's possible to do on FreeBSD using gettytab, but I'm not sure how it would be done on linux (Ubuntu 11.10 Server). A nice thing about the BSD method was that you could escape the trap using Alt+F7, bringing you to a shell.
Well, I know that the equivalent to FreeBSD's getty is agetty in linux, though, as the man page states:
Quote:
Originally Posted by The agetty man page
This program does not use the /etc/gettydefs (System V) or /etc/gettytab (SunOS 4) files.
Now, I have a couple questions about this:
This application will be running on that terminal, no matter what happens with the rest of the system?
Will there be an actual user login, or are you going to force a specific non-privileged account to login without a password?
What is expected to happen to the terminal and/or app that's running in it when the system receives the 'shutdown' or 'reboot' (or any equivalent) commands?
This application will be running on that terminal, no matter what happens with the rest of the system?
Yes, it is supposed to be a single-purpose terminal for running only that application.
Quote:
Will there be an actual user login, or are you going to force a specific non-privileged account to login without a password?
I'm currently doing a forced login on an unprivileged account using /etc/tty1.conf
Quote:
What is expected to happen to the terminal and/or app that's running in it when the system receives the 'shutdown' or 'reboot' (or any equivalent) commands?
Those are fine; I don't expect the script to prevent shutdown or anything. Just needs to start back up when the system restarts.
Assuming the terminal is actually needed for interaction, the process will sleep if it tries to read from the terminal until it's in the foreground.
Kevin Barry
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.