0

I've unfortunately managed to lock myself out of my own playground (Raspberry Pi 4B, Raspbian Buster) after attempting what was originally going to be a solution to autostarting a network-kvm (synergy) script at bootup for more convenient use.

I had not been able to get the client application of Synergy to connect to my server, so I read that the X11 "Xsession" script may likely be the culprit. Within /etc/X11/Xsession I foolishly placed a one-liner to run my client application once screen control was inherently established:

/usr/bin/killall synergyc sleep 1 /usr/bin/synergyc synergy-server

Unfortunately, I am now prompted with a login screen for my one single user "pi" which would normally automatically boot up. This was my super-user account where I'd just sudo whatever I needed root credentials for. It accepts the password, but boots me right back out to the login screen again, presumably when killall is executed again.

Is there a way to revert back to a particular time from today to boot the system back into? I have Shift keyed into Recovery Mode but Raspbian, as far as I can tell, only allows me to reload the OS. Is there a way to modify this Xsession script otherwise, or am I pretty much S.O.L. here?

Thanks

1

Since you affected your X-sessions only, you are quite lucky and can use a command line interface to fix it.

If you access your Pi locally (i.e. with its own keyboard and monitor) use ctrl+alt+F1 to get to a login prompt.

If you do it remotely and have not yet activated ssh, remove the SD-card and place an empty file called ssh in the boot section of your SD. Then start the Pi and use (from linux PC) ssh pi@<ip of pi> to login. (Use Putty when you want to use ssh from a Windows PC).

Once in the CLI environment revert your changes and restart the Pi.

2
  • You, sir, (sorry if that username-based assumption is incorrect), are a gentleman and a scholar. Probably pretty fundamental stuff for a Linux pro, but your help has expedited me past a lot of anxious research, which may have taken a lot of time. I feel like a fool, but I was very hot to trot on understanding systemd and getting some other startup processes set up. I'll slow this train down.Thanks again! – user8585939 Dec 31 '20 at 4:26
  • @user8585939 You're welcome. Breaking a system is part of the learning game - I remember the cold sweat on my first unbootable system very well. – FelixJN Dec 31 '20 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.