The following tutorial has been done on:

OS: Arch Linux
KDE Plasma Version: 5.27.10
QT Version: 5.15.12

/* You can use any theme you want if you feel confident enough. We are going to work with default theme "Breeze". We will use Midnight Commander to perform all the operations */

In order to set video on login screen we will have to modify file Main.qml located in theme folder. We will work with default theme "Breeze", although different theme can be used (change commands/steps accordingly). We will have to use a video in .mp4 format. You can use any video you like, but something short is recommended to avoid unnecessary load during boot. Please name the video you are going to use as "video.mp4" (or change the code in next steps accordingly). Proceed when ready.


Without further due:

1. open terminal

2. using Midnight Commander as an admin to copy video.mp4 to theme folder located in

/usr/share/sddm/themes/breeze


3. using Midnight Commander as admin open file Main.qml located in the theme folder

4. In the beginning of the file, where all the imports happen, make sure you have following entries:

    - import QtMultimedia 5.15

    - import QtQuick 2.15

5. Add the the above if they are missing.

6. In the same file find following code block and delete it:

Item {
​ ​id: wallpaper
​ ​anchors.fill:parent
​ ​(...)
​ ​sceneBackgroundImage: config.background
​ ​}
​}
}

6. Replace deleted code with following code:

 MediaPlayer {
        id: videoPlayer
        source: "video.mp4"
autoLoad: true autoPlay: true loops: Animation.Infinite } VideoOutput { source: videoPlayer anchors.fill: parent
flushMode: VideoOutput.FirstFrame }


7. Find following code block and delete it:

WallpaperFader{
visible: config.type === "image"
(...)
clock: clock
}


8. Save changes and close both editor and Midnight Commander.



9. In order to test theme, use following command (as normal user). You need to use ALT+F4 to close the preview:

sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze

10. If there is no errors and theme preview is working as expected - congratulations, you are done. 

Move to next section if you encountered errors.

I have done all the steps, but preview has not changed.
- Did you save changes? (F2 in Midnight Commander)
- are you testing same theme as you are editing?

Preview is working fine, but my login screen has not changed.
- Make sure that you set your login screen to Breeze. In KDE open settings app and navigate to "Startup and Shutdown" -> "Login Screen (SDDM)", select Breeze and click on Apply, provide password when prompted.

I have error relating to flushMode being non-existent.
This function has been introduced in QT 5.13. Make sure your are using same or higher version. QT can not be easily upgraded, you can remove line containing flushMode from the code, but it will likely cause flash of the screen at the end of the loop. You can use longer video to mask this issue.


Rating
0 0

Commenting is not enabled on this course.