Good Afternoon!
I am trying to get Debian 10 installed, along with X11, and then Fluxbox. I am able to get all three installed seperately, but can't get them working together. I need it to autologin into my account and then start fluxbox automatically. I can get the auto login to happen by using the following code:
make this directory
/etc/systemd/system/getty@tty1.service.d
edit this file as root:
/etc/systemd/system/getty@tty1.service.d/override.conf
add this to the file:
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --skip-login --login-options "-f vnet" --noissue %I 38400 linux
*note: always check the install location of agetty. Sometimes it's in /usr/bin
save and exit
cd
nano .profile (not as root)
Add this to the bottom:
#Startx Automatically
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx &>/dev/null
logout
fi
8. Save and exit
From here, I can't get it to do anything else.
sudo update-alternatives --config x-session-manager
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/startfluxbox 40
stop all of the annoying messages "NO WARRANTY", etc.
- cd
- touch .hushlogin
Full disclosure, this is my first time trying to do anything with Linux, and I am so lost. I am trying my best, but if anyone has any advice. I would greatly appreciate it.
[Software] Debian 10, X11, and Fluxbox
-
- Posts: 59
- Joined: 2021-08-13 19:55
- Location: Minnesota
- Has thanked: 5 times
- Been thanked: 4 times
Re: [Software] Debian 10, X11, and Fluxbox
You can try this one liner in your .profile to replace the four lines that you have, which was introduced some years ago by HOAS:
So replace these lines:
With this:
So replace these lines:
Code: Select all
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx &>/dev/null
logout
fi
Code: Select all
[ "$(tty)" = "/dev/tty1" ] && exec startx
-
- Posts: 3
- Joined: 2023-05-17 20:24
-
- Posts: 84
- Joined: 2023-02-07 13:35
- Been thanked: 22 times
Re: [Software] Debian 10, X11, and Fluxbox
Sourcing 'startx' is unusual but that stanza should work just as well as HoaS' abbreviated (lazy?) version. Note that the /dev/tty1 bit doesn't need to be quoted though, if code golf is your thing.
If you have a session manager installed and still want to use fluxbox create a file at ~/.xsession with this content:
But I think the problem is actually caused by the override for getty@tty1.service, more specifically:
Try this line instead:
Replace $username with your actual user name.
This can be used to edit unit files, it shows a commented-out copy of the original file for ease of modification:
Fluxbox is a window manager alternative rather than a session manager. Use galternatives to remove startfluxbox from the x-session-manager alternatives list. If there are no other session managers installed then the window manager with the highest priority would be used.JohnBallard0313 wrote: ↑2023-05-17 20:29sudo update-alternatives --config x-session-manager
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/startfluxbox 40
If you have a session manager installed and still want to use fluxbox create a file at ~/.xsession with this content:
Code: Select all
exec startfluxbox
From the agetty man page:JohnBallard0313 wrote: ↑2023-05-17 20:29ExecStart=-/sbin/agetty --skip-login --login-options "-f vnet" --noissue %I 38400 linux
So that will attempt to log in as root, which won't work if the root account is disabled (ie, the user declined to enter a root password during installation).-n, --skip-login
Do not prompt the user for a login name. This can be used in connection with the --login-program option to invoke a non-standard login process such as a BBS system. Note that with the --skip-login option, agetty gets no input from the user who logs in and therefore will not be able to figure out parity, character size, and newline processing of the connection. It defaults to space parity, 7 bit characters, and ASCII CR (13) end-of-line character. Beware that the program that agetty starts (usually /bin/login) is run as root.
Try this line instead:
Code: Select all
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin $username %I $TERM
This can be used to edit unit files, it shows a commented-out copy of the original file for ease of modification:
Code: Select all
systemctl edit getty@tty1.service
-
- Posts: 3
- Joined: 2023-05-17 20:24
Re: [Software] Debian 10, X11, and Fluxbox
Yall are freaking amazing! I was able to put together all the advice and now I have a working box that auto logs into fluxbox! I appreciate everyone's help!
This is what I ended up doing, hopefully this will help someone along in the future:
sudo mkdir /etc/systemd/system/getty@tty1.service.d
sudo nano /etc/systemd/system/getty@tty1.service.d/override.conf
add this to the file:
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin $username %I $TERM
save and exit
nano .profile (not as root)
Add this to the bottom:
#Startx Automatically
[ "$(tty)" = "/dev/tty1" ] && exec startx
save and exit.
sudo update-alternatives --config x-session-manager
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/startfluxbox 40
After a reboot, I was successfully able to connect right to the fluxbox gui
This is what I ended up doing, hopefully this will help someone along in the future:
sudo mkdir /etc/systemd/system/getty@tty1.service.d
sudo nano /etc/systemd/system/getty@tty1.service.d/override.conf
add this to the file:
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin $username %I $TERM
save and exit
nano .profile (not as root)
Add this to the bottom:
#Startx Automatically
[ "$(tty)" = "/dev/tty1" ] && exec startx
save and exit.
sudo update-alternatives --config x-session-manager
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/startfluxbox 40
After a reboot, I was successfully able to connect right to the fluxbox gui