Short answer:
Two options:
Recommended:
sudo apt remove landscape-common
sudo apt autoremove # Optionally, but recommended so that you can
confirm the problem is gone after restarting
rm ~/.motd_shown
Exit and restart Ubuntu/WSL, and the error should no longer appear.
Or, if you enable Systemd per this answer, the error shouldn't appear either. However, I don't recommend enabling Systemd just to suppress this error message. That's a lot of overhead if you don't need it for other purposes.
More detail:
Don't worry - This isn't related to you moving the distribution. The problem is there in all 22.04 installations on WSL. Funny I never noticed it until you pointed it out -- That shows just how much attention I pay to the MOTD :-/.
This is reported at the bottom of this Github issue, but it's not related to that particular issue (which was previously, and continues to be, fixed).
The problem here is that the Ubuntu distribution for WSL is based on Ubuntu Server, which includes support for Landscape, a feature for managing servers.
This really isn't applicable to WSL, of course, and probably (I'm guessing here, but I'll try to confirm later) requires Systemd support anyway, which WSL does not have. I have a feeling that there's a Systemd unit that sets up the Landscape directory that isn't getting run on WSL; hence the error.
It's safe to remove this package with the above command, and the error will no longer appear.
systemd
is available in WSL – PerseP Oct 08 '22 at 08:29~/.motd_shown
, it's really so that it's easy to confirm that the problem is really resolved when you exit and restart. Otherwise, the MOTD might not be shown again until the next day. I suggest leaving it in place (but it's fine to remove it entirely), just temporarily delete it to make sure it triggers again for confirmation. – NotTheDr01ds Nov 29 '22 at 16:16wsl --shutdown
on the Windows side to shutdown the entire WSL subsystem and kill all WSL processes, then start a new WSL shell. (Remove~/.motd_shown
first if you want to test the MOTD message.) – Deven T. Corzine Jul 30 '23 at 18:58wsl --shutdown
. – NotTheDr01ds Jul 30 '23 at 21:37