It seems like you're trying to create a Ubuntu systemd service to start Docker Desktop automatically. Here's how you can do it on Ubuntu:
1. **Create the service file**:
Open a text editor and create a new file. You can name it something like `docker-desktop.service`. For example, you can use the command:
```bash
sudo nano /etc/systemd/system/docker-desktop.service
```
2. **Add the service configuration**:
Paste the following configuration into the file:
```ini
[Unit]
Description=Docker Launcher
[Service]
Type=idle
ExecStart=sudo systemctl --user -M <YOUR USER NAME TYPEIT>@ start docker-desktop
[Install]
WantedBy=multi-user.target
```
Replace `user-name` with your actual username.
3. **Save and close the file**: In Nano, you can save by pressing `Ctrl + O`, then press `Enter` to confirm, and exit by pressing `Ctrl + X`.
4. **Reload systemd**:
After creating the service file, reload systemd to make it aware of the new service:
```bash
sudo systemctl daemon-reload
```
5. **Enable the service**:
To start Docker Desktop automatically on boot, you need to enable the service:
```bash
sudo systemctl enable docker-desktop.service
```
6. **Start the service**:
You can start the service immediately without rebooting:
```bash
sudo systemctl start docker-desktop.service
```
7. **Check the status**:
To check the status of the service:
```bash
sudo systemctl status docker-desktop.service
```
This setup should ensure that Docker Desktop starts automatically on boot. Make sure to replace `user-name` with your actual username and adjust any other parameters as needed.
Finally change docker desktop application start on ubuntu
Like that
from usr/share/applications
[Desktop Entry]
Name=Docker Desktop
Comment=Docker Desktop for Linux
Exec=sudo /opt/docker-desktop/bin/docker-desktop
Icon=/opt/docker-desktop/share/icon.original.png
Type=Application
Keywords=container;docker;
Categories=Development;