Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
As one new to the forum, I believe I have a "simple" question for the community today
The scenario in question involves the launch of a bash script at boot (via upstart, init, or similar). This script takes care of some assorted rudimentary functions; and remains at work in those capacities until well past user login. All good so far.
Post-login, the script forks a program (pick anything from a lowly terminal to a browser) which includes a GUI. At this point, the music just stops; and the program so launched simply folds up and dies before even hitting the screen. The script itself goes merrily on...
We all know about tackling such problems from the desktop environment via autostart, ~/.xinitrc, or similar kludges. But what about situations in which one would prefer to have a consolidated boot-time solution which can simply serve all logins without hassle?
In sum, what might be a reasonable tack to effectively allow a GUI-based app to launch from a boot-level script?
Xvfb up and running @ runlevel 2 with the following parameters:
Code:
/usr/bin/Xvfb :99 -screen 0 1024x768x24
All verified as up via Task Manager on the Desktop side...
However, the issue persists: Should Xvfb be called in conjunction with an offending program directly, or is there some other subtle point which presently eludes?
Placed -display :99 in everything except Linus' shorts: Still no luck. Again, everything in the chain works perfectly if it's called from the terminal by hand.
Are you talking about the initial launch script or something you do in the GUI after it is launched? If the former your issue may be you're missing some environment variable in the boot script that you have when you do the initial launch. This is fairly common with background scripts like those run in init or cron. The most common one is PATH but their could be others you're relying on depending on the application. The PATH variable you have at command line usually has a lot more than the minimal one background tools will give you so you need to include it in the script itself.
Type "env" after login to see what variables you have set then determine if you need to add any to the startup.
Thanks for the info and tips. In the end nothing seemed to help...
So, I switched tack to add a (forked) launchline to the /etc/profile script which is reputed to serve well as a cross-login solution in cron settings. It worked; but in doing so I had to segment my approach to cover both root- and GUI-level functional requirements. Not as simple as blasting through and pointing something to the correct display, but effective in the end.
This is really strange behavior. I've heard the problem likened to having "gum stuck to your shoe" which somehow prohibits GUI launches throughout any chain from bootup scripting, even if a connected (or forked) downstream process is launched well after login.
Is this an integral part of the Linux security model, or just another "quirk" which we need to just live with???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.