Announcement

Collapse
No announcement yet.

Number lock on login screen

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Number lock on login screen

    Using Kubuntu 18.04 on an HP Envy DV6-7260HE, everything seems to run fine, really good actually.
    I can't find the configuration file to turn on number lock at login screen. I have already turned on number lock in system settings but this doesn't control the login screen.
    I had this same problem with Kubuntu 16.04 and fixed it by changing number lock to "ON" in a configuration file but cannot remember the file name or where it is.
    I've already looked in etc/sddm, only file there is Xsession, and it says absolutely nothing about number lock.
    Code:
    #! /bin/sh# Xsession - run as user
    
    session=$1
    
    # Note that the respective logout scripts are not sourced.
    case $SHELL in
     */bash)
       [ -z "$BASH" ] && exec $SHELL $0 "$@"
       set +o posix
       [ -f /etc/profile ] && . /etc/profile
       if [ -f $HOME/.bash_profile ]; then
         . $HOME/.bash_profile
       elif [ -f $HOME/.bash_login ]; then
         . $HOME/.bash_login
       elif [ -f $HOME/.profile ]; then
         . $HOME/.profile
       fi
       ;;
     */zsh)
       [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
       emulate -R zsh
       [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
       zhome=${ZDOTDIR:-$HOME}
       # zshenv is always sourced automatically.
       [ -f $zdir/zprofile ] && . $zdir/zprofile
       [ -f $zhome/.zprofile ] && . $zhome/.zprofile
       [ -f $zdir/zlogin ] && . $zdir/zlogin
       [ -f $zhome/.zlogin ] && . $zhome/.zlogin
       setopt shwordsplit noextendedglob
       ;;
     */csh|*/tcsh)
       # [t]cshrc is always sourced automatically.
       # Note that sourcing csh.login after .cshrc is non-standard.
       xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
       $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $xsess_tmp"
       .
    
    $xsess_tmp
       rm -f $xsess_tmp
       ;;
     */fish)
       xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
       $SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp"
       . $xsess_tmp
       rm -f $xsess_tmp
       ;;
     *) # Plain sh, ksh, and anything we do not know.
       [ -f /etc/profile ] && . /etc/profile
       [ -f $HOME/.profile ] && . $HOME/.profile
       ;;
    esac
    
    # invoke global X session script
    . /etc/X11/Xsession
    Not sure where else to look and google hasn't been much help.
    Can anyone help?

    #2
    man sddm & man sddm.conf:

    Code:
    FILES
         /usr/lib/sddm/sddm.conf.d
                System configuration directory
    
         /etc/sddm.conf.d
                Local configuration directory
    
         /etc/sddm.conf
                Local configuration file for compatibility
    
         /usr/share/sddm/themes
                Where sddm looks for themes
    
    SEE ALSO
         sddm.conf(5)
    
         The full documentation for sddm is available at https://github.com/sddm/sddm
    Code:
    NAME
         sddm.conf - sddm display manager configuration
    
    SYNOPSIS
         Configuration loads all files in the configuration directories followed by the configuration
         file in the order listed below with the latter having the most precedent. Changes should  be
         made to the local configurations.
    
         /usr/lib/sddm/sddm.conf.d
                System configuration directory
    
         /etc/sddm.conf.d
                Local configuration directory
    
         /etc/sddm.conf
                Local configuration file for compatibility
    
    DESCRIPTION
          This  file configures various parameters of the sddm display manager sddm(1). If this file
          is not available, default values are used.
    
    OPTIONS
         [General] section:
    
         Numlock=
                Change numlock state when sddm-greeter starts. Valid values are on, off or none. If
                property is set to none, numlock won't be changed. Default value is "none".
    Last edited by Rog131; May 13, 2018, 07:13 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Thank you Rog131, "etc/sddm.conf" that was the file I was looking for.

      Code:
      [Autologin]# Whether sddm should automatically log back into sessions when they exit
      Relogin=false
      
      # Name of session file for autologin session (if empty try last logged in)
      Session=
      
      # Username for autologin session
      User=
      
      [General]
      # Halt command
      HaltCommand=/bin/systemctl poweroff
      
      # Input method module
      InputMethod=qtvirtualkeyboard
      
      [COLOR=#000080][SIZE=4][B]# Initial NumLock state. Can be on, off or none.[/B][/SIZE][/COLOR]
      [COLOR=#000080][SIZE=4][B]# If property is set to none, numlock won't be changed[/B][/SIZE][/COLOR]
      [COLOR=#000080][SIZE=4][B]# NOTE: Currently ignored if autologin is enabled.[/B][/SIZE][/COLOR]
      [COLOR=#000080][SIZE=4][B]Numlock=on[/B][/SIZE][/COLOR]
      
      # Reboot command
      RebootCommand=/bin/systemctl reboot
      
      [Theme]
      # Current theme name
      Current=breeze
      
      # Cursor theme used in the greeter
      CursorTheme=
      
      # Number of users to use as threshold
      # above which avatars are disabled
      # unless explicitly enabled with EnableAvatars
      DisableAvatarsThreshold=7
      
      # Enable display of custom user avatars
      EnableAvatars=true
      
      # Global directory for user avatars
      # The files should be named <username>.face.icon
      FacesDir=/usr/share/sddm/faces
      
      # Theme directory path
      ThemeDir=/usr/share/sddm/themes
      
      [Users]
      # Default $PATH for logged in users
      DefaultPath=/bin:/usr/bin
      
      # Comma-separated list of shells.
      # Users with these shells as their default won't be listed
      HideShells=
      
      # Comma-separated list of users that should not be listed
      HideUsers=
      
      # Maximum user id for displayed users
      MaximumUid=60000
      
      # Minimum user id for displayed users
      MinimumUid=1000
      
      # Remember the session of the last successfully logged in user
      RememberLastSession=true
      
      # Remember the last successfully logged in user
      RememberLastUser=true
      
      # When logging in as the same user twice, restore the original session, rather than create a new one
      ReuseSession=false
      
      [Wayland]
      # Enable Qt's automatic high-DPI scaling
      EnableHiDPI=false
      
      # Path to a script to execute when starting the desktop session
      SessionCommand=/usr/share/sddm/scripts/wayland-session
      
      # Directory containing available Wayland sessions
      SessionDir=/usr/share/wayland-sessions
      
      # Path to the user session log file
      SessionLogFile=.local/share/sddm/wayland-session.log
      
      [X11]
      # Path to a script to execute when starting the display server
      DisplayCommand=/usr/share/sddm/scripts/Xsetup
      
      # Path to a script to execute when stopping the display server
      DisplayStopCommand=/usr/share/sddm/scripts/Xstop
      
      # Enable Qt's automatic high-DPI scaling
      EnableHiDPI=false
      
      # The lowest virtual terminal number that will be used.
      MinimumVT=1
      
      # Arguments passed to the X server invocation
      ServerArguments=-nolisten tcp
      
      # Path to X server binary
      ServerPath=/usr/bin/X
      
      # Path to a script to execute when starting the desktop session
      SessionCommand=/etc/sddm/Xsession
      
      # Directory containing available X sessions
      SessionDir=/usr/share/xsessions
      
      # Path to the user session log file
      SessionLogFile=.local/share/sddm/xorg-session.log
      
      # Path to the Xauthority file
      UserAuthFile=.Xauthority
      
      # Path to xauth binary
      XauthPath=/usr/bin/xauth
      
      # Path to Xephyr binary
      XephyrPath=/usr/bin/Xephyr

      Comment


        #4
        Now that I have asked it here, I will always have it available for new installs, thanks so much. I also just found out I can open these files in Kate directly, without using kdesudo, dolphin would not let me before, which doesn't work anymore, now I just get asked for password when I save any changes. Before I used to "sudo dolphin" (also not allowed anymore), and make changes to config files, password was asked before opening file.
        Last edited by Clayman1000x; May 13, 2018, 07:46 AM.

        Comment


          #5
          I think I have it now, I need to run "sddm --example-config | sudo tee /etc/sddm.conf" before opening etc/sddm.conf, otherwise it has nothing in it.

          Comment

          Working...
          X