5/7/2023 0 Comments Startx script![]() Then you could choose between the to methods described above for starting and X environment. In that case you would could install the X environment by installing ubuntu-desktop. That is where the concern for starting an X environment would be important. By default the commands that are run are in /.xinitrcfile in your home directory, or some generic system file otherwise. startxbasically runs an Xserver(the graphical 'driver') and a command which run on it, which is typically a window manager. In general, xinit and startx can start an arbitrary server and run an arbitrary script. So when you needed a graphical interface you just started it with startx(2). When the xterm terminates, xinit and startx kill the X display server. ![]() By default, xinit and startx start an X display server pointing to a display device that is enumerated as :0 and then start an xterm on it. If you installed the Ubuntu Server distribution, X11 would not be installed by default. The startx script is a front-end for xinit. They are two different methods of starting the server and are independent of each other. Both StartX and Lightdm starts the X11 server. The shell will tell give you the line number if a command fails to make fixing your script easier. If not, then you will have to correct your script. More specific to your question of where is the call to StartX. If you have not mispelled the names of any commands, then you should have a graphical desktop. The command to start the Lightdm service is: $ sudo systemctl start lightdm If you didn't have a graphical environment you could then run the StartX to start one, or run a command to start the Lightdm service to give you a login prompt, which will give you a substantially more friendly environment that the bare StartX. If you disabled Lightdm, you'd the computer boot to the console. It provides an X11 login screen and logs that use into that screen starting up a number of default applications at that includes Unity and other friendly and familiar environment features such as the Navigation Side bar and Desktop. In Ubuntu the Lightdm does what Startx does. You'd have to manually start anything you want running. If you run the bars "X" command by itself, you'd just have a bare X window with no desktop and nothing running. It starts the X11 with a number of preset configurations and starts some default applications. StartX is one of many tools that are available for a user to use. I couldn’t find out how that would help in my case.StartX is a script provided in the X11 apps for a user to convenient start an X11 GUI. However, there is a unit named graphical.target though, but I assume that serves a different purpose altogether. I was unable to find any unit with the name rvice. I have looked through the list of units provided by the systemd. I have tried playing around with $DISPLAY variable and xhost command but no success. However, when the service is started there is some sort of error: Unable to init server: Could not connect: Connection refused : cannot open display: Pass server arguments after -on the command line of startx. For example, if you want to run multiple GUI sessions at the same time, you can pass a different display number each time. Manually the script is running fine and I can see the stream output. The startxcommand also lets you specify arguments to pass to the server. That script plays a live video stream from a camera. I have been having a similar problem but I am not sure how to use the solution you suggested. The startx could even be set up as its own service, and if you don’t want the regular GUI login to run, then you could go to a default runlevel of “ multi-user.target”, and have your service trigger upon reaching multi-user.target (and perhaps even wait for rvice if needed). The regular login manager could continue to be run on “ :0”, and the startx could purposely start somewhere this won’t collide with, e.g., “ :9”. This script is used to manually start X on a terminal, and simply runs as the user who ran the script. You might consider examining the “ startx” script. This does not actually log in a user, so I suspect that when rvice is reached there is no actual logged in X GUI session yet. If your X display is not running, or if the login menu is there and login is not truly complete, or if the logged in user differs from the user running the application, then using that $DISPLAY will fail or be refused.Īlso, rvice only guarantees a default TTY is running a login service. To emphasize something mentions, no X display will allow another user to remote display into it even if the $DISPLAY is otherwise correct.
0 Comments
Leave a Reply. |