1

When opening a new terminal window within Kali Linux, I receive the following error:

Another Window Manager (Xfwm4) is already running on screen :0.0
To replace the current window manager, try "--replace"

(xfwm4:11241): xfwm4-WARNING **: 21:04:22.977: Could not find a screen to manage, exiting

enter image description here

I have tried running xfwm4 --replace but this does not fix the issue. I have also tried set -m, and restarting lightdm and dbus but nothing so far has worked.

I find the following error when running sudo journalctl -u lightdm

Sep 09 11:52:55 kali systemd[1]: Starting Light Display Manager...
Sep 09 11:52:55 kali systemd[1]: Started Light Display Manager.
Sep 09 11:52:55 kali lightdm[811]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not >
Sep 09 11:52:57 kali lightdm[975]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not >
Sep 09 11:52:57 kali lightdm[975]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=132) by (uid=0)
Sep 09 11:54:35 kali lightdm[1168]: gkr-pam: unable to locate daemon control file
Sep 09 11:54:35 kali lightdm[1168]: gkr-pam: stashed password to try later in open session
Sep 09 11:54:35 kali lightdm[1168]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not>
Sep 09 11:54:35 kali lightdm[1168]: pam_unix(lightdm:session): session opened for user kali(uid=1000) by (uid=0)
Sep 09 11:54:35 kali lightdm[1168]: gkr-pam: unlocked login keyring
Sep 09 13:57:58 kali systemd[1]: Stopping Light Display Manager...
Sep 09 13:57:58 kali systemd[1]: lightdm.service: Deactivated successfully.
Sep 09 13:57:58 kali systemd[1]: Stopped Light Display Manager.
Sep 09 13:57:58 kali systemd[1]: lightdm.service: Consumed 22.821s CPU time.

I am really curious as to why this is occurring in the first place. Any help is greatly appreciated.

Ctpelnar1988
  • 113
  • 6
  • 1
    Are you using `zsh`? AFAIK Kali Linux uses zsh as the default user shell. I'm thinking your `~/.zshrc` file is executing the command `xfwm4`. Try running `grep xfwm4 ~/.zshrc` – Edgar Magallon Dec 28 '22 at 06:39
  • 1
    @EdgarMagallon I am using bash. Your suggestion led me to check my `.bashrc` where I found `xfwm4` being executed at the bottom of the file. Deleting the entry fixed the issue. Thanx for your help! – Ctpelnar1988 Dec 28 '22 at 16:50
  • Glad it worked for you. Would you post an answer to mark it as accepted ? Or do you want I post the answer? Since this question has been solved then it should be useful leave an answer and mark it as accepted. – Edgar Magallon Dec 28 '22 at 17:25
  • 1
    @EdgarMagallon It was you who solved it. It should be you who gets credit for the answer. – Ctpelnar1988 Dec 28 '22 at 17:45

1 Answers1

1

The problem is in your ~/.bashrc (or ~/.zshrc if you are using zsh). In that file there is a line which executes the command xfwm4. Thus every time you open a new terminal session this line is executed. The fast solution to this is by editing the file and remove or comment out that line.

Edgar Magallon
  • 4,711
  • 2
  • 12
  • 27