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

 

 

 

[Software] Debian 10, X11, and Fluxbox

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
JohnBallard0313
Posts: 5
Joined: 2023-05-17 20:24

[Software] Debian 10, X11, and Fluxbox

#1 Post by JohnBallard0313 »

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.

dlu2021
Posts: 198
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 37 times

Re: [Software] Debian 10, X11, and Fluxbox

#2 Post by dlu2021 »

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:

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx &>/dev/null
logout
fi
With this:

Code: Select all

[ "$(tty)" = "/dev/tty1" ] && exec startx

JohnBallard0313
Posts: 5
Joined: 2023-05-17 20:24

Re: [Software] Debian 10, X11, and Fluxbox

#3 Post by JohnBallard0313 »

I will give this a try and reply back asap! Thank you!

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: [Software] Debian 10, X11, and Fluxbox

#4 Post by Random_Troll »

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.
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
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.

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
But I think the problem is actually caused by the override for getty@tty1.service, more specifically:
JohnBallard0313 wrote: 2023-05-17 20:29ExecStart=-/sbin/agetty --skip-login --login-options "-f vnet" --noissue %I 38400 linux
From the agetty man page:
-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.
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).

Try this line instead:

Code: Select all

ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin $username %I $TERM
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:

Code: Select all

systemctl edit getty@tty1.service
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

JohnBallard0313
Posts: 5
Joined: 2023-05-17 20:24

Re: [Software] Debian 10, X11, and Fluxbox

#5 Post by JohnBallard0313 »

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

Post Reply