You can run sudo pkill Xorg
, that will kill the X11 server which will then restart for a login prompt.
This methods is simpler, easier to remember, and more generic than restarting the underlying service. The service might change depending on the Linux distribution, release or graphic environment selected but the X server name is much more stable; it didn't change since a decade.
Should you want to recover an unsaved work in progress, instead of killing the X server which will immediately kill all X clients (applications), you might identify the bogus program that froze your desktop, commonly either an application or desktop component that grabbed the mouse and kept it, and kill or restart that precise component. With Mint 17.2 and the Mate desktop, this often happens to me with mate-panel
.