Got Stuck in a Login Loop in Fedora KDE

Hi Steve,

Here are the files:

.bashrc.old
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
    for rc in ~/.bashrc.d/*; do
        if [ -f "$rc" ]; then
            . "$rc"
        fi
    done
fi
unset rc

export PATH=$PATH:/home/usr/.spicetify
. "$HOME/.controller_config"
.bash_profile.old
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

export PATH=$PATH:/home/usr/.spicetify
. "$HOME/.controller_config"

I realized there is a leftover of Spicetify app I no longer use in the both files.

They both look entirely normal.

.bashrc does look inside /etc/bashrc and sources anything it finds, but it’s unlikely that they have been changed; you might want to look at both of them to make sure that they don’t have really recent timestamps on them. ls -al /etc/profile /etc/bashrc and eyeball the timestamps for “suspiciously recent”

Also check to see if you have a ~/.bashrc.d directory - I’d not expect you to find one unless you or something has created it and put stuff inside.

If that all turns up no smoking gun, then what could copy the originals back into your ~ directory from /etc/skel and try a reboot. If the problem comes back then we know for definite that it’s something these scripts are sourcing and we can dig deeper if you have the stomach for it.

If this does bring the “argument too long” messages back to life then you’ll be reaching for the live USB again to remove them and regain control.

Hi Steve,

The ls command returned

-rw-r--r--. 1 root root 2709 Jul 25  2025 /etc/bashrc
-rw-r--r--. 1 root root 2058 Jul 25  2025 /etc/profile

so nothing new here.

I tried to cd to ~/.bashrc.d and it showed nothing as you guessed.

Do you suggest me to put the .old files to /etc/skel or the ones in there to ~?

I guess for completeness it would also be useful to see what’s in ~/.controller_config too?

Hi PG,

The ~/.controller_config exceeds the forum’s character limit, so I had to post it using a pastebin.

Only difference between the skeletons and your .old ones is the controller configuration file. As pg states post that and if its clean then either should be functionally equivalent.

Steve

Pretty big!

OK, if I download that file, and try to source it, then I get:

bash: /usr/bin/sed: Argument list too long

And the same thing happens if I try to subsequently run other commands in the same shell. I have to start a fresh bash to get anything done.

So that looks like the root of your issue. I’m not immediately sure why it does that though…

Given the size of it, I suspect its a likely candidate.

Steve

So what do you people suggest me to do?

First step: remove the sourcing of it from your .bashrc and .bash_profile.

Second step: identify if it can be made shorter. For example, can you remove the lines for controllers you don’t use?

Third step: investigate recent updates to whatever package creates this file.

Yeah, size alone can be a problem.

I don’t think anything about the content is special here. I created a file with the contents:

export BIGVAR="aaa"

…except with 200,000 instances of “a” rather than 3.

If I source that I get exactly the same behaviour, with “Argument list too long”

So I removed the part below from the .old files

export PATH=$PATH:/home/usr/.spicetify
. "$HOME/.controller_config"

and only left the controller I use in the .controller_config file

export SDL_GAMECONTROLLERCONFIG="03000000780000000600000010010000,Microntek Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,"

Is there anything else I should do?

You could take the .old extension off the filenames now to make them be used again in bash shells.

Once you’re confident you can get back into your system, you could then add back the . "$HOME/.controller_config" line to one of the files (no need to have it in both). Since you have radically shrunk down the controller_config file, that should hopefully work fine now.

Then investigate with the developers of whatever package creates that file to find out what happened - obviously you don’t want another update to come and blow up the size of the file, or you’ll be facing the same problem again.

Rename the .old files to their original name and reboot, enjoying the fact its now fixed.

Steve

Apparently this script caused all this mess. I found it from this Reddit post when I was trying to set up my controller.

From reading the comments on that post, it sounds like you are not alone in having this issue!