set default user for login

  • This topic has 14 replies, 5 voices, and was last updated Jan 16-7:27 am by stroudmw.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #31582
    Member
    stroudmw

      I’m running Antix 19.1 on a live usb with persistance. How do I get it to automatically select the “demo” user without me having to type it in? The amount of times I’ve put my real name, and password in that field! (force of habit).
      I have default_user demo set in /etc/slim.conf, and I ran dpkg-reconfigure slim but that didn’t work: I still need to type in “demo” in the username field.

      Thanks.

      #31583
      Member
      fatmac
        Helpful
        Up
        0
        ::

        Maybe Control Centre > Session > Set Auto-Login.

        Linux (& BSD) since 1999

        #31591
        Anonymous
          Helpful
          Up
          0
          ::

          antiX 19 default SLiM theme, “BlueLines”, unconditionally omits the default_user text string.

          The quick “How do I” solution would be to specify a different SLiM theme

          sudo sed -i 's/current_theme.*BlueLines$/current_theme antiX/' /etc.slim.conf

          If you want to mess with amending the BlueLines and other themes (doing so is a PITA, a chore)…

          sudo apt install meld
          sudo cp /usr/share/slim/themes/BlueLines/slim.theme /usr/share/slim/themes/BlueLines/slim.theme_BAK
          sudo cp /usr/share/slim/themes/antiX/slim.theme /usr/share/slim/themes/antiX/slim.theme_BAK
          sudo meld /usr/share/slim/themes/BlueLines/slim.theme /usr/share/slim/themes/antiX/slim.theme
          
          While tweaking the BLueLines themefile, after each incremental edit//Save operation
          (even if a copy of the themefile is still open, in meld or other text editor)
          you can use the following command to preview the changed BLueLines slim.theme:
          
          slim -p /usr/share/slim/themes/BlueLines/slim.theme
          
          ^--- this "preview" option may be unavailable in the version of SLiM shipped in antiX 19
          #31592
          Anonymous
            Helpful
            Up
            0
            ::

            The “PITA” aspect involves the exactitude required in nailing down (for a given font size) the x_offset,y_offset coordinates of the two “textlabels” and the two “input fields”

            mirage /usr/share/slim/themes/BlueLines/panel.png

            ^— As you can see, BlueLines (and most of the SLiM themes preinstalled in antiX 19) foregoes trying to have SLiM paint the labeltext associated with the username and password fields. Instead, the labeltext is baked into the background imagefile.

            #31685
            Member
            stroudmw
              Helpful
              Up
              0
              ::

              Thanks all. I just thought there might be a simple solution that I’d missed. As it’s running on a live usb, it’s not crucial (but I do get the username wrong!) I only use it when I need a spare machine – I just plug it into my server and boot from there. Which doesn’t really happen to often! 🙂

              #31687
              Forum Admin
              anticapitalista
                Helpful
                Up
                0
                ::

                When running persistence (you need root persist or all; it won’t work with only home persistence), edit /etc/slim.conf

                # Automatically login the default user (without entering
                # the password. Set to "yes" to enable this feature
                auto_login          yes
                
                # default user, leave blank or remove this line
                # for avoid pre-loading the username.
                default_user        demo

                Philosophers have interpreted the world in many ways; the point is to change it.

                antiX with runit - leaner and meaner.

                #31691
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  it won’t work with only home persistence

                  ? a workaround, for anyone running with home-only persistence:
                  edit slim.conf then (during same session) perform a live-remaster operation.

                  #31692
                  Forum Admin
                  anticapitalista
                    Helpful
                    Up
                    0
                    ::

                    it won’t work with only home persistence

                    ? a workaround, for anyone running with home-only persistence:
                    edit slim.conf then (during same session) perform a live-remaster operation.

                    OK – yes this should work,

                    Philosophers have interpreted the world in many ways; the point is to change it.

                    antiX with runit - leaner and meaner.

                    #31706
                    Member
                    stroudmw
                      Helpful
                      Up
                      0
                      ::

                      When running persistence (you need root persist or all; it won’t work with only home persistence), edit /etc/slim.conf

                      1 – I don’t want automatic login.
                      2 – As I stated in my original post: I’ve already put my username into slim.comf and it didn’t work.

                      And I’m using both root and home persistence. But thanks 🙂

                      • This reply was modified 3 years, 3 months ago by stroudmw.
                      #31708
                      Member
                      ex_Koo
                        Helpful
                        Up
                        0
                        ::

                        What you need is focus_password.This way you don’t to type the user name just the password.

                        # Focus the password field on start when #default_user is set
                        # Set to “yes” to enable this feature
                        focus_password yes

                        # Automatically login the default user (without entering
                        # the password. Set to “yes” to enable this feature
                        #auto_login no

                        # default user, leave blank or remove this line
                        # for avoid pre-loading the username.
                        default_user koo

                        #31713
                        Member
                        stroudmw
                          Helpful
                          Up
                          0
                          ::

                          Tried that too: focus_password doesn’t make a difference. But thanks anyway.

                          #31716
                          Forum Admin
                          anticapitalista
                            Helpful
                            Up
                            0
                            ::

                            Please post your /etc/slim.conf

                            Philosophers have interpreted the world in many ways; the point is to change it.

                            antiX with runit - leaner and meaner.

                            #31756
                            Member
                            stroudmw
                              Helpful
                              Up
                              0
                              ::

                              Here you go!

                              # Path, X server and arguments (if needed)
                              # Note: -xauth $authfile is automatically appended
                              #
                              default_path        /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
                              default_xserver     /usr/bin/X11/X
                              xserver_arguments   -nolisten tcp
                              
                              # Commands for halt, login, etc. on antiX
                              halt_cmd            /usr/local/bin/persist-config --shutdown --command halt 
                              reboot_cmd          /usr/local/bin/persist-config --shutdown --command reboot 
                              console_cmd         /usr/bin/urxvt -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue.net; exec /bin/login"
                              #suspend_cmd        /usr/sbin/suspend
                              
                              # Full path to the xauth binary
                              xauth_path         /usr/bin/X11/xauth
                              
                              # Xauth file for server
                              authfile           /var/run/slim.auth
                              
                              # Activate numlock when slim starts. Valid values: on|off
                              # numlock             on
                              
                              # Hide the mouse cursor (note: does not work with some WMs).
                              # Valid values: true|false
                              # hidecursor          false
                              
                              # This command is executed after a succesful login.
                              # you can place the %session and %theme variables
                              # to handle launching of specific commands in .xinitrc
                              # depending of chosen session and slim theme
                              #
                              # NOTE: if your system does not have bash you need
                              # to adjust the command according to your preferred shell,
                              # i.e. for freebsd use:
                              # login_cmd         exec /bin/bash -login /etc/X11/Xsession %session 
                              #################OLD COMMAND####################
                              # login_cmd         exec /bin/bash -login ~/.xinitrc %session >~/.xsession-errors$DISPLAY 2>&1
                              ################################################
                              #LOGIN COMMAND FOR DESKTOP SESSION BELOW#
                              #############################################################################################
                              login_cmd   setsid /usr/local/bin/desktop-session %session
                              #############################################################################################
                              
                              # login_cmd exec dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1
                              
                              # Commands executed when starting and exiting a session.
                              # They can be used for registering a X11 session with
                              # sessreg. You can use the %user variable
                              #
                              # sessionstart_cmd	some command
                              # sessionstop_cmd	some command
                              
                              # Start in daemon mode. Valid values: yes | no
                              # Note that this can be overriden by the command line
                              # options "-d" and "-nodaemon"
                              # daemon	yes
                              
                              # Available sessions (first one is the default).
                              # The current chosen session name is replaced in the login_cmd
                              # above, so your login command can handle different sessions.
                              # see the xinitrc.sample file shipped with slim sources
                              #sessions rox-fluxbox,space-fluxbox,fluxbox,rox-icewm,space-icewm,icewm,rox-jwm,space-jwm,jwm,herbstluftwm
                              sessiondir /usr/share/xsessions
                              
                              # Executed when pressing F11 (requires scrot)
                              screenshot_cmd      scrot /root/slim.png
                              
                              # welcome message. Available variables: %host, %domain
                              welcome_msg         (Press F1 to toggle sessions)
                              
                              # Session message. Prepended to the session name when pressing F1
                              # session_msg         Session: 
                              
                              # shutdown / reboot messages
                              shutdown_msg 	The system is shutting down...
                              reboot_msg 		The system is rebooting...
                              
                              # Focus the password field on start when default_user is set
                              # Set to "yes" to enable this feature
                              focus_password      yes
                              
                              # Automatically login the default user (without entering
                              # the password. Set to "yes" to enable this feature
                              auto_login          no
                              
                              # default user, leave blank or remove this line
                              # for avoid pre-loading the username.
                              default_user        demo
                              
                              # current theme, use comma separated list to specify a set to 
                              # randomly choose from
                              current_theme       antiX
                              
                              # Lock file
                              lockfile            /var/run/slim.lock
                              
                              # Log file
                              logfile             /var/log/slim.log
                              default_user        
                              auto_login          yes
                              lockfile            /var/run/slim.lock
                              logfile             /var/log/slim.log
                              
                              #31757
                              Forum Admin
                              anticapitalista
                                Helpful
                                Up
                                0
                                ::

                                Remove the last 4 lines, they are duplicates

                                default_user        
                                auto_login          yes
                                lockfile            /var/run/slim.lock
                                logfile             /var/log/slim.log

                                Philosophers have interpreted the world in many ways; the point is to change it.

                                antiX with runit - leaner and meaner.

                                #31758
                                Member
                                stroudmw
                                  Helpful
                                  Up
                                  0
                                  ::

                                  That did the trick, thanks! I would’ve sent that sooner but connman doesn’t see my wifi, so I needed to use ethernet… which can be inconvenient. it’s a pain getting online (this is being written on my Debian 10 laptop, which doesn’t need ethernet).
                                  But: I’m pretty sure that didn’t put those lines there…

                                  Thanks very much! 🙂

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.