1/10/2024 0 Comments Startx vs xinitI'm an old fart and I like booting to console. About 90% of the time that is what I want but 10% of the time I don't want to do that immediately. I wrote my own /usr/local/bin/bash_login script that is sourced by $HOME/.bash_profile and my script prompts if I want to boot into the desktop with startx. I've long grown comfortable with that and to this day still boot all of my Slackware systems to console. Way back then display/login managers were available, but the default was booting to console. There also is a cosmetic reason in that the users would be fully WTF bewildered by logging in at the console and then manually typing startx.Īt home I have been using Slackware for more than 15 years. I'll let others pipe in to help.Īt work I configure the Debian workstations and laptops to use a display/login manager because outside very specific tasks, the users are not command line users. There is much more to distinguish the differences. The common way to do that these days is storing *.desktop files in /etc/xdg/autostart or $HOME/.config/autostart. automatically launching apps at login is a common desire. ![]() Whether the desktop is launched from the console or a display/login manager. Some display/login managers support sourcing those files but consult the documentation. Generally, the system and user xinitrc files are used when launching the desktop from the console. Users may override many of those options through a local $HOME/.xinitrc file. The file is sourced from the startx launch sequence. Usually the system /etc/X11/xinit/xinitrc file contains global instructions for creating the graphical environment. With this traditional boot, launching a graphical desktop and X is done through the /usr/bin/startx shell script. In systemd parlance this is called multi-user.target. In traditional parlance, depending on the distro and init system, this was called runlevel 3. In systemd parlance this is called graphical.target.īefore booting into a graphical environment became popular, traditionally Linux systems booted to the console. In traditional parlance, depending on the distro and init system, this was called runlevel 4 or 5. It's often hard to gauge what is an authoritative source for advice but these specific platform forums are perhaps a better place to start than more generic sites since they are more likely to evolve to meet the demands of the hardware, a wide(r) local knowledge base etc and they are moderated too.Generally, display/login managers are used when booting into a graphical user environment. Raspi-config does is right, your other source (aka some guide) is leading you in the wrong direction. Disabling simply removes that link and the OS is delivered without that link. If you look at what raspi-config does when you enable 'auto graphical' then it simple adds an invocation of the ligthtdm script to runlevel 2 (2 being the default level to which the OS boots). All shells you might then invoke during your work flow are then executed within that single graphical instance. ![]() Usually startx would be started in one of the rc files those are invoked once on system start-up, so there is only one copy executed. ![]() They are scenarios where multiple screens are required but even then they are fairly (ever?) implemented by additions to /etc/profile those starting ~ in the above quotation, and particularly so on small systems where resource like RAM are low. In general you wouldn't put startx in /etc/profile or any of the user facing files i.e. So putting startx in /etc/profile means you will have multiple instances of the graphical environment running (as you have seen). So /etc/profile is for any shell you might invoke as a user, and you might well have more than a single shell within a single login session. Unfortunately you'll tend to find that implementation from distro to distro is a little hazier that might be supposed. The -noprofile option may be used when the shell is started to inhibit this behavior. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. When bash is invoked as an interactive login shell, or as a non-interactive shell with the -login option, it first reads and executes commands from the file /etc/profile, if that file exists.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |