View previous topic :: View next topic |
Author |
Message |
pabloblo n00b
Joined: 24 Jan 2024 Posts: 71
|
Posted: Sun Jun 02, 2024 10:41 pm Post subject: trying to automate the startup |
|
|
hello all,
currently the computer works, however each time I start, I am on the command line, I indicate startxfce4 and everything works, I am looking for a way to automate it because lightdm does not work |
|
Back to top |
|
|
wless123 n00b
Joined: 27 Aug 2021 Posts: 40
|
Posted: Sun Jun 02, 2024 10:58 pm Post subject: |
|
|
Not sure why lightdm does not work, but i'm using this oneliner in my ~/.bashrc
Code: |
[[ "$(tty)" == "/dev/tty1" ]] && startxfce4 && exit
|
In short: login from tty1 => startxfce => logout when X is closed |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22625
|
Posted: Sun Jun 02, 2024 11:16 pm Post subject: |
|
|
Doesn't that cause the user login to remain behind if startxfce4 fails, or is interrupted by a SIGINT? |
|
Back to top |
|
|
pabloblo n00b
Joined: 24 Jan 2024 Posts: 71
|
Posted: Sun Jun 02, 2024 11:24 pm Post subject: |
|
|
hello wless
I tried the solution you gave, it works indeed, you have to type the login and password in the shell and after it opens, I was wondering if it was possible to have a login screen |
|
Back to top |
|
|
wless123 n00b
Joined: 27 Aug 2021 Posts: 40
|
Posted: Mon Jun 03, 2024 12:18 am Post subject: |
|
|
Quote: |
[...]
I was wondering if it was possible to have a login screen
|
That's what lightdm and other are for.
Have you read the wiki?
https://wiki.gentoo.org/wiki/LightDM |
|
Back to top |
|
|
wless123 n00b
Joined: 27 Aug 2021 Posts: 40
|
Posted: Mon Jun 03, 2024 12:19 am Post subject: |
|
|
Hu wrote: | Doesn't that cause the user login to remain behind if startxfce4 fails, [...] |
Yes ofc, but that's on purpose You'll have a shell.
[EDIT]
And now as you remind me, there was another issue with re-login.
I had to alter my /etc/inittab and add at the end (comment everything else for tty1):
Code: |
a1:2345:bootwait:/sbin/agetty -a <user> -n 38400 tty1 linux
c1:2345:respawn:/sbin/agetty 38400 tty1 linux
|
This is for autologin on first boot and automates the login for X with my ~/.bashrc too. I'm using encrypted fs so there is no harm in auto-login.
[EDIT 2]:
Better use
Code: |
a1:2345:wait:/sbin/agetty -a <user> -n 38400 tty1 linux
c1:2345:respawn:/sbin/agetty 38400 tty1 linux
|
Also i've noticed on that way that i had only one tty with the "bootwait" parameter. for tty1. Changing it to just "wait" solved that issue too.
Last edited by wless123 on Mon Jun 03, 2024 7:01 pm; edited 2 times in total |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22625
|
Posted: Mon Jun 03, 2024 12:54 am Post subject: |
|
|
Is your system physically secure? With the mechanism you showed, I think anyone who can reach the keyboard can vt-switch to tty1, ^C out of the X session, and be left with a shell logged in as you. No password is required to do this. |
|
Back to top |
|
|
pabloblo n00b
Joined: 24 Jan 2024 Posts: 71
|
Posted: Mon Jun 03, 2024 1:23 am Post subject: |
|
|
wless123 wrote: | Quote: |
[...]
I was wondering if it was possible to have a login screen
|
That's what lightdm and other are for.
Have you read the wiki?
https://wiki.gentoo.org/wiki/LightDM |
yes i follow the tutorial but no results |
|
Back to top |
|
|
wless123 n00b
Joined: 27 Aug 2021 Posts: 40
|
Posted: Mon Jun 03, 2024 6:59 pm Post subject: |
|
|
Hu wrote: | Is your system physically secure? With the mechanism you showed, I think anyone who can reach the keyboard can vt-switch to tty1, ^C out of the X session, and be left with a shell logged in as you. No password is required to do this. |
Found the time to check it and sent a SIGINT (and a SIGKILL) to the X-Server and the session was closed properly. I had to relog to gain access again.
Also i've noticed on that way that i had only one tty with the "bootwait" parameter. for tty1. Changing it to just "wait" solved that issue too.
I modified the post too.
[EDIT]
Tried also Magic SysRq key + K with the same result, a new login tty. |
|
Back to top |
|
|
pabloblo n00b
Joined: 24 Jan 2024 Posts: 71
|
Posted: Tue Jun 04, 2024 2:30 pm Post subject: |
|
|
I'm trying to repair lightdm but it's not working
error: unexpectedly disconnected from boot status daemon |
|
Back to top |
|
|
|