Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Auto login and `startx` without a display manager (systemd)
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
Good stuff, glad you got it working
I'll edit the OP to reflect your very useful feedback -- thanks!
I'll edit the OP to reflect your very useful feedback -- thanks!
deadbang
- Nili
- Posts: 441
- Joined: 2014-04-30 14:04
- Location: $HOME/♫♪
- Has thanked: 5 times
- Been thanked: 3 times
Re: Auto login and `startx` without a display manager -- jes
Heya there Head_on_a_Stick!!!
Good to be back, i was without system for 48h, during this time i fixed my mess mixing lenny with jessie let me outside.
...so glad to be back without formating
Ok lets go back right to question.
Perhaps you have posted somewhere, if so please guide me... Thank you.
ls -l /etc/systemd/system/getty.target.wants
I think you know what i am looking for, an automatic login for one tty (tty1 precise) and an auto startx from /home/nili/.profile
Using this code
it's ok but log me in on both ttys 1&2. Let fix this first then checkup auto startx
Good to be back, i was without system for 48h, during this time i fixed my mess mixing lenny with jessie let me outside.
...so glad to be back without formating
Ok lets go back right to question.
Perhaps you have posted somewhere, if so please guide me... Thank you.
ls -l /etc/systemd/system/getty.target.wants
Code: Select all
total 0
lrwxrwxrwx 1 root root 34 Jul 19 15:01 getty@tty1.service -> /lib/systemd/system/getty@.service
Using this code
Code: Select all
ExecStart=-/sbin/agetty -a <user name> %I $TERM
openSUSE Tumbleweed KDE/Wayland
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
@Nili -- I think this may be a systemd bug.
AFAIU, the getty@tty1.service should *only* run for TTY1 but clearly this isn't happening.
On both my Arch & Debian systems, autologin is set for *all* TTYs
Does your system do this or is it only for TTYs 1&2?
Please post the output of:
AFAIU, the getty@tty1.service should *only* run for TTY1 but clearly this isn't happening.
On both my Arch & Debian systems, autologin is set for *all* TTYs
Does your system do this or is it only for TTYs 1&2?
Please post the output of:
Code: Select all
ls -lR /etc/systemd/system | grep -i tty
deadbang
- Nili
- Posts: 441
- Joined: 2014-04-30 14:04
- Location: $HOME/♫♪
- Has thanked: 5 times
- Been thanked: 3 times
Re: Auto login and `startx` without a display manager -- jes
Then it may be such as you explain, perhaps a systemd issue. I have read and tried many ways during these days but none succeeded.
At the moment have turned off autologin, i'm only proceeding with auto startx this time. I really don't want to have many logged my username on other terminals.
I have two tty because... if you remember a thread and a chat that we have done therefore I have two because i choosed to use two tty.
Concretely, i have actived NAutoVTs=2 from "/etc/systemd/logind.conf" that reduces tty usages, so i chosed number 2.
I can test with more tty numbers, I believe that will be the same will autolog on every tty actived...
I will do a test tomorrow because today I have no more time sorry.
the output
nili@debian:~$ ls -lR /etc/systemd/system | grep -i tty
At the moment have turned off autologin, i'm only proceeding with auto startx this time. I really don't want to have many logged my username on other terminals.
I have two tty because... if you remember a thread and a chat that we have done therefore I have two because i choosed to use two tty.
Concretely, i have actived NAutoVTs=2 from "/etc/systemd/logind.conf" that reduces tty usages, so i chosed number 2.
Code: Select all
[Login]
NAutoVTs=2
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
I will do a test tomorrow because today I have no more time sorry.
the output
nili@debian:~$ ls -lR /etc/systemd/system | grep -i tty
Code: Select all
drwxr-xr-x 2 root root 4096 Jul 19 15:01 getty.target.wants
/etc/systemd/system/getty.target.wants:
lrwxrwxrwx 1 root root 34 Jul 19 15:01 getty@tty1.service -> /lib/systemd/system/getty@.service
openSUSE Tumbleweed KDE/Wayland
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
From that thread:Nili wrote:if you remember a thread and a chat that we have done therefore I have two because i choosed to use two tty.
The only TTY that is spawned at boot is TTY1, the other TTYs are spawned on demand -- ie, they do not exist until you switch to them.I wrote:Disabling TTYs via /etc/logind.conf saves *no resources whatsoever*
Unless you want a TTY for root login there really is no harm having autologin on all TTYs; it certainly doesn't use up any extra resources.
deadbang
- Nili
- Posts: 441
- Joined: 2014-04-30 14:04
- Location: $HOME/♫♪
- Has thanked: 5 times
- Been thanked: 3 times
Re: Auto login and `startx` without a display manager -- jes
Indeed there isn't any big memory benefits, simply an unnecessary fixation by my side I can bring back again as it was.Head_on_a_Stick wrote: From that thread:I wrote:Disabling TTYs via /etc/logind.conf saves *no resources whatsoever*
TTY1 = startx@WM || TTY2 = a backup console. This has been my goal. oK i'll leave so... manually auto login, automatically startx.
openSUSE Tumbleweed KDE/Wayland
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.
Re: Auto login and `startx` without a display manager -- jes
Had mentioned somewhere i'd done a full install of Jessie on a 32 GB pen drive. Well, i tried this out on that.. cut the boot time by more than half, now i get what you meant by lightdm bloat, thank YOU!
Linux User #481272 Reg: 15th Sept., 2008
Re: Auto login and `startx` without a display manager -- jes
instead of startx, how can i get kodi to run?
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
Code: Select all
startx `which kodi`
deadbang
Re: Auto login and `startx` without a display manager -- jes
like this?
Code: Select all
mythtv ~ # cat /etc/systemd/system/getty.target.wants/getty@tty1.service | grep ExecStart
ExecStart=-/sbin/agetty -a mythtv %I $TERM
Code: Select all
mythtv@mythtv:~$ cat ~/.profile
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx 'which /usr/bin/kodi'
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
Not quite, try:milomak wrote:like this?
[...]Code: Select all
mythtv@mythtv:~$ cat ~/.profile [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx 'which /usr/bin/kodi'
Code: Select all
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx /usr/bin/kodi
deadbang
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: Auto login and `startx` without a display manager -- jes
.. or maybe
Code: Select all
[[ -z $DISPLAY -a $XDG_VTNR -eq 1 ]] && exec startx /usr/bin/kodi
Re: Auto login and `startx` without a display manager -- jes
this worked. thanksHead_on_a_Stick wrote:Not quite, try:milomak wrote:like this?
[...]Code: Select all
mythtv@mythtv:~$ cat ~/.profile [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx 'which /usr/bin/kodi'
Code: Select all
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx /usr/bin/kodi
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Re: Auto login and `startx` without a display manager -- jes
The topic is old and I have a slightly different need.
I have a touch display but no keyboard. I want to autologin and auto-run a gui based program built with QT
As suggested I have edited: /etc/systemd/system/getty.target.wants/getty@tty1.service to this:
ExecStart=-/sbin/agetty -a myname %I $TERM
As I still want to use the default gui console, I have not made any other changes.
However, I still get the login prompt on my default defaultgui display.
Can you suggest what I still need to change to get the auto-login
Regards
Lachlan
I have a touch display but no keyboard. I want to autologin and auto-run a gui based program built with QT
As suggested I have edited: /etc/systemd/system/getty.target.wants/getty@tty1.service to this:
ExecStart=-/sbin/agetty -a myname %I $TERM
As I still want to use the default gui console, I have not made any other changes.
However, I still get the login prompt on my default defaultgui display.
Can you suggest what I still need to change to get the auto-login
Regards
Lachlan
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Auto login and `startx` without a display manager -- jes
I noticed this :
Is what it says , on the board/ topic title , and then :Docs, Howtos, Tips & Tricks
Share your own howto's etc. Not for support questions!
It seems that the logical conclusion would be to start a new topic, in the "support" discussions.Post by lachlanp » 2016-05-09 06:21
The topic is old and I have a slightly different need.
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
I agree with Gary but briefly:
If there are any problems, open a new thread and link back to this one in the OP
Try:lachlanp wrote:Can you suggest what I still need to change to get the auto-login
Code: Select all
# systemctl set-default multi-user.target
deadbang
Re: Auto login and `startx` without a display manager -- jes
Thanks. I thought since the concepts of the topic were the same, then the people who previously posted probably had the required knowledge.
I have posted on the MATE/Debian forum as I am using mate Desktop.
The systemctl is already set to muti-user.target. Thanks
lachlan
I have posted on the MATE/Debian forum as I am using mate Desktop.
The systemctl is already set to muti-user.target. Thanks
lachlan
Re: Auto login and `startx` without a display manager -- jes
I am finding after doing updates (using sid), that reverts to default.
bear that in mind if you find it not starting x automatically after updating
Code: Select all
/etc/systemd/system/getty.target.wants/getty@tty1.service
bear that in mind if you find it not starting x automatically after updating
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Auto login and `startx` without a display manager -- jes
OK, thanks for bringing that up.milomak wrote:I am finding after doing updates (using sid), thatreverts to default.Code: Select all
/etc/systemd/system/getty.target.wants/getty@tty1.service
My original method is a tad on the hacky side
For a more "correct" solution, create a file at /etc/systemd/system/getty@tty1.service.d/override.conf with the following content:
Code: Select all
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin <user name> --noclear %I $TERM
EDIT: Note added to the end of the OP.
Last edited by Head_on_a_Stick on 2017-01-14 18:57, edited 1 time in total.
deadbang
Re: Auto login and `startx` without a display manager -- jes
happy to help.
I assume that the upgrade of one or both of the below packages will have triggered this
I'll keep a look out when next they update
edit - that should be /sbin/agetty
I assume that the upgrade of one or both of the below packages will have triggered this
Code: Select all
[UPGRADE] systemd:amd64 229-5 -> 229-6
[UPGRADE] systemd-sysv:amd64 229-5 -> 229-6
edit - that should be /sbin/agetty
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid