linuxvideoautomationsystemdmpv

play a video file after gnome login


I want to see a video clip when I start using computer (and after login into Gnome) automatically. how can I do that in Linux (Manjaro)? I tried to make this by Systemd service but I was not successful. this is my Systemd service file:

[Unit]
Description=play video clip

[Service]
Type=oneshot
RemainAfterExit=true
StandardOutput=journal
ExecStart=/usr/bin/mpv /home/username/Videos/video.mp4 --vo=gpu --ao=alsa
User=username
Environment=DISPLAY=:1

[Install]
WantedBy=default.target

Solution

  • You can make a .desktop file, which plays the Video (that same command from the system file) and put that in the autostart directory in your home folder.