Announcement

Collapse
No announcement yet.

Kubuntu video wallpaper

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Autumn Leafs an animated SDDM theme

    About SDDM

    - https://github.com/sddm/sddm --> https://github.com/sddm/sddm/blob/ma...ocs/THEMING.md


    About qml and quick

    - http://qmlbook.github.io/index.html --> http://qmlbook.github.io/ch08/index.html
    - http://doc.qt.io/qt-5/qtquick-index.html --> http://doc.qt.io/qt-5/qtquick-partic...s-example.html


    Ubuntu packages

    - http://packages.ubuntu.com/search?ke...ll&section=all



    I don't know what I'm doing but seems to work


    Copying the 'Maldives' SDDM theme (/usr/share/sddm/themes/maldives/) to the work directory (~/Templates/sddm/autumnsddm/)

    Editing:

    Main.qml
    Code:
    /***************************************************************************
    * Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com>
    *
    * Permission is hereby granted, free of charge, to any person
    * obtaining a copy of this software and associated documentation
    * files (the "Software"), to deal in the Software without restriction,
    * including without limitation the rights to use, copy, modify, merge,
    * publish, distribute, sublicense, and/or sell copies of the Software,
    * and to permit persons to whom the Software is furnished to do so,
    * subject to the following conditions:
    *
    * The above copyright notice and this permission notice shall be included
    * in all copies or substantial portions of the Software.
    *
    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
    * OR OTHER DEALINGS IN THE SOFTWARE.
    *
    ***************************************************************************/
    
    import QtQuick 2.0
    import SddmComponents 2.0
    import QtMultimedia 5.0
    import "./additionalcomponents"
    
    Rectangle {
        id: container
        width: 640
        height: 480
    
        TextConstants { id: textConstants }
    
        Connections {
            target: sddm
    
            onLoginSucceeded: {
                errorMessage.color = "steelblue"
                errorMessage.text = textConstants.loginSucceeded
            }
    
            onLoginFailed: {
                errorMessage.color = "red"
                errorMessage.text = textConstants.loginFailed
            }
        }
    
    
        property int stage
        
        Background {
            anchors.fill: parent
    
            source: config.background
            fillMode: Image.PreserveAspectCrop
            onStatusChanged: {
                if (status == Image.Error && source != config.defaultBackground) {
                    source = config.defaultBackground
                }
            }
        }
        
        CustomAffector { 
            id: customAffector
            anchors.fill: parent
        }
        
        Rectangle {
            property variant geometry: screenModel.geometry(screenModel.primary)
            x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height
            color: "transparent"
    
            Image {
                id: rectangle
                anchors.centerIn: parent
                width: Math.max(320, mainColumn.implicitWidth + 50)
                height: Math.max(320, mainColumn.implicitHeight + 50)
    
                source: "rectangle.png"
                
                Column {
                    id: mainColumn
                    anchors.centerIn: parent
                    spacing: 12
                    
                    Text {
                        anchors.horizontalCenter: parent.horizontalCenter
                        color: "black"
                        verticalAlignment: Text.AlignVCenter
                        height: text.implicitHeight
                        width: parent.width
                        text: textConstants.welcomeText.arg(sddm.hostName)
                        wrapMode: Text.WordWrap
                        font.pixelSize: 24
                        elide: Text.ElideRight
                        horizontalAlignment: Text.AlignHCenter
                        
                    }
                    
                    Column {
                        width: parent.width
                        spacing: 4
                        Text {
                            id: lblName
                            width: parent.width
                            text: textConstants.userName
                            font.bold: true
                            font.pixelSize: 12
                        }
    
                        TextBox {
                            id: name
                            width: parent.width; height: 30
                            text: userModel.lastUser
                            font.pixelSize: 14
    
                            KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password
    
                            Keys.onPressed: {
                                if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
                                    sddm.login(name.text, password.text, session.index)
                                    event.accepted = true
                                }
                            }
                        }
                    }
    
                    Column {
                        width: parent.width
                        spacing : 4
                        Text {
                            id: lblPassword
                            width: parent.width
                            text: textConstants.password
                            font.bold: true
                            font.pixelSize: 12
                        }
    
                        PasswordBox {
                            id: password
                            width: parent.width; height: 30
                            font.pixelSize: 14
    
                            KeyNavigation.backtab: name; KeyNavigation.tab: session
    
                            Keys.onPressed: {
                                if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
                                    sddm.login(name.text, password.text, session.index)
                                    event.accepted = true
                                }
                            }
                        }
                    }
    
                    Row {
                        spacing: 4
                        width: parent.width / 2
                        z: 100
    
                        Column {
                            z: 100
                            width: parent.width * 1.3
                            spacing : 4
                            anchors.bottom: parent.bottom
    
                            Text {
                                id: lblSession
                                width: parent.width
                                text: textConstants.session
                                wrapMode: TextEdit.WordWrap
                                font.bold: true
                                font.pixelSize: 12
                            }
    
                            ComboBox {
                                id: session
                                width: parent.width; height: 30
                                font.pixelSize: 14
    
                                arrowIcon: "angle-down.png"
    
                                model: sessionModel
                                index: sessionModel.lastIndex
    
                                KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox
                            }
                        }
    
                        Column {
                            z: 101
                            width: parent.width * 0.7
                            spacing : 4
                            anchors.bottom: parent.bottom
    
                            Text {
                                id: lblLayout
                                width: parent.width
                                text: textConstants.layout
                                wrapMode: TextEdit.WordWrap
                                font.bold: true
                                font.pixelSize: 12
                            }
    
                            LayoutBox {
                                id: layoutBox
                                width: parent.width; height: 30
                                font.pixelSize: 14
    
                                arrowIcon: "angle-down.png"
    
                                KeyNavigation.backtab: session; KeyNavigation.tab: loginButton
                            }
                        }
                    }
    
                    Column {
                        width: parent.width
                        Text {
                            id: errorMessage
                            anchors.horizontalCenter: parent.horizontalCenter
                            text: textConstants.prompt
                            font.pixelSize: 10
                        }
                    }
    
                    Row {
                        spacing: 4
                        anchors.horizontalCenter: parent.horizontalCenter
                        property int btnWidth: Math.max(loginButton.implicitWidth,
                                                        shutdownButton.implicitWidth,
                                                        rebootButton.implicitWidth, 80) + 8
                        Button {
                            id: loginButton
                            text: textConstants.login
                            width: parent.btnWidth
    
                            onClicked: sddm.login(name.text, password.text, session.index)
    
                            KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton
                        }
    
                        Button {
                            id: shutdownButton
                            text: textConstants.shutdown
                            width: parent.btnWidth
    
                            onClicked: sddm.powerOff()
    
                            KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
                        }
    
                        Button {
                            id: rebootButton
                            text: textConstants.reboot
                            width: parent.btnWidth
    
                            onClicked: sddm.reboot()
    
                            KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
                        }
                    }
                    LineClock { id: lineclock }
                }
            }
        }
    
        Component.onCompleted: {
            if (name.text == "")
                name.focus = true
            else
                password.focus = true
        }
    }
    metadata.desktop
    Code:
    [SddmGreeterTheme]
    Name=Autumn SDDM
    Description=Falling Leaf Theme
    Author=Me
    Copyright=(c) 2015 Me
    License=CC-BY-SA
    Type=sddm-theme
    Version=0.1
    Website=https://www.kubuntuforums.net/showthread.php?67703-Kubuntu-video-wallpaper
    Screenshot=preview.jpg
    MainScript=Main.qml
    ConfigFile=theme.conf
    TranslationsDirectory=translations
    Email=
    Theme-Id=autumnsddm
    Theme-API=2.0

    Adding:

    ~/Templates/sddm/autumnsddm/additionalcomponents/LineClock.qml
    Code:
    import QtQuick 2.0
    import QtQuick.Layouts 1.1
     
    Column {
        id: container
        property date dateTime: new Date()
     
        Timer {
            interval: 100; running: true; repeat: true;
            onTriggered: container.dateTime = new Date()
        }
        Text {
            id: time
            anchors.horizontalCenter: parent.horizontalCenter
     
            color: container.color
     
            text : Qt.formatDateTime(container.dateTime, "yyyy/MM/dd hh:mm")
            font.pointSize: 10
        }
    }
    Copying from the qtdeclarative5 examples the customaffector.qml --> ~/Templates/sddm/autumnsddm/additionalcomponents/CustomAffector.qml and editing:

    Code:
    /****************************************************************************
    **
    ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
    ** Contact: http://www.qt-project.org/legal
    **
    ** This file is part of the examples of the Qt Toolkit.
    **
    ** $QT_BEGIN_LICENSE:BSD$
    ** You may use this file under the terms of the BSD license as follows:
    **
    ** "Redistribution and use in source and binary forms, with or without
    ** modification, are permitted provided that the following conditions are
    ** met:
    **   * Redistributions of source code must retain the above copyright
    **     notice, this list of conditions and the following disclaimer.
    **   * Redistributions in binary form must reproduce the above copyright
    **     notice, this list of conditions and the following disclaimer in
    **     the documentation and/or other materials provided with the
    **     distribution.
    **   * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
    **     of its contributors may be used to endorse or promote products derived
    **     from this software without specific prior written permission.
    **
    **
    ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    **
    ** $QT_END_LICENSE$
    **
    ****************************************************************************/
    
    import QtQuick 2.0
    import QtQuick.Particles 2.0
    
    Item {
        id: container
        width: 500
        height: 350
    
        Image {
            source: "../images/transparent.png"
            anchors.fill: parent
        }
        
        ParticleSystem {
            anchors.fill: parent
            Emitter {
                width: parent.width
                emitRate: 4
                lifeSpan: 14000
                size: 80
                velocity: PointDirection { y: 60 }
            }
            Wander {
                anchors.fill: parent
                anchors.bottomMargin: 100
                xVariance: 60
                pace: 60
            }
    
            //! [0]
            Affector {
                property real coefficient: 0.1
                property real velocity: 1.5
                width: parent.width
                height: parent.height - 100
                onAffectParticles: {
                /*  //Linear movement
                    if (particle.r == 0) {
                        particle.r = Math.random() > 0.5 ? -1 : 1;
                    } else if (particle.r == 1) {
                        particle.rotation += velocity * dt;
                        if (particle.rotation >= maxAngle)
                            particle.r = -1;
                    } else if (particle.r == -1) {
                        particle.rotation -= velocity * dt;
                        if (particle.rotation <= -1 * maxAngle)
                            particle.r = 1;
                    }
                */
                    //Wobbly movement
                    for (var i=0; i<particles.length; i++) {
                        var particle = particles[i];
                        if (particle.r == 0.0) {
                            particle.r = Math.random() + 0.01;
                        }
                        particle.rotation += velocity * particle.r * dt;
                        particle.r -= particle.rotation * coefficient;
                        if (particle.r == 0.0)
                            particle.r -= particle.rotation * 0.000001;
                        particle.update = 1;
                    }
                }
            }
            //! [0]
    
            //! [1]
            Affector {//Custom Friction, adds some 'randomness'
                x: -60
                width: parent.width + 120
                height: 100
                anchors.bottom: parent.bottom
                onAffectParticles: {
                    for (var i=0; i<particles.length; i++) {
                        var particle = particles[i];
                        var pseudoRand = (Math.floor(particle.t*1327) % 10) + 1;
                        var yslow = dt * pseudoRand * 0.5 + 1;
                        var xslow = dt * pseudoRand * 0.05 + 1;
                        if (particle.vy < 1)
                            particle.vy = 0;
                        else
                            particle.vy = (particle.vy / yslow);
                        if (particle.vx < 1)
                            particle.vx = 0;
                        else
                            particle.vx = (particle.vx / xslow);
                        particle.update = true;
                    }
                }
            }
            //! [1]
    
            ImageParticle {
                anchors.fill: parent
                id: particles
                sprites: [Sprite {
                        source: "../images/realLeaf1.png"
                        frameCount: 1
                        frameDuration: 1
                        to: {"a":1, "b":1, "c":1, "d":1}
                    }, Sprite {
                        name: "a"
                        source: "../images/realLeaf1.png"
                        frameCount: 1
                        frameDuration: 10000
                    },
                    Sprite {
                        name: "b"
                        source: "../images/realLeaf2.png"
                        frameCount: 1
                        frameDuration: 10000
                    },
                    Sprite {
                        name: "c"
                        source: "../images/realLeaf3.png"
                        frameCount: 1
                        frameDuration: 10000
                    },
                    Sprite {
                        name: "d"
                        source: "../images/realLeaf4.png"
                        frameCount: 1
                        frameDuration: 10000
                    }
                ]
    
                z:4
            }
        }
    }
    Copying the realLeaf images from the qtdeclarative5 examples and making a transparent.png picture (~/Templates/sddm/autumnsddm/images/).



    Testing the CustomAffector.qml with the qmlscene:
    Code:
    qmlscene ~/Templates/sddm/autumnsddm/additionalcomponents/CustomAffector.qml


    Seems to work...

    Adding the default theme background: http://www.seegodtoday.com/wp-conten...len-leaves.jpg -> ~/Templates/sddm/autumnsddm/background.jpg

    Testing the SDDM theme:
    Code:
    sddm-greeter --test --theme ~/Templates/sddm/autumnsddm/
    A preview clip:



    Direct: https://youtu.be/6Lal3HfpBcw

    Seems to work. Using screen capture as theme preview -> ~/Templates/sddm/autumnsddm/preview.jpg





    Copying the theme ~/Templates/sddm/autumnsddm/ to the /usr/share/sddm/themes/autumnsddm/




    Picking the theme from the kcm SDDM




    Log out - log in - seems to work.
    Last edited by Rog131; Nov 14, 2015, 07:23 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #17
      How do I turn one of these into an animated background for the lock screen?

      How do I turn one of these into an animated background for the lock screen?
      If we could do that who needs screen savers, although it would be nice if the lock part faded away after awhile till a key press.

      Comment


        #18
        5 minute thrill

        How do I turn one of these into an animated background for the lock screen?
        Copying /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/ to /usr/share/plasma/look-and-feel/org.kde.puff.desktop/
        Editing the metadata.desktop



        There should be a new look&feel




        Editing the Puff.

        Adding components from the https://www.kubuntuforums.net/showth...l=1#post381741

        and editing the /usr/share/plasma/look-and-feel/org.kde.puff.desktop/contents/lockscreen/LockScreen.qml




        Code:
        /********************************************************************
         This file is part of the KDE project.
        
        Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
        
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
        *********************************************************************/
        
        import QtQuick 2.0
        import QtQuick.Controls 1.1
        import org.kde.plasma.core 2.0 as PlasmaCore
        import org.kde.plasma.private.sessions 2.0
        import "../components"
        import "../additionalcomponents"
        
        Image {
            id: root
            property bool viewVisible: false
            property bool debug: false
            property string notification
            property UserSelect userSelect: null
            property int interfaceVersion: org_kde_plasma_screenlocker_greeter_interfaceVersion ? org_kde_plasma_screenlocker_greeter_interfaceVersion : 0
            signal clearPassword()
        
            source: backgroundPath || "../additionalcomponents/artwork/background.png"
            fillMode: Image.PreserveAspectCrop
            asynchronous: true
        
            onStatusChanged: {
                if (status == Image.Error) {
                    source = "../additionalcomponents/artwork/background.png";
                }
            }
            
            CustomAffector { 
                id: customAffector
                anchors.fill: parent
            }
        
            LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
            LayoutMirroring.childrenInherit: true
        
            Connections {
                target: authenticator
                onFailed: {
                    root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed");
                }
                onGraceLockedChanged: {
                    if (!authenticator.graceLocked) {
                        root.notification = "";
                        root.clearPassword();
                    }
                }
                onMessage: {
                    root.notification = msg;
                }
                onError: {
                    root.notification = err;
                }
            }
        
            SessionsModel {
                id: sessionsModel
            }
        
            PlasmaCore.DataSource {
                id: keystateSource
                engine: "keystate"
                connectedSources: "Caps Lock"
            }
        
            Loader {
                id: changeSessionComponent
                active: false
                source: "ChangeSession.qml"
                visible: false
            }
        
            StackView {
                id: stackView
                height: units.largeSpacing * 14
                anchors {
                    verticalCenter: parent.verticalCenter
                    left: parent.left
                    right: parent.right
                }
        
                initialItem: Loader {
                    active: root.viewVisible
                    source: "MainBlock.qml"
                }
            }
        
            Loader {
                active: root.viewVisible
                source: "LockOsd.qml"
                anchors {
                    horizontalCenter: parent.horizontalCenter
                    bottom: parent.bottom
                }
            }
        
            Component.onCompleted: {
                // version support checks
                if (root.interfaceVersion < 1) {
                    // ksmserver of 5.4, with greeter of 5.5
                    root.viewVisible = true;
                }
            }
        }

        Testing...



        Direct: http://youtu.be/03RkTFTg2tM

        Seems to work.
        Last edited by Rog131; Dec 14, 2015, 12:55 PM.
        Before you edit, BACKUP !

        Why there are dead links ?
        1. Thread: Please explain how to access old kubuntu forum posts
        2. Thread: Lost Information

        Comment


          #19
          Originally posted by Rog131 View Post
          Copying /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/ to /usr/share
          Seems to work.
          Hey Thanks!

          Comment


            #20
            I am trying to get the video splash to work. it shows up in the list but when I preview it and when I boot using it I just get a white screen for the background. any ideas?
            I saw someone saying it was permission issues so I made it owned by the sddm user and it didnt help.
            I moved it to /usr/share/plasma/lookandfeel and again it shows up and its owned by root like everything else in the directory.
            same thing. so what am I missing?
            Could it be codec? my video originally was wmv so used ffmpeg to convert avi and then from avi to mp4.
            All of them played fine in a media player but still the white screen.
            at my wits end.
            any ideas?

            Comment


              #21
              Testing and testing and ...

              Tools

              Systemd logs/journal

              Code:
              man journalctl
              
              JOURNALCTL(1)                                           journalctl                                           JOURNALCTL(1)
              
              NAME
                     journalctl - Query the systemd journal
              
              SYNOPSIS
                     journalctl [OPTIONS...] [MATCHES...]
              
              DESCRIPTION
                     journalctl may be used to query the contents of the systemd(1) journal as written by systemd-journald.service(8).
              
                     If called without parameters, it will show the full contents of the journal, starting with the oldest entry
                     collected.
              ...
                     -b [ID][±offset], --boot=[ID][±offset]
                         Show messages from a specific boot. This will add a match for "_BOOT_ID=".
              
                         The argument may be empty, in which case logs for the current boot will be shown.
              ...

              A Qt tool: qmlscene

              http://doc.qt.io/qt-5/qtquick-qmlscene.html
              Prototyping with qmlscene

              Qt 5 includes qmlscene, a utility that loads and displays QML documents even before the application is complete. This utility also provides the following additional features that are useful while developing QML applications:..
              Code:
              $ qmlscene --help
              Usage: qmlscene [options] <filename>
               
               Options:
                --maximized ...................... Run maximized
                --fullscreen ..................... Run fullscreen
                --transparent .................... Make the window transparent
                --multisample .................... Enable multisampling (OpenGL anti-aliasing)
                --no-version-detection ........... Do not try to detect the version of the .qml file
                --slow-animations ................ Run all animations in slow motion
                --resize-to-root ................. Resize the window to the size of the root item
                --quit ........................... Quit immediately after starting
                --disable-context-sharing ........ Disable the use of a shared GL context for QtQuick Windows
                                          .........(remove AA_ShareOpenGLContexts)
                --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)
                --gles.............................Force use of GLES (AA_UseOpenGLES)
                --software.........................Force use of software rendering (AA_UseOpenGLES)
                --verbose..........................Print version and graphical diagnostics for the run-time
                -I <path> ........................ Add <path> to the list of import paths
                -P <path> ........................ Add <path> to the list of plugin paths
                -translation <translationfile> ... Set the language to run in

              kcmshell5 - A way to launch single KDE control module and hopefully see useful warnings/errors/etc...

              Code:
              $ kcmshell5 --help
              Usage: kcmshell5 [options] module
              A tool to start single KDE control modules
              
              Options:
                -v, --version              Displays version information.
                -h, --help                 Displays this help.
                --author                   Show author information.
                --license                  Show license information.
                --desktopfile <file name>  The base file name of the desktop entry for this
                                           application.
                --list                     List all possible modules
                --lang <language>          Specify a particular language
                --silent                   Do not display main window
                --args <arguments>         Arguments for the module
                --icon <icon>              Use a specific icon for the window
                --caption <caption>        Use a specific caption for the window
              
              Arguments:
                module                     Configuration module to open


              Steps

              1) Testing with the qmlscene

              Code:
              qmlscene Splash.qml


              Good: if no error messages and the video is playing.
              Fix: Error messages and the video is not playing.

              2) Testing from the KDE.

              Code:
              kcmshell5 kcm_splashscreen


              Good: if no error messages and the video is playing.
              Fix: Error messages and the video is not playing.


              3) Reboot and test if this ### is working.


              Good: The video is playing.
              Fix: The video is not playing -> look the logs:
              Code:
              journalctl -b
              Before you edit, BACKUP !

              Why there are dead links ?
              1. Thread: Please explain how to access old kubuntu forum posts
              2. Thread: Lost Information

              Comment


                #22
                Originally posted by ManOfLinux View Post
                I am trying to get the video splash to work. it shows up in the list but when I preview it and when I boot using it I just get a white screen for the background. any ideas?
                I saw someone saying it was permission issues so I made it owned by the sddm user and it didnt help.
                I moved it to /usr/share/plasma/lookandfeel and again it shows up and its owned by root like everything else in the directory.
                same thing. so what am I missing?
                Could it be codec? my video originally was wmv so used ffmpeg to convert avi and then from avi to mp4.
                All of them played fine in a media player but still the white screen.
                at my wits end.
                any ideas?
                About file format

                Testing with https://samples.ffmpeg.org/asf-wmv/ -> asf_with_chapters.wmv



                All tests -1,2,3 - are working at here.


                Owner

                All files in the users home directory should be owned by the user.
                Last edited by Rog131; Dec 15, 2015, 06:55 AM.
                Before you edit, BACKUP !

                Why there are dead links ?
                1. Thread: Please explain how to access old kubuntu forum posts
                2. Thread: Lost Information

                Comment


                  #23
                  Originally posted by ManOfLinux View Post
                  I am trying to get the video splash to work. it shows up in the list but when I preview it and when I boot using it I just get a white screen for the background. any ideas?
                  I saw someone saying it was permission issues so I made it owned by the sddm user and it didnt help.
                  I moved it to /usr/share/plasma/lookandfeel and again it shows up and its owned by root like everything else in the directory.
                  same thing. so what am I missing?
                  Could it be codec? my video originally was wmv so used ffmpeg to convert avi and then from avi to mp4.
                  All of them played fine in a media player but still the white screen.

                  at my wits end.
                  any ideas?
                  Found the problem QML doesnt want to play any video. I have tried wmv, avi, mp4(h264), mpg(mp1).
                  Any ideas? What do I need to install in 15.10 to make QML play video?

                  QFSFileEngine:pen: No file name specified
                  GStreamer; Unable to pause - "file:///home/user1/.local/share/plasma/wallpapers/org.me.gears/splash.mpg"
                  Warning: "No decoder available for type 'video/mpeg, systemstream=(boolean)true, mpegversion=(int)1'."
                  Error: "Your GStreamer installation is missing a plug-in."

                  QFSFileEngine:pen: No file name specified
                  Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.2, profile=(string)high, codec_data=(buffer)0164002affe100196764002aacd9405 005bb0110000003001000000c80f183196001000668ebe3cb2 2c0, width=(int)1280, height=(int)720, framerate=(fraction)100/1, pixel-aspect-ratio=(fraction)1/1'."
                  Error: "Your GStreamer installation is missing a plug-in."


                  UPDATE: worked with OGV just looked awful. Any ideas how I can get QML to play video besides OGV?
                  Last edited by Snowhog; Dec 15, 2015, 09:08 AM.

                  Comment


                    #24
                    thanks for the debugging tutorial. I knew about qmlscene, but couldnt get it work the way you said.
                    even if I specified the qt to use it would just hang on the command line, never drawing a window in x or giving me an error.
                    I will try journalctl and kcmshell5 but I am 99% sure what the problem is.
                    I tried the video wall paper example and when I was running plasmashell on the command line it complained about the video type, I switched to OGV and it works, but I am wondering how I can get QML to play mp4's

                    Also tried it on the videosplash I was working on, it also works with OGV.
                    The only thing that didn't work was the lockscreen.
                    Last edited by ManOfLinux; Dec 15, 2015, 08:45 AM.

                    Comment


                      #25
                      Originally posted by kubicle View Post
                      One common cause for a white screen is permissions...sddm greeter runs as user "sddm", so make sure it has read access to the theme directories and files.
                      another common cause is your qml wont handle anything but OGV, if you get a white screen and the permissions are correct try replacing the with an ogv file(make sure to change the qml to match) and restart plasmashell.
                      If it works I am 99% sure that is the problem.
                      You can see the errors by doing a animated wallpaper, shutting down plasmashell, then starting it from a shell so you can see the messages, then change the wall paper to your animated wall paper using a video that is not OGV, you should see errrors about a missing QML plugin.

                      Comment


                        #26
                        Thanks again, but I have a question.
                        I tried to apply what you said and combine it with a video background. This kinda works, I never see the video but I do get a black rectangle and I dont get the normal unlock box.
                        What am I doing wrong? Sorry I am QML newbie, just want to be able to have a video background on the lockscreen. at least it would be close to a screen saver.
                        Code:
                        /********************************************************************
                         This file is part of the KDE project.
                        
                        Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
                        
                        This program is free software; you can redistribute it and/or modify
                        it under the terms of the GNU General Public License as published by
                        the Free Software Foundation; either version 2 of the License, or
                        (at your option) any later version.
                        
                        This program is distributed in the hope that it will be useful,
                        but WITHOUT ANY WARRANTY; without even the implied warranty of
                        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                        GNU General Public License for more details.
                        
                        You should have received a copy of the GNU General Public License
                        along with this program.  If not, see <http://www.gnu.org/licenses/>.
                        *********************************************************************/
                        
                        import QtQuick 2.1
                        import QtMultimedia 5.0
                        import QtQuick.Layouts 1.1
                        import QtQuick.Controls 1.1
                        import org.kde.plasma.components 2.0 as PlasmaComponents
                        import org.kde.plasma.core 2.0 as PlasmaCore
                        import org.kde.kscreenlocker 1.0
                        import org.kde.plasma.workspace.keyboardlayout 1.0
                        import "../components"
                        import "../osd"
                        
                        Rectangle {
                            id: root
                            property bool debug: false
                            property string notification
                            property UserSelect userSelect: null
                            property int stage    
                            signal clearPassword()
                            
                           MediaPlayer {
                                id: mediaplayer
                                autoPlay: true
                                loops: MediaPlayer.Infinite
                                source: "video/splash.ogv"
                            }
                        
                            VideoOutput {
                                fillMode: VideoOutput.PreserveAspectCrop
                                anchors.fill: parent
                                source: mediaplayer
                            }
                        
                            Rectangle {
                                id: bottomRect
                                width: parent.width
                                y: 2/3 * parent.height
                                height: 50
                                color: "#4C000000"
                        
                                Rectangle {
                                    radius: 3
                                    color: "darkgrey"
                                    anchors.centerIn: parent
                                    height: 8
                                    width: height*32
                                    Rectangle {
                                        radius: 3
                                        anchors {
                                            left: parent.left
                                            top: parent.top
                                            bottom: parent.bottom
                                        }
                                        width: (parent.width / 6) * (stage - 1)
                                        color: "steelblue"
                                        Behavior on width { 
                                            PropertyAnimation {
                                                duration: 250
                                                easing.type: Easing.InOutQuad
                                            }
                                        }
                                    }
                                }
                            source: backgroundPath || "../components/artwork/background.png"
                            fillMode: Image.PreserveAspectCrop
                        
                            onStatusChanged: {
                                if (status == Image.Error) {
                                    source = "../components/artwork/background.png";
                                }
                            }
                        
                            Connections {
                                target: authenticator
                                onFailed: {
                                    root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed");
                                }
                                onGraceLockedChanged: {
                                    if (!authenticator.graceLocked) {
                                        root.notification = "";
                                        root.clearPassword();
                                    }
                                }
                                onMessage: {
                                    root.notification = msg;
                                }
                                onError: {
                                    root.notification = err;
                                }
                            }
                            Sessions {
                                id: sessions
                            }
                        
                            PlasmaCore.DataSource {
                                id: keystateSource
                                engine: "keystate"
                                connectedSources: "Caps Lock"
                            }
                        
                            StackView {
                                id: stackView
                                height: units.largeSpacing * 14
                                anchors {
                                    verticalCenter: parent.verticalCenter
                                    left: parent.left
                                    right: parent.right
                                }
                        
                                initialItem: BreezeBlock {
                                    id: block
                                    main: UserSelect {
                                        id: usersSelection
                        
                                        onVisibleChanged: {
                                            if(visible) {
                                                currentIndex = 0;
                                            }
                                        }
                                        Component.onCompleted: root.userSelect = usersSelection
                        
                                        notification: {
                                            var text = ""
                                            if (keystateSource.data["Caps Lock"]["Locked"]) {
                                                text += i18nd("plasma_lookandfeel_org.kde.lookandfeel","Caps Lock is on")
                                                if (root.notification) {
                                                    text += " • "
                                                }
                                            }
                                            text += root.notification
                                            return text
                                        }
                        
                                        model: ListModel {
                                            id: users
                        
                                            Component.onCompleted: {
                                                users.append({name: kscreenlocker_userName,
                                                              realName: kscreenlocker_userName,
                                                              icon: kscreenlocker_userImage,
                                                              showPassword: true,
                                                              ButtonLabel: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Unlock"),
                                                              ButtonAction: "unlock"
                                                })
                                                if(sessions.startNewSessionSupported) {
                                                    users.append({realName: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "New Session"),
                                                                  icon: "system-log-out", //TODO Need an icon for new session
                                                                  ButtonLabel: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Create Session"),
                                                                  ButtonAction: "newSession"
                                                    })
                                                }
                                                if(sessions.switchUserSupported) {
                                                    users.append({realName: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Change Session"),
                                                                  icon: "system-switch-user",
                                                                  ButtonLabel: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Change Session..."),
                                                                  ButtonAction: "changeSession"
                                                    })
                                                }
                                            }
                                        }
                                    }
                        
                                    controls: Item {
                                        height: childrenRect.height
                                        Layout.fillWidth: true
                                        function unlockFunction() {
                                            authenticator.tryUnlock(passwordInput.text);
                                        }
                        
                                        ColumnLayout {
                                            anchors.horizontalCenter: parent.horizontalCenter
                                            RowLayout {
                                                anchors.horizontalCenter: parent.horizontalCenter
                        
                                                KeyboardLayoutButton {}
                        
                                                PlasmaComponents.TextField {
                                                    id: passwordInput
                                                    placeholderText: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Password")
                                                    echoMode: TextInput.Password
                                                    enabled: !authenticator.graceLocked
                                                    onAccepted: actionButton.clicked(null)
                                                    focus: true
                                                    //HACK: Similar hack is needed in sddm loginscreen
                                                    //TODO: investigate
                                                    Timer {
                                                        interval: 200
                                                        running: true
                                                        repeat: false
                                                        onTriggered: passwordInput.forceActiveFocus()
                                                    }
                                                    visible: block.mainItem.model.count > 0 ? !!block.mainItem.model.get(block.mainItem.selectedIndex).showPassword : false
                                                    onVisibleChanged: {
                                                        if (visible) {
                                                            forceActiveFocus();
                                                        }
                                                        text = "";
                                                    }
                                                    onTextChanged: {
                                                        if (text == "") {
                                                            clearTimer.stop();
                                                        } else {
                                                            clearTimer.restart();
                                                        }
                                                    }
                        
                                                    Keys.onLeftPressed: {
                                                        if (text == "") {
                                                            root.userSelect.decrementCurrentIndex();
                                                        } else {
                                                            event.accepted = false;
                                                        }
                                                    }
                                                    Keys.onRightPressed: {
                                                        if (text == "") {
                                                            root.userSelect.incrementCurrentIndex();
                                                        } else {
                                                            event.accepted = false;
                                                        }
                                                    }
                                                    Timer {
                                                        id: clearTimer
                                                        interval: 30000
                                                        repeat: false
                                                        onTriggered: {
                                                            passwordInput.text = "";
                                                        }
                                                    }
                                                }
                        
                                                PlasmaComponents.Button {
                                                    id: actionButton
                                                    Layout.minimumWidth: passwordInput.width
                                                    text: block.mainItem.model.count > 0 ? block.mainItem.model.get(block.mainItem.selectedIndex).ButtonLabel : ""
                                                    enabled: !authenticator.graceLocked
                                                    onClicked: switch(block.mainItem.model.get(block.mainItem.selectedIndex)["ButtonAction"]) {
                                                        case "unlock":
                                                            unlockFunction();
                                                            break;
                                                        case "newSession":
                                                            sessions.startNewSession();
                                                            break;
                                                        case "changeSession":
                                                            stackView.push(changeSessionComponent)
                                                            break;
                                                    }
                                                }
                        
                                                Connections {
                                                    target: root
                                                    onClearPassword: {
                                                        passwordInput.selectAll();
                                                        passwordInput.forceActiveFocus();
                                                    }
                                                }
                                                Keys.onLeftPressed: {
                                                    root.userSelect.decrementCurrentIndex();
                                                }
                                                Keys.onRightPressed: {
                                                    root.userSelect.incrementCurrentIndex();
                                                }
                                            }
                                        }
                        
                                        Component {
                                            id: changeSessionComponent
                                            BreezeBlock {
                                                id: selectSessionBlock
                        
                                                Action {
                                                    onTriggered: stackView.pop()
                                                    shortcut: "Escape"
                                                }
                        
                                                main: UserSelect {
                                                    id: sessionSelect
                        
                                                    model: sessions.model
                                                    delegate: UserDelegate {
                                                        name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1 (%2)", model.session, model.location)
                                                        userName: model.session
                                                        iconSource: "user-identity"
                                                        width: ListView.view.userItemWidth
                                                        height: ListView.view.userItemHeight
                                                        faceSize: ListView.view.userFaceSize
                        
                                                        onClicked: {
                                                            ListView.view.currentIndex = index;
                                                            ListView.view.forceActiveFocus();
                                                        }
                                                    }
                                                }
                        
                                                controls: Item {
                                                    height: childrenRect.height
                                                    RowLayout {
                                                        anchors.centerIn: parent
                                                        PlasmaComponents.Button {
                                                            text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Cancel")
                                                            onClicked: stackView.pop()
                                                        }
                                                        PlasmaComponents.Button {
                                                            text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Change Session")
                                                            onClicked: {
                                                                sessions.activateSession(selectSessionBlock.mainItem.selectedIndex)
                                                                stackView.pop()
                                                                userSelect.selectedIndex = 0;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            PlasmaCore.FrameSvgItem {
                                id: osd
                        
                                // OSD Timeout in msecs - how long it will stay on the screen
                                property int timeout: 1800
                                // This is either a text or a number, if showingProgress is set to true,
                                // the number will be used as a value for the progress bar
                                property var osdValue
                                // Icon name to display
                                property string icon
                                // Set to true if the value is meant for progress bar,
                                // false for displaying the value as normal text
                                property bool showingProgress: false
                        
                                anchors {
                                    horizontalCenter: parent.horizontalCenter
                                    bottom: parent.bottom
                                }
                        
                                objectName: "onScreenDisplay"
                                visible: false
                                width: osdItem.width + margins.left + margins.right
                                height: osdItem.height + margins.top + margins.bottom
                                imagePath: "widgets/background"
                        
                                function show() {
                                    osd.visible = true;
                                    hideTimer.restart();
                                }
                        
                                OsdItem {
                                    id: osdItem
                                    rootItem: osd
                        
                                    anchors.centerIn: parent
                                }
                        
                                Timer {
                                    id: hideTimer
                                    interval: osd.timeout
                                    onTriggered: {
                                        osd.visible = false;
                                        osd.icon = "";
                                        osd.osdValue = 0;
                                    }
                                }
                            }
                        }

                        Comment


                          #27
                          Also is anyone using the video background having plasmashell lockups when the video background is active and you try to unlock the widgets.
                          I have to change the background to something else(color), unlock widgets and then plasmashell locks anyway and then I have to restart it.
                          Then it restarts with the color background and I am then able to unlock the widgets.
                          Then when I am done I can lock them with no problems. kinda weird just wondering if it was just me.

                          Comment


                            #28
                            Questions and Guesses

                            At here:
                            Qt: 5.5.1
                            KDE Frameworks: 5.17.0
                            Desktop: KDE Plasma 5.5.1
                            Distro: Arch Linux


                            Q&G


                            Any ideas? What do I need to install in 15.10 to make QML play video?

                            QFSFileEngine:pen: No file name specified
                            GStreamer; Unable to pause - "file:///home/user1/.local/share/plasma/wallpapers/org.me.gears/splash.mpg"
                            Warning: "No decoder available for type 'video/mpeg, systemstream=(boolean)true, mpegversion=(int)1'."
                            Error: "Your GStreamer installation is missing a plug-in."
                            Maybe a search with the 'ubuntu qml Error: "Your GStreamer installation is missing a plug-in." helps


                            I tried to apply what you said and combine it with a video background. This kinda works, I never see the video but I do get a black rectangle and I dont get the normal unlock box.
                            Can you capture a picture of it ?
                            Is it something like ?


                            The plasma has an alternate lock screen when it can't show the qml based lock screen. Syntax error ?
                            Have you tried to look the systemd journal ? The lock screen will throw the warnings/errors to the journal.


                            ... is anyone using the video background having plasmashell lockups when the video background is active and you try to unlock the widgets....
                            At here, the new plasmoid browser is hiding the video background - You will need to pick a new wallpaper and then again the video wallpaper.




                            What am I doing wrong? Sorry I am QML newbie...
                            So am I - There are lot of material of the qml. Examples etc. Some of them are working sometimes

                            /usr/share/plasma/look-and-feel/org.kde.puff.desktop/contents/lockscreen/LockScreen.qml at here:

                            Code:
                            /********************************************************************
                             This file is part of the KDE project.
                            
                            Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
                            
                            This program is free software; you can redistribute it and/or modify
                            it under the terms of the GNU General Public License as published by
                            the Free Software Foundation; either version 2 of the License, or
                            (at your option) any later version.
                            
                            This program is distributed in the hope that it will be useful,
                            but WITHOUT ANY WARRANTY; without even the implied warranty of
                            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                            GNU General Public License for more details.
                            
                            You should have received a copy of the GNU General Public License
                            along with this program.  If not, see <http://www.gnu.org/licenses/>.
                            *********************************************************************/
                            
                            import QtQuick 2.0
                            import QtQuick.Controls 1.1
                            import QtMultimedia 5.5
                            import org.kde.plasma.core 2.0 as PlasmaCore
                            import org.kde.plasma.private.sessions 2.0
                            import "../components"
                            import "../additionalcomponents"
                            
                            
                            Image {
                                id: root
                                property bool viewVisible: false
                                property bool debug: false
                                property string notification
                                property UserSelect userSelect: null
                                property int interfaceVersion: org_kde_plasma_screenlocker_greeter_interfaceVersion ? org_kde_plasma_screenlocker_greeter_interfaceVersion : 0
                                signal clearPassword()
                            
                                source: backgroundPath || "../additionalcomponents/artwork/background.png"
                                fillMode: Image.PreserveAspectCrop
                                asynchronous: true
                            
                                onStatusChanged: {
                                    if (status == Image.Error) {
                                        source = "../additionalcomponents/artwork/background.png";
                                    }
                                }
                                
                                MediaPlayer {
                                    id: mediaplayer
                                    autoPlay: true
                                    loops: MediaPlayer.Infinite
                                    source: "../additionalcomponents/video/Ghost in the shell - virtual reality diver.mp4"
                                }
                            
                                VideoOutput {
                                    fillMode: VideoOutput.PreserveAspectCrop
                                    anchors.fill: parent
                                    source: mediaplayer
                                }
                            
                                LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
                                LayoutMirroring.childrenInherit: true
                            
                                Connections {
                                    target: authenticator
                                    onFailed: {
                                        root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed");
                                    }
                                    onGraceLockedChanged: {
                                        if (!authenticator.graceLocked) {
                                            root.notification = "";
                                            root.clearPassword();
                                        }
                                    }
                                    onMessage: {
                                        root.notification = msg;
                                    }
                                    onError: {
                                        root.notification = err;
                                    }
                                }
                            
                                SessionsModel {
                                    id: sessionsModel
                                }
                            
                                PlasmaCore.DataSource {
                                    id: keystateSource
                                    engine: "keystate"
                                    connectedSources: "Caps Lock"
                                }
                            
                                Loader {
                                    id: changeSessionComponent
                                    active: false
                                    source: "ChangeSession.qml"
                                    visible: false
                                }
                            
                                StackView {
                                    id: stackView
                                    height: units.largeSpacing * 14
                                    anchors {
                                        verticalCenter: parent.verticalCenter
                                        left: parent.left
                                        right: parent.right
                                    }
                            
                                    initialItem: Loader {
                                        active: root.viewVisible
                                        source: "MainBlock.qml"
                                    }
                                }
                            
                                Loader {
                                    active: root.viewVisible
                                    source: "LockOsd.qml"
                                    anchors {
                                        horizontalCenter: parent.horizontalCenter
                                        bottom: parent.bottom
                                    }
                                }
                            
                                Component.onCompleted: {
                                    // version support checks
                                    if (root.interfaceVersion < 1) {
                                        // ksmserver of 5.4, with greeter of 5.5
                                        root.viewVisible = true;
                                    }
                                }
                            }
                            Seems to work - at here:



                            Direct: https://youtu.be/lU3C6DNr5qQ

                            Note - I have also edited the other parts (MainBlock.qml, BreezeBlock.qml,...) but the qml media player should (here it does) work as it is.
                            Last edited by Rog131; Dec 16, 2015, 12:36 PM.
                            Before you edit, BACKUP !

                            Why there are dead links ?
                            1. Thread: Please explain how to access old kubuntu forum posts
                            2. Thread: Lost Information

                            Comment


                              #29
                              Hello,
                              I'm trying to get this SDDM theme working, bud didn't managed to do so yet. Can anyone help? I can't log in. I'm getting the lock screen again and again.

                              Comment


                                #30
                                Originally posted by gvaram View Post
                                Hello,
                                I'm trying to get this SDDM theme working, bud didn't managed to do so yet. Can anyone help? I can't log in. I'm getting the lock screen again and again.
                                At here (*), when testing, there are few warnings:

                                [23:29:04.022] (WW) GREETER: file:///usr/share/sddm/themes/peaceful-saber/Main.qml:10:32: Unable to assign [undefined] to int
                                [23:29:04.022] (WW) GREETER: file:///usr/share/sddm/themes/peaceful-saber/Main.qml:87:16: Unable to assign double to QQuickAnchorLine
                                When trying to log in - it is no possible to type the password - hmm - maybe the mouse is invisible ?

                                To get the focus to the password line I added:

                                Code:
                                    Component.onCompleted: {
                                        if (name.text == "")
                                            name.focus = true
                                        else
                                            password.focus = true
                                    }
                                to the end of the Main.qml:



                                Now it is possible to type the password after I click the left mouse button.


                                More of the sddm themes and focus: https://forum.kde.org/viewtopic.php?f=17&t=129979


                                * 'at here'

                                Qt: 5.5.1
                                KDE Frameworks: 5.17.0
                                KDE Plasma 5.5.2
                                sddm version: 0.13.0-2
                                Distro: Arch Linux
                                Last edited by Rog131; Jan 06, 2016, 12:07 PM.
                                Before you edit, BACKUP !

                                Why there are dead links ?
                                1. Thread: Please explain how to access old kubuntu forum posts
                                2. Thread: Lost Information

                                Comment

                                Working...
                                X