code: def _create_autostart_entry(autostart_data: AutostartSettings, autostart_file: Path):
      
      try:
          source_desktop_file = get_source_desktop_file(autostart_data.desktop_file_name)
      except FileNotFoundError:
          _logger.exception("Failed to find a usable .desktop file! Unable to find: {}".format(
              autostart_data.desktop_file_name))
      else:
          _logger.debug("Found source desktop file that will be placed into the autostart directory: {}".format(
              source_desktop_file))
          with open(str(source_desktop_file), "r") as opened_source_desktop_file:
              desktop_file_content = opened_source_desktop_file.read()
          desktop_file_content = "\n".join(_manage_autostart_desktop_file_launch_flags(
              desktop_file_content, autostart_data.switch_show_configure
          )) + "\n"
          with open(str(autostart_file), "w", encoding="UTF-8") as opened_autostart_file:
              opened_autostart_file.write(desktop_file_content)
          _logger.debug("Written desktop file: {}".format(autostart_file))
docs: Create an autostart .desktop file in the autostart directory, if possible.