Answer the question
In order to leave comments, you need to log in
Running your program instead of a graphical shell on Linux?
Good afternoon.
Interested in the following.
In Windows, it is possible through the registry to replace the standard explorer - the desktop, by launching your program.
Are there similar mechanisms in Linux? For example, I will write some software in C # that will display the information I need, have a couple of buttons and that's it. I heard about Avalnoia which allows you to write graphical applications in C # even under Linux.
So that when starting a PC with Linux installed, let it be ubuntu server or debian server.
Automatic authorization and launch of my program instead of the desktop.
Is it possible, if so, where to dig.
Answer the question
In order to leave comments, you need to log in
For example
1. turn off the display manager - lightdm (or whatever you have there for the authorization menu and select DE)
2. the minimum that is needed for the graphics mode to work is xserver, to run it, just run the X utility (by the way, it still seems to require root) , a graphical server will be launched without a Desktop Environment, but you need to understand that the DE is responsible for managing windows, or rather managing their size, position on the screen, and generally hiding / minimizing. Those. without this, if your application expects the user to move its windows (and this is, for example, a file open / save dialog box), then he will not be able to do this, all windows will be without titles and a border to resize them.
And by the way, in order for the graphical application to start and be displayed on X, you need to set the DISPLAY environment variable, look at the value either in the X config or in the logs (most likely it will be something like: 0, this is the name of the server and the number of the xserver running on it, I remind you that linux can multiseat out of the box)
3. in order for at least some kind of interaction interface to appear, you need to install DE, from minimalistic, ideal for kiosk mode - I would recommend awesome , for example, you can configure it so that all opened windows immediately expand to full screen.
By the way, with all xserver usually comes the ancient default twm, so primitive that it’s even ridiculous, but if it didn’t require the user to specify the location and size when opening any window, it could be used (I wouldn’t be surprised if this is configurable, but I never asked this question).
Of the minimalistic and fully functional DE, you can offer some other openbox, it can be configured so that there are no 'start' and task list at all, but only icons and an application in full screen. But the user will be able to get to editing the menu and run any application, i.e. this is not for kiosk mode
To start xserver with DE automatically you can either set up autoload in lightdm (that's right) or just run the startx utility which looks in the user's .xinitrc directory and starts the DE from there.
In fact, the process of launching a DE has become very tricky, several generations of developers have confused it and do not want to get it out, but usually all this is critical for heavy DEs like KDE, but something simple and easy with gtk applications works like this.
Actually, how to launch applications automatically when turning on the computer is also a very interesting question, there are many ways, at least three I can offer
* the correct one is to configure the service and prescribe dependencies and autostart for it,
* there is still an outdated way to configure the service without sysvinit dependencies - /etc/init.d
* well, still there is /etc/rc.local
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question