16

I'm running Lubuntu 14.04. I'm a little concerned about the following Mono process that runs at startup, though it seems to be inactive. The command used to start this process was :

/usr/bin/mono /usr/lib/mono/4.5/xsp4.exe --port 8084 --address 0.0.0.0 --appconfigdir /etc/xsp4 --nonstop

and started by www-data.

I have never seen a Mono process run at startup before, and I can't think of a reason for it to be running. There also seems to be nothing in my startup services. Here is the output of initctl list :

http://pastebin.com/ttqKGPUH

What could this process be, and is it something to worry about ?

2
  • Is it really vanilla Lubuntu 14.04? Your pastebin content seems to indicate that there's a lot of other stuff present?
    – DK Bose
    Sep 25, 2016 at 17:29
  • 1
    I never said it was "vanilla". Only that I could think of no application that would require Mono to be running at startup . Hence I was concerned there could be something malicious. Also, I have installed several applications such as gnome-disks, and Okular, which may be the reason why there are entries related to those in the initctl output. Also, whoever downvoted the question, please tell me why you think the question was not appropriate. Sep 26, 2016 at 4:57

3 Answers 3

16

As pointed out in the answer by Thomas, it's easy enough to stop or disable this server, but you may want to consider whether you actually might want it running before you do. I found this question while researching this exact same concern on my own Kubuntu 18.04 LTS machine, and this helped me dig deeper into what it actually was. Turns out it's used to serve monodoc-http, as I was able to determine by exploring the content of files found in /etc/xsp4 and /usr/share/monodoc/web.

If you installed MonoDevelop or MonoDoc or anything related to developing code in Mono, then that's where it came from. If you did that on purpose because you're learning or coding in Mono, then you may actually want that service running. If you have no use for MonoDoc services, you can easily disable them on flavors of Ubuntu (and other distros which use systemd) using systemctl.

  • sudo systemctl stop mono-xsp4.service will stop the service
    (but won't disable it, so it will run again after next reboot).
  • sudo systemctl disable mono-xsp4.service will disable the service
    (but will not stop it if it is running currently).

You'll need to run both commands if you wish to actually stop the service now, and disable the service so that it's not running after the next reboot. If you know for certain that you have no use at all for MonoDoc and related services, you can also search for them in your package manager and uninstall them entirely.

2
  • 2
    You're joking! They install a webserver that runs on startup, just for the documentation? WTF?!
    – Sarke
    Apr 9, 2021 at 2:38
  • 2
    @Sarke: The "runs on startup" part is the bit that bothers me a little. Seems like the sorta thing you'd really wanna run "on-demand" (like when tools that require said service are actively running), but then again, that does introduce a whole 'nother level of complexity to the whole thing… Being it's a dev tool, one might wonder why dev documentation support services would need to be running even when not using the associated dev tools.
    – Spam Hater
    Apr 9, 2021 at 12:21
10

The mono-xsp4 is shipped with a SysV init script at /etc/init.d/mono-xsp4.

To disable the automatic startup run the following command.

update-rc.d mono-xsp4 disable 
1

Just a friendly word of caution: neither sudo update-rc.d mono-xsp4 disable or even the systemctl stop and disable commands listed in the answer will outright disable this ridiculous service/process from running without a reboot. <== Just a heads up on that.

I nuked mine from the orbit just to be sure;

sudo update-rc.d mono-xsp4 disable && sudo systemctl status mono-xsp4.service && sudo systemctl stop mono-xsp4.service && sudo systemctl disable mono-xsp4.service

As stated, at this point the process is still running (!) -- check the status with (sudo) htop if it's still there (in my case it WAS), press F3 and search for xsp4 and mono, kill the process with F9 and choosing either 9 (SIGKILL) or 15 (SIGTERM) when the xsp4 command is highlighted.

Or, just go for the blanket solution:

sudo killall mono && sudo killall xsp4

You could also sudo apt purge mono-xsp4, but that will uninstall ALL the Mono libraries and framework as well. Which in most cases is not the solution that you are after.

If you're concerned over the process after it's been disabled and seems to be no longer there, you can always view the /etc/init.d/mono-xsp4 file contents, and maybe even scrub it out of the system altogether. Be careful when meddling with the files though, though; as mentioned in the other replies, you might end up breaking some of Mono's developer functionalities etc.

I agree with the other commenter who stated that the service should definitely be on-demand rather than on startup by saying that I'm not so sure either if it's a good practice to have those type of services running tbh, especially when you stumble into it during a routine LAN security scan. Many Mono related programs might have this in their dependencies, but having it on autostart by default is "a bit" of a bad practice IMHO. (I would've commented this as a reply, but I don't have enough reputation points for that). :|

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .