Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
I need to setup my Lubuntu system to serve as a kind of kiosk, where a custom Java application should be run on startup, and it should be avoid that users interact with the desktop environment. Because of this I would like to ask the advice of the community to:
1. Make the system run the custom java application on startup.This application should run as root.
2. Avoid the desktop environment to load.
3. Autologin to the system. The session started can be root. As the custom app is going to be the only UI, there should not be risk in start the session as root.
Thanks for your reading and for the tips you could give me.
I did something similar to this on a Raspberry Pi running Fedora. The application I needed to start was Python, not Java, but it's actually pretty easy.
However, I have not done exactly what you are looking to do; I did not need a GUI. So I'm thinking out loud here, with some ideas rather than exact instructions:
The way I think I'd go about what you are trying to do is to uninstall the desktop (LXDE) and the session manager (I think Lubuntu uses LightDM). You will probably want to do that from a text console (ctrl-alt-F3, for example).
Then find the systemd startup script that executes the graphical server (X). Modify it such that when the X environment starts, so does your java application.
I'm not sure what *buntu does when no session manager is found, so you might need to enable auto login to your text console. That's detailed in the post.
It will require some experimentation and testing.
If you try this sort of thing, let me know how it goes and what you did to make it happen, and I'll make my responses here less dependent on the external link.
The way I think I'd go about what you are trying to do is to uninstall the desktop (LXDE) and the session manager (I think Lubuntu uses LightDM). You will probably want to do that from a text console (ctrl-alt-F3, for example).
Then find the systemd startup script that executes the graphical server (X). Modify it such that when the X environment starts, so does your java application.
I'm not sure what *buntu does when no session manager is found, so you might need to enable auto login to your text console. That's detailed in the post.
@notKlaatu, actually I googled this, and found that inside /usr/share/xsessions/, I should be able to create a ".desktop" file indicating the system what should be run on stratup. The standard file is some like:
Code:
[Desktop Entry]
# The names/descriptions should really be better
Name=Lubuntu
Comment=Lubuntu - Lightweight X11 desktop environment based on LXDE
Exec=/usr/bin/lxsession -s Lubuntu -e LXDE
# Icon=
Type=Application
By changing "Exec" command, you should be able to execute some script instead of loading the desktop. However I am only asked for login and password. If I give the credentials, the system asks again the login and pass, and so on.
Where should be located getty@.service you mention in the link?.I did not find a file with the same name.
but when I boot the system, all I got is a black screen. It is supposed that nodm should trigger an XSession, but something is happening. My /etc/default/nodm is:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.