This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Dolphin: play audio/videofiles on mouseover

Tags: None
(comma "," separated)
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
hi forum
i would appreciate a possibility in Dolphin to enable autoplay of audio- or videofiles when mouse hovering over it, instead of open an external mediaplayer everytime.
Remember that Mate used to have that option, as far as i know KDE does not, or not entirely (only in certain open file dialogs).

what i found is:
https://www.kubuntuforums.net/showthread.php?63185-Auto-preview-audio-and-video-files-in-the-Dolphin-and-Konqueror
but in the process of compiling Dolphin with a tuned tooltipmanager it got stucked: missing a lot of KF5 -tools !?
>>according to google KDE-Frameworks is missed and installable only by a PPA or compiling should be with src-build....

I'm not sure about all that and wether this whole error-prone project is worth the candle?

Has anyone another idea or a clue? Any future perspectives relating to enabling of that feature?

Last edited by kinoe on Wed Oct 26, 2016 3:29 pm, edited 1 time in total.


Reality is frequently inaccurate.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
KDE Forums Brainstorm - Dolphin Video audio play hovering the file: viewtopic.php?f=83&t=92269

Meanwhile

There could be alternative versions of the KDE applications - a user can install them to the home or to the /opt/.

Image

The drill, at here, with the Dolphin is:

1) Get the sources - using distribution sources (pkgbuild)
2) Edit the sources - adding the option to play on mouse over and put the konsole to the left/right/top/bottom.
3) Build - building an Arch Dolphin package.
4) Install - Installing the package.
5) Use - adding the alternative Dolphin to the KDE Menu

Image


To build an alternative version of the Dolphin:

Code: Select all
REQUIRED packages have been found:

 * ECM (required version >= 1.6.0)
 * Qt5Core
 * Qt5Concurrent
 * Qt5Widgets
 * Qt5Gui
 * Qt5DBus
 * Qt5 (required version >= 5.4.0)
 * KF5DocTools (required version >= 5.21.0)
 * KF5Init (required version >= 5.21.0)
 * KF5KCMUtils (required version >= 5.21.0)
 * KF5NewStuff (required version >= 5.21.0)
 * KF5CoreAddons (required version >= 5.21.0)
 * Gettext
 * PythonInterp
 * KF5I18n (required version >= 5.21.0)
 * KF5DBusAddons (required version >= 5.21.0)
 * KF5Bookmarks (required version >= 5.21.0)
 * KF5Config (required version >= 5.21.0)
 * KF5KIO (required version >= 5.21.0)
 * KF5Parts (required version >= 5.21.0)
 * KF5Solid (required version >= 5.21.0)
 * KF5IconThemes (required version >= 5.21.0)
 * KF5Completion (required version >= 5.21.0)
 * KF5TextWidgets (required version >= 5.21.0)
 * KF5WindowSystem (required version >= 5.21.0)
 * KF5Notifications (required version >= 5.21.0)
 * KF5Crash (required version >= 5.21.0)
 * KF5 (required version >= 5.21.0)
 * Phonon4Qt5

OPTIONAL packages have been found:

 * KF5Activities (required version >= 5.21.0)
 * KF5Baloo (required version >= 4.97) , Baloo Core libraries , <http://www.kde.org>
   For adding desktop-wide search and tagging support to dolphin
 * KF5BalooWidgets (required version >= 4.97) , Baloos Widgets , <http://www.kde.org>
 * KF5FileMetaData (required version >= 5.19.0) , <https://projects.kde.org/kfilemetadata>
   For accessing file metadata labels



Enhanced Dolphin:
Image

YouTube clip: https://youtu.be/Zu07hNtJFwg

Last edited by Rog131 on Wed Oct 26, 2016 6:28 pm, edited 1 time in total.
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
@Rog131
thanks for your quick response :)

I had gone partially through that process you described, until that point of missing apps/tools:
    ECM> NO (not installed), installable via ubuntu repositories
    Gettext>> YES (installed): gettext 0.19.7-2ubuntu3
    Qt5> NO only: qt5-default
    Qt5Core>> NO only: libqt5core5a
    Qt5Concurrent>> NO only: libqt5concurrent5
    Qt5Widgets>> NO only: libqt5widgets5
    Qt5Gui>> NO only: libqt5gui5
    Qt5DBus>> NO only: libqt5dbus5
    KF5KCMUtils > NO only: libkf5kcmutils-data & libkf5kcmutils5
    KF5DocTools > NO only: lib...
    KF5Init > NO only: lib...
    KF5NewStuff > NO only: lib...
    KF5CoreAddons > NO only: lib...
    KF5I18n > NO only: lib...
    KF5DBusAddons > NO only: lib...
    KF5Bookmarks > NO only: lib...
    KF5Config > NO only: lib...
    KF5KIO > NO only: lib...
    KF5Parts > NO only: lib...
    KF5Solid > NO only: lib...
    KF5IconThemes > NO only: lib...
    KF5Completion > NO only: lib...
    KF5TextWidgets > NO only: lib...
    KF5WindowSystem > NO only: lib...
    KF5Notifications > NO only: lib...
    KF5Crash > NO only: lib...
    KF5 > NO only: lib...
    Phonon4Qt5>> YES phonon4qt5 4:4.9.0-4+16.04+build13
    PythonInterp> NO, installable via ubuntu repositories but 'python-svipc'???

Lacking a lot! Is it a whole package thats missing here? KDE-Framework?


Reality is frequently inaccurate.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kinoe wrote:@Rog131


I had gone partially through that process you described, until that point of missing apps/tools:
[list]ECM> NO (not installed), installable via ubuntu repositories
.
.
.
Lacking a lot! Is it a whole package thats missing here? KDE-Framework?


As the Neon is using the Debian packaging system then the easiest way to get the build dependencies should be with the:
Code: Select all
apt-get build-dep

command. Dolphin:
Code: Select all
sudo apt-get build-dep dolphin


More from Debian Building Tutorial: https://wiki.debian.org/BuildingTutorial --> https://wiki.debian.org/BuildingTutoria ... pendencies
wolfi323
Registered Member
Posts
1129
Karma
11
OS
If you enable dolphin's "Informations" sidebar though (in the menu "View"->Sidebars), you can play audio and video files by clicking on the small play button in the preview:


That's not exactly on mouse hover, but at least saves you from opening an external application...
And it's built-in, no need to patch dolphin and build it yourself.
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
@Rog131
thanks again!

but how to build and install to /opt/KF5 with the DEBIAN-building commands (debuild -b -uc -us)?
What is the equivalent to -DCMAKE_INSTALL_PREFIX=/opt/KF5 -DCMAKE_PREFIX_PATH=/opt/KF5 ??

@wolfi323
thanks for your hint. This is helpful and i will make do with it if compiling doesn't work.
But in general i'm curious how to in linux and in different linux distros and last but not least i love the feature of autoplay at mouseover.
I think its very handy when working with sound collections.


Reality is frequently inaccurate.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kinoe wrote:
but how to build and install to /opt/KF5 with the DEBIAN-building commands (debuild -b -uc -us)?
What is the equivalent to -DCMAKE_INSTALL_PREFIX=/opt/KF5 -DCMAKE_PREFIX_PATH=/opt/KF5 ??


IF

If you want to wrap the alternative version of the Dolphin to the Debian package you will need to:

- Rename your package - there can be only one 'dolphin' named package installed.

Image

- write a 'debian/rules' file with support to the cmake options.

There are many Debian packaging guides. Picking one: Debian New Maintainers' Guide - https://www.debian.org/doc/manuals/maint-guide/

BUT

You could use the 'apt-get build-dep' to install the Debian/Ubuntu/Neon/... build dependencies and then compile/install your alternative version with generic commands:

Code: Select all
$ mkdir -p builddir

$ cd builddir && cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/opt/KF5 \
    -DCMAKE_INSTALL_PREFIX=/opt/KF5 \
    -DLIB_INSTALL_DIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=off \
    -DBUILD_TESTING=OFF

$ make

$ sudo make install


Example:

Unpacking the dolphin-16.08.2.tar.xz and (making wanted editions) cd to /dolphin-16.08.2/

Code: Select all
[rog131@archfox dolphin-16.08.2]$ mkdir -p builddir         
[rog131@archfox dolphin-16.08.2]$ cd builddir && cmake .. \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DCMAKE_PREFIX_PATH=/opt/KF5 \
>     -DCMAKE_INSTALL_PREFIX=/opt/KF5 \
>     -DLIB_INSTALL_DIR=lib \
>     -DKDE_INSTALL_USE_QT_SYS_PATHS=off \
>     -DBUILD_TESTING=OFF
-- The C compiler identification is GNU 6.2.1
-- The CXX compiler identification is GNU 6.2.1
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/hardening-wrapper/bin/c++
-- Check for working CXX compiler: /usr/lib/hardening-wrapper/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:324 (message):
  LIB_INSTALL_DIR is deprecated, use KDE_INSTALL_LIBDIR instead.
Call Stack (most recent call first):
  /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:418 (_define_relative)
  CMakeLists.txt:24 (include)


-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Found KF5DocTools: /usr/lib64/cmake/KF5DocTools/KF5DocToolsConfig.cmake (found version "5.26.0")
-- Found KF5Init: /usr/lib64/cmake/KF5Init/KF5InitConfig.cmake (found version "5.26.0")
-- Found KF5KCMUtils: /usr/lib64/cmake/KF5KCMUtils/KF5KCMUtilsConfig.cmake (found version "5.26.0")
-- Found KF5NewStuff: /usr/lib64/cmake/KF5NewStuff/KF5NewStuffConfig.cmake (found version "5.26.0")
-- Found KF5CoreAddons: /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.26.0")
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.8.1")
-- Found PythonInterp: /usr/bin/python (found version "3.5.2")
-- Found KF5I18n: /usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.26.0")
-- Found KF5DBusAddons: /usr/lib64/cmake/KF5DBusAddons/KF5DBusAddonsConfig.cmake (found version "5.26.0")
-- Found KF5Bookmarks: /usr/lib64/cmake/KF5Bookmarks/KF5BookmarksConfig.cmake (found version "5.26.0")
-- Found KF5Config: /usr/lib64/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.26.0")
-- Found KF5KIO: /usr/lib64/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.26.0")
-- Found KF5Parts: /usr/lib64/cmake/KF5Parts/KF5PartsConfig.cmake (found version "5.26.0")
-- Found KF5Solid: /usr/lib64/cmake/KF5Solid/KF5SolidConfig.cmake (found version "5.26.0")
-- Found KF5IconThemes: /usr/lib64/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.26.0")
-- Found KF5Completion: /usr/lib64/cmake/KF5Completion/KF5CompletionConfig.cmake (found version "5.26.0")
-- Found KF5TextWidgets: /usr/lib64/cmake/KF5TextWidgets/KF5TextWidgetsConfig.cmake (found version "5.26.0")
-- Found KF5WindowSystem: /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (found version "5.26.0")
-- Found KF5Notifications: /usr/lib64/cmake/KF5Notifications/KF5NotificationsConfig.cmake (found version "5.26.0")
-- Found KF5Crash: /usr/lib64/cmake/KF5Crash/KF5CrashConfig.cmake (found version "5.26.0")
-- Found KF5: success (found suitable version "5.26.0", minimum required is "5.21.0") found components:  DocTools Init KCMUtils NewStuff CoreAddons I18n DBusAddons Bookmarks Config KIO Parts Solid IconThemes Completion TextWidgets WindowSystem Notifications Crash
-- Found KF5Activities: /usr/lib64/cmake/KF5Activities/KF5ActivitiesConfig.cmake (found version "5.26.0")
-- Found KF5: success (found suitable version "5.26.0", minimum required is "5.21.0") found components:  Activities
-- Baloo packages are found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
--
-- The following OPTIONAL packages have been found:

 * KF5Activities (required version >= 5.21.0)
 * KF5Baloo (required version >= 4.97) , Baloo Core libraries , <http://www.kde.org>
   For adding desktop-wide search and tagging support to dolphin
 * KF5BalooWidgets (required version >= 4.97) , Baloos Widgets , <http://www.kde.org>
 * KF5FileMetaData (required version >= 5.19.0) , <https://projects.kde.org/kfilemetadata>
   For accessing file metadata labels

-- The following REQUIRED packages have been found:

 * ECM (required version >= 1.6.0)
 * Qt5Core
 * Qt5Concurrent
 * Qt5Widgets
 * Qt5Gui
 * Qt5DBus
 * Qt5 (required version >= 5.4.0)
 * KF5DocTools (required version >= 5.21.0)
 * KF5Init (required version >= 5.21.0)
 * KF5KCMUtils (required version >= 5.21.0)
 * KF5NewStuff (required version >= 5.21.0)
 * KF5CoreAddons (required version >= 5.21.0)
 * Gettext
 * PythonInterp
 * KF5I18n (required version >= 5.21.0)
 * KF5DBusAddons (required version >= 5.21.0)
 * KF5Bookmarks (required version >= 5.21.0)
 * KF5Config (required version >= 5.21.0)
 * KF5KIO (required version >= 5.21.0)
 * KF5Parts (required version >= 5.21.0)
 * KF5Solid (required version >= 5.21.0)
 * KF5IconThemes (required version >= 5.21.0)
 * KF5Completion (required version >= 5.21.0)
 * KF5TextWidgets (required version >= 5.21.0)
 * KF5WindowSystem (required version >= 5.21.0)
 * KF5Notifications (required version >= 5.21.0)
 * KF5Crash (required version >= 5.21.0)
 * KF5 (required version >= 5.21.0)
 * Phonon4Qt5

-- Configuring done
-- Generating done
-- Build files have been written to: /media/sda3/Generic/dolphin-16.08.2/builddir


The make step is long, 30,5 KiB, so only pasting the start and the end:

Code: Select all
[rog131@archfox builddir]$  make
Scanning dependencies of target kdeinit_dolphin_automoc
[  0%] Automatic moc for target kdeinit_dolphin
Generating moc source dolphindockwidget.moc
Generating moc source phononwidget.moc
Generating moc source moc_dbusinterface.cpp
Generating moc source moc_dolphincontextmenu.cpp
Generating moc source moc_dolphindockwidget.cpp
Generating moc source moc_dolphinmainwindow.cpp
Generating moc source moc_dolphinrecenttabsmenu.cpp
.
.
.
[ 98%] Building CXX object src/CMakeFiles/kcm_dolphingeneral.dir/settings/servicemodel.cpp.o
[ 99%] Building CXX object src/CMakeFiles/kcm_dolphingeneral.dir/dolphin_generalsettings.cpp.o
[ 99%] Building CXX object src/CMakeFiles/kcm_dolphingeneral.dir/kcm_dolphingeneral_automoc.cpp.o
[ 99%] Linking CXX shared module kcm_dolphingeneral.so
[100%] Built target kcm_dolphingeneral
Scanning dependencies of target doc-index-cache-bz2
[100%] Generating index.cache.bz2
[100%] Built target doc-index-cache-bz2


Installing:

Code: Select all
[rog131@archfox builddir]$ sudo make install
[sudo] password for rog131:
[  0%] Automatic moc for target kdeinit_dolphin
[  0%] Built target kdeinit_dolphin_automoc
[  0%] Automatic moc for target dolphinprivate
[  0%] Built target dolphinprivate_automoc
[  0%] Automatic moc for target dolphinvcs
[  0%] Built target dolphinvcs_automoc
[  2%] Built target dolphinvcs
[ 34%] Built target dolphinprivate
[ 35%] Built target org.freedesktop.FileManager1.xml_target
Scanning dependencies of target kdeinit_dolphin
[ 35%] Building CXX object src/CMakeFiles/kdeinit_dolphin.dir/kdeinit_dolphin_automoc.cpp.o
[ 36%] Linking CXX shared library libkdeinit5_dolphin.so
[ 70%] Built target kdeinit_dolphin
[ 71%] Automatic moc for target kcm_dolphinviewmodes
[ 71%] Built target kcm_dolphinviewmodes_automoc
[ 81%] Built target kcm_dolphinviewmodes
[ 82%] Automatic moc for target dolphin
[ 82%] Built target dolphin_automoc
[ 83%] Built target dolphin
[ 83%] Automatic moc for target dolphinpart
[ 83%] Built target dolphinpart_automoc
[ 85%] Built target dolphinpart
[ 85%] Automatic moc for target kcm_dolphinnavigation
[ 85%] Built target kcm_dolphinnavigation_automoc
Scanning dependencies of target kcm_dolphinnavigation
[ 86%] Building CXX object src/CMakeFiles/kcm_dolphinnavigation.dir/kcm_dolphinnavigation_automoc.cpp.o                                                                                   
[ 86%] Linking CXX shared module kcm_dolphinnavigation.so
[ 88%] Built target kcm_dolphinnavigation
[ 88%] Automatic moc for target kcm_dolphinservices
[ 88%] Built target kcm_dolphinservices_automoc
Scanning dependencies of target kcm_dolphinservices
[ 88%] Building CXX object src/CMakeFiles/kcm_dolphinservices.dir/kcm_dolphinservices_automoc.cpp.o                                                                                       
[ 89%] Linking CXX shared module kcm_dolphinservices.so
[ 94%] Built target kcm_dolphinservices
[ 95%] Automatic moc for target kcm_dolphingeneral
[ 95%] Built target kcm_dolphingeneral_automoc
[100%] Built target kcm_dolphingeneral
[100%] Built target doc-index-cache-bz2
Install the project...
-- Install configuration: "Release"
-- Installing: /opt/KF5/lib/cmake/DolphinVcs/DolphinVcsConfig.cmake
-- Installing: /opt/KF5/lib/cmake/DolphinVcs/DolphinVcsConfigVersion.cmake
-- Installing: /opt/KF5/lib/cmake/DolphinVcs/DolphinVcsTargets.cmake
-- Installing: /opt/KF5/lib/cmake/DolphinVcs/DolphinVcsTargets-release.cmake
-- Installing: /opt/KF5/include/Dolphin/dolphinvcs_version.h
-- Installing: /opt/KF5/share/dbus-1/services/org.kde.dolphin.FileManager1.service
-- Installing: /opt/KF5/lib/libdolphinvcs.so.5.0.0
-- Up-to-date: /opt/KF5/lib/libdolphinvcs.so.5
-- Up-to-date: /opt/KF5/lib/libdolphinvcs.so
-- Set runtime path of "/opt/KF5/lib/libdolphinvcs.so.5.0.0" to "/opt/KF5/lib"
-- Installing: /opt/KF5/share/kservicetypes5/fileviewversioncontrolplugin.desktop
-- Installing: /opt/KF5/include/dolphinvcs_export.h
-- Installing: /opt/KF5/include/Dolphin/KVersionControlPlugin
-- Installing: /opt/KF5/include/Dolphin/kversioncontrolplugin.h
-- Installing: /opt/KF5/lib/libdolphinprivate.so.5.0.0
-- Up-to-date: /opt/KF5/lib/libdolphinprivate.so.5
-- Set runtime path of "/opt/KF5/lib/libdolphinprivate.so.5.0.0" to "/opt/KF5/lib"
-- Installing: /opt/KF5/include/dolphin_export.h
-- Installing: /opt/KF5/lib/plugins/dolphinpart.so
-- Set runtime path of "/opt/KF5/lib/plugins/dolphinpart.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/share/kxmlgui5/dolphinpart/dolphinpart.rc
-- Installing: /opt/KF5/share/kservices5/dolphinpart.desktop
-- Installing: /opt/KF5/share/dbus-1/interfaces/org.freedesktop.FileManager1.xml
-- Installing: /opt/KF5/lib/libkdeinit5_dolphin.so
-- Set runtime path of "/opt/KF5/lib/libkdeinit5_dolphin.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/bin/dolphin
-- Set runtime path of "/opt/KF5/bin/dolphin" to "/opt/KF5/lib"
-- Installing: /opt/KF5/lib/plugins/kcm_dolphinviewmodes.so
-- Set runtime path of "/opt/KF5/lib/plugins/kcm_dolphinviewmodes.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/lib/plugins/kcm_dolphinnavigation.so
-- Set runtime path of "/opt/KF5/lib/plugins/kcm_dolphinnavigation.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/lib/plugins/kcm_dolphinservices.so
-- Set runtime path of "/opt/KF5/lib/plugins/kcm_dolphinservices.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/lib/plugins/kcm_dolphingeneral.so
-- Set runtime path of "/opt/KF5/lib/plugins/kcm_dolphingeneral.so" to "/opt/KF5/lib"
-- Installing: /opt/KF5/share/applications/org.kde.dolphin.desktop
-- Installing: /opt/KF5/share/config.kcfg/dolphin_directoryviewpropertysettings.kcfg
-- Installing: /opt/KF5/share/config.kcfg/dolphin_generalsettings.kcfg
-- Installing: /opt/KF5/share/config.kcfg/dolphin_compactmodesettings.kcfg
-- Installing: /opt/KF5/share/config.kcfg/dolphin_iconsmodesettings.kcfg
-- Installing: /opt/KF5/share/config.kcfg/dolphin_detailsmodesettings.kcfg
-- Installing: /opt/KF5/share/config.kcfg/dolphin_versioncontrolsettings.kcfg
-- Installing: /opt/KF5/share/kxmlgui5/dolphin/dolphinui.rc
-- Installing: /opt/KF5/share/metainfo/org.kde.dolphin.appdata.xml
-- Installing: /opt/KF5/share/kservices5/kcmdolphinviewmodes.desktop
-- Installing: /opt/KF5/share/kservices5/kcmdolphinnavigation.desktop
-- Installing: /opt/KF5/share/kservices5/kcmdolphinservices.desktop
-- Installing: /opt/KF5/share/kservices5/kcmdolphingeneral.desktop
-- Installing: /opt/KF5/etc/xdg/servicemenu.knsrc
-- Installing: /opt/KF5/bin/servicemenuinstallation
-- Installing: /opt/KF5/bin/servicemenudeinstallation
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/index.cache.bz2
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/index.docbook
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/default-ui.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/grouping-view.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/locationbar-breadcrumb.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/locationbar-context-menu.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/locationbar-editable.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/locationbar-kioslaves-menu.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/locationbar-places-icon.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/nepomuk-search-more-options.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/nepomuk-search.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-general-behavior.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-navigation.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-services.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-startup.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-trash.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/preferences-viewmodes-icons.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/toolbar-navigation.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/toolbar-view-appearance.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/toolbar.png
-- Installing: /opt/KF5/share/doc/HTML/en/dolphin/viewproperties-dialog.png
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
@ Rog132
you made my day! :D
and it works nearly flawlessly
Thanks a bundle man! You really want to share your knowledge and you know how to with best effort!


Reality is frequently inaccurate.
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
Since i moved to Arch Linux Plasma, i'd like to run the process of building dolphin kf5+ again! But i don't know what are the dependencies in Arch and wether its possible with Arch Linux Plasma at all?
Maybe meanwhile someone knows an new alternate possibility for mouse-over?


Reality is frequently inaccurate.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kinoe wrote:Since i moved to Arch Linux Plasma, i'd like to run the process of building dolphin kf5+ again! But i don't know what are the dependencies in Arch and wether its possible with Arch Linux Plasma at all?...


With the Arch Linux it is a bit easier: Creating packages - https://wiki.archlinux.org/index.php/creating_packages

-> You will need the 'base-devel'.


An example:

Browsing to the https://www.archlinux.org/packages/extr ... 4/dolphin/ -> https://git.archlinux.org/svntogit/pack ... es/dolphin and downloading the PKGBUILD.

Executing:

Code: Select all
makepkg


to get source and the make dependencies - output:

==> Making package: dolphin 17.04.2-1 (ma 19.6.2017 21.20.43 +0300)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
.
.
.
==> Validating source files with sha256sums...
dolphin-17.04.2.tar.xz ... Passed
dolphin-17.04.2.tar.xz.sig ... Skipped
==> Verifying source file signatures with gpg...
dolphin-17.04.2.tar.xz ... FAILED (unknown public key 3A6A4DB839EAA6D7)
==> ERROR: One or more PGP signatures could not be verified!


When you are building for yourself you could bypass the error.

Editing the PKGBUILD:

Changing the:
Code: Select all
pkgname=dolphin


to

Code: Select all
pkgname=dolphin-yourname


My name is 'dolphin-kf5git'

Note !
Building an alternative version and having both 'dolphin' and ' dolphin-yourname' installed.
Image

and changing:

Code: Select all
build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}


to

Code: Select all
build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/opt/KF5 \
    -DCMAKE_INSTALL_PREFIX=/opt/KF5 \
    -DLIB_INSTALL_DIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=off \
    -DBUILD_TESTING=OFF
  make
}


Note !
Installing to the /opt/ not to the /usr/.

Image

Unpacking the dolphin-17.04.2.tar.xz to the /src/dolphin-yourname-17.04.2 and making the /src/build/.

Image

Editing the /src/dolphin-17.04.2/src/views/tooltips/tooltipmanager.cpp and adding other Dolphin extras...

After edits executing:

Code: Select all
makepkg -e


Code: Select all
man makepkg

       -e, --noextract
           Do not extract source files or run the prepare() function (if present); use
           whatever source already exists in the $srcdir/ directory. This is handy if you
           want to go into $srcdir/ and manually patch or tweak code, then make a package
           out of the result.


As result there should be dolphin-yourname-17.04.2-1-x86_64.pkg.tar.xz

Installing the alternate Dolphin with command:
Code: Select all
sudo pacman -U dolphin-yourname-17.04.2-1-x86_64.pkg.tar.xz


Code: Select all
man pacman

       -U, --upgrade
           Upgrade or add package(s) to the system and install the required dependencies
           from sync repositories. Either a URL or file path can be specified...



The alternate dolphin can be launched with command:

Code: Select all
export LD_LIBRARY_PATH=/opt/KF5/lib; /opt/KF5/bin/dolphin


or/and added to the KDE menu.


Testing ...

Image
Full image:http://i.imgur.com/1xSj2EY.png

seems to work.
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
thanks again for your answer Rog131,

forgive me my ignorance but i'm a bit puzzled with tho whole process, though i've been through it in the past.
The order you listed once was:
1) Get the sources - using distribution sources (pkgbuild) --->> I downloaded: dolphin 17.04.2-1 pkg and PKGBUILD and also dolphin source: https://github.com/KDE/dolphin
2) Edit the sources - adding the option to play on mouse over and put the konsole to the left/right/top/bottom.--->> Sorry I forgot how to do that! In https://www.kubuntuforums.net/showthread.php?t=63185 i don't see the wood for the trees... Could you please give me a hint?
3) Build - building an Arch Dolphin package.
4) Install - Installing the package.
5) Use - adding the alternative Dolphin to the KDE Menu -->those last 3 steps should be clear
Thanks
User avatar
Rog131
Registered Member
Posts
828
Karma
10
With the Dolphin 17.04.2 I have been using patch - tooltipmanager.diff:

Code: Select all
--- "a/src/views/tooltips/tooltipmanager.cpp"   2017-06-05 21:52:31.000000000 +0300
+++ "b/src/views/tooltips/tooltipmanager.cpp"   2017-06-19 21:39:20.136874882 +0300
@@ -33,6 +33,8 @@
 #include <QTimer>
 #include <QWindow>
 
+#include <QProcess>
+
 ToolTipManager::ToolTipManager(QWidget* parent) :
     QObject(parent),
     m_showToolTipTimer(0),
@@ -107,6 +109,14 @@
     m_showToolTipTimer->stop();
     m_contentRetrievalTimer->stop();
     m_tooltipWidget->hideLater();
+   
+    // Kill mouse over action
+    QObject *parent = 0;
+    QString program = "/usr/bin/pkill";
+    QStringList arguments;
+    arguments << "-f" << "/usr/local/bin/MouseOverAction.sh";
+    QProcess *killAction = new QProcess(parent);
+    killAction->start(program, arguments);
 }
 
 void ToolTipManager::startContentRetrieval()
@@ -203,5 +213,15 @@
     m_fileMetaDataWidget->adjustSize();
     m_tooltipWidget->showBelow(m_itemRect, m_fileMetaDataWidget, m_transientParent);
     m_toolTipRequested = false;
+   
+    // Start mouse over action
+    // http://api.kde.org/frameworks-api/frameworks5-apidocs/kio/html/index.html ?
+    // mimetype() and localPath()
+    QObject *parent = 0;
+    QString program = "/usr/local/bin/MouseOverAction.sh";
+    QStringList arguments;
+    arguments << m_item.mimetype() << m_item.localPath();
+    QProcess *startAction = new QProcess(parent);
+    startAction->start(program, arguments);
 }


It will execute the /usr/local/bin/MouseOverAction.sh when the mouse is over the icon and kill it when the
mouse is moving off.

An patch example:

The konsole at the top level Dolphin directory, at here: ../src/dolphin-kf5git-17.04.2/. The patch is, at here,
/media/sda3/Dolphin/Aur/dolphin 17.04.2/tooltipmanager.diff.

Dry/test run:
Code: Select all
$ patch -p1 --dry-run -i '/media/sda3/Dolphin/Aur/dolphin 17.04.2/tooltipmanager.diff'
checking file src/views/tooltips/tooltipmanager.cpp


Real deal:
Code: Select all
$ patch -p1 -i '/media/sda3/Dolphin/Aur/dolphin 17.04.2/tooltipmanager.diff'
patching file src/views/tooltips/tooltipmanager.cpp



Few examples of the /usr/local/bin/MouseOverAction.sh at here:

Code: Select all
#!/bin/bash
# Execute: MouseOverAction.sh mimetype file
#
# This example script is working at here with
# the 1920x1080 screen.
#
# It is using:
# - xdotool to read the mouse location
# - wmctrl to move, scale and raise the preview window
# - sox (play) to play audio files
# - ffmpeg2.8 (ffplay2.8) to play video and audio files
#
# The video preview (ffplay) needs to set the focus
# stealing prevention for the ffplay2.8:
# KDE System Settings > Window Management > Window rules
#
# Remember to set the script execute permission !

mimetype="$1"
file="$2"

# ffplay options
windowTitle=ffplayAutoPreview

# screen size
screenWidht=1920
screenHeight=1080

# exit trap
trap onExit EXIT

# kill the ffplayAutoPreview window on exit
onExit ()
# Call: onExit
{   
   if ! xset -q | grep "Caps Lock:   on" > /dev/null 2>&1; then
      pkill -f ffplayAutoPreview
   fi
}

# Caps Lock will move the focus to the previw window
# and enable the ffplay controls
lockPreview ()
# Call: lockPreview windowtitle
{
   previewwindowTitle="$1"
   
   while [ 1 ] ; do
      if xset -q | grep "Caps Lock:   on" > /dev/null 2>&1; then
         wmctrl -R "$previewwindowTitle"
      fi
      sleep 1
   done
}

# launch player
launchPlayer ()
{
# Call: launchPlayer windowtitle file

   localwindowTitle="$1"
   previewFile="$2"

   ffplay2.8 -window_title "$localwindowTitle" -x 1 -y 1 "$previewFile" > /dev/null 2>&1
}

# move/scale/raise the preview window
movingWindows ()
{
# Call: movingWindows windowtitle widht height

   localwindowTitle="$1"
   localscreenWidht="$2"
   localscreenHeight="$3"

# preview window size
   widht=$(( localscreenWidht / 3 ))
   height=$(( localscreenHeight / 3 ))

# wait preview window
   until wmctrl -l | grep "$localwindowTitle" ; do
      echo waiting >/dev/null
   done

# mouse location $X,$Y
   eval $(xdotool getmouselocation --shell)

# preview window location
   if [ $X -le $(( localscreenWidht / 2 )) ] ; then
      deltaX=$(( widht / 2 ))
   else
      deltaX=$(( -3 * widht / 2 ))
   fi

   if [ $Y -le $(( localscreenHeight / 2 )) ] ; then
      deltaY=$(( -height / 2 ))
   else
      deltaY=$(( -3 * height / 2 ))
   fi

   previewX=$((X + deltaX))
   if [ $previewX -lt 0 ] ; then previewX=0 ; fi
   previewY=$((Y + deltaY))
   if [ $previewY -lt 0 ] ; then previewY=0 ; fi

# move & resize and raise the preview window
   wmctrl -r "$localwindowTitle" -e "0,$previewX,$previewY,$widht,$height"
   wmctrl -r "$localwindowTitle" -b add,above
}

# there can be only one
if wmctrl -l | grep "$windowTitle" ; then exit ; fi

# preview options by mime type
case "$mimetype" in

      image/*)
      movingWindows "$windowTitle" "$screenWidht" "$screenHeight" &
      ffplay2.8 -window_title "$windowTitle" -x 1 -y 1 "$file"
      exit
      ;;

      audio/x-ms-wma)
      ffplay2.8 -nodisp "$file"
      exit
      ;;

      audio/mp4)
      ffplay2.8 -nodisp "$file"
      exit
      ;;
     
      audio/*)
      play "$file"
      exit
      ;;
     

      video/*|application/x-flash-video|application/vnd.ms-asf|application/vnd.rn-realmedia)
      movingWindows "$windowTitle" "$screenWidht" "$screenHeight" &
      lockPreview "$windowTitle" &
      launchPlayer "$windowTitle" "$file"
      ;;
     
      *)
#     case trap
      exit
     
esac


The ffplay 3 is, at here, flickering so using the ffplay2.8 - available from the Arch package ffmpeg2.8 https://www.archlinux.org/packages/extr ... ffmpeg2.8/

Image

Another example of the MouseOverAction.sh script:

Code: Select all
#!/bin/bash
# Execute: MouseOverAction.sh mimetype file
#
# This example script is working at here with
# the 1920x1080 screen.
#
# It is using:
# - xdotool to read the mouse location
# - wmctrl to move, scale and raise the preview window
# - sox (play) to play audio files
# - mplayer to play video files
#
# The video preview (mplayer) needs to set the focus
# stealing prevention for the mplayer:
# KDE System Settings > Window Management > Window rules
#
# Remember to set the script execute permission !

mimetype="$1"
file="$2"

# mplayer options
windowTitle=MPlayerAutoPreview

# screen size
screenWidht=1920
screenHeight=1080

# exit trap
trap onExit EXIT

# kill the mplayer window on exit
onExit ()
# Call: onExit
{   

   pkill -f MPlayerAutoPreview

}

# launch player
launchPlayer ()
{
# Call: launchPlayer windowtitle file

   localwindowTitle="$1"
   previewFile="$2"
   mplayer -title "$localwindowTitle" -xy 10 "$previewFile"
}

# move/scale/raise the preview window
movingWindows ()
{
# Call: movingWindows windowtitle widht height

   localwindowTitle="$1"
   localscreenWidht="$2"
   localscreenHeight="$3"

# preview window size
   widht=$(( localscreenWidht / 3 ))
   height=$(( localscreenHeight / 3 ))

# wait preview window
   until wmctrl -l | grep "$localwindowTitle" ; do
      echo waiting >/dev/null
   done

# mouse location $X,$Y
   eval $(xdotool getmouselocation --shell)

# preview window location
   if [ $X -le $(( localscreenWidht / 2 )) ] ; then
      deltaX=$(( widht / 2 ))
   else
      deltaX=$(( -3 * widht / 2 ))
   fi

   if [ $Y -le $(( localscreenHeight / 2 )) ] ; then
      deltaY=$(( -height / 2 ))
   else
      deltaY=$(( -3 * height / 2 ))
   fi

   previewX=$((X + deltaX))
   if [ $previewX -lt 0 ] ; then previewX=0 ; fi
   previewY=$((Y + deltaY))
   if [ $previewY -lt 0 ] ; then previewY=0 ; fi

# move & resize and raise the preview window
   wmctrl -r "$localwindowTitle" -e "0,$previewX,$previewY,$widht,$height"
   wmctrl -r "$localwindowTitle" -b add,above
}

# there can be only one
if wmctrl -l | grep "$windowTitle" ; then exit ; fi

# preview options by mime type
case "$mimetype" in
     
      audio/*)
      play "$file"
      exit
      ;;

      video/*|application/x-flash-video|application/vnd.ms-asf|application/vnd.rn-realmedia)
      movingWindows "$windowTitle" "$screenWidht" "$screenHeight" &
      launchPlayer "$windowTitle" "$file"
      ;;
     
      *)
#     case trap
      exit
     
esac


It is using the MPlayer to preview the Video files.

Image
Full image: http://imgur.com/9PRADoZ

About Window Rules

Setting up the preview with the Dolphin: https://www.kubuntuforums.net/showthrea ... post340393

Image
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
thank you Rog131 !!
i'm looking forward to apply it.
User avatar
kinoe
Registered Member
Posts
72
Karma
0
OS
Sorry Rog131,
i'm feeling really stupid 8) ...but... i don't get it.

If i understood you right the approach is as follows:
1. downloading the PKGBUILD of dolphin 17.04.2-1
2.
Code: Select all
makepkg
---> bypassing the error 'unknown public key 3A6A4DB839EAA6D7' by:
Code: Select all
gpg --recv-key 3A6A4DB839EAA6D7
gpg --lsign 3A6A4DB839EAA6D7

otherwise makepkg aborts
3. then: Editing the PKGBUILD
Code: Select all
pkgname=dolphin-myname

and
Code: Select all
build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/opt/KF5 \
    -DCMAKE_INSTALL_PREFIX=/opt/KF5 \
    -DLIB_INSTALL_DIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=off \
    -DBUILD_TESTING=OFF
  make
}

4. Unpacking the dolphin-17.04.2.tar.xz to the /src/dolphin-myname-17.04.2 and making the /src/build/
---> isn't makepkg missing before this?
So in the end there would be these two packages: dolphin-17.04.2 and dolphin-myname-17.04.2 but i don't quite get that kind of nesting: which dolphin into what /src/..?

and what is meant by "making the /src/build/"? Simply creating that directory?
5. Editing the /src/dolphin-17.04.2/src/views/tooltips/tooltipmanager.cpp and adding other Dolphin extras
6.
Code: Select all
makepkg -e

7. Installing the alternate Dolphin with command:
Code: Select all
sudo pacman -U dolphin-myname-17.04.2-1-x86_64.pkg.tar.xz

Please correct me where i'm wrong and thanks for your patience
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kinoe wrote:2.
Code: Select all
makepkg
---> bypassing the error 'unknown public key 3A6A4DB839EAA6D7' by:
Code: Select all
gpg --recv-key 3A6A4DB839EAA6D7
gpg --lsign 3A6A4DB839EAA6D7



I'm simply letting the 'makepkg' to die. I only want the source and the dependencies.

kinoe wrote:4. Unpacking the dolphin-17.04.2.tar.xz to the /src/dolphin-myname-17.04.2 and making the /src/build/
---> isn't makepkg missing before this?
So in the end there would be these two packages: dolphin-17.04.2 and dolphin-myname-17.04.2 but i don't quite get that kind of nesting: which dolphin into what /src/..?



???
The /usr/bin/makepkg is part of the package 'pacman'.
???

At here:

1) Get the source and the build dependencies - i.e:
Code: Select all
makepkg


2) Edit the source and the PKGBUILD (package name and the installation path)

3) Build the package from the edited source:
Code: Select all
makepkg -e




Example:

At the same directory as the PKGBUILD file:

1) Get the source and make needed directories:
Code: Select all
makepkg
mkdir -p ./src/build
mkdir -p ./src/dolphin-example-17.04.2
tar -xf dolphin-17.04.2.tar.xz -C ./src/dolphin-example-17.04.2 --strip-components=1


Image

2) Changing directory to ./src/dolphin-example-17.04.2/. Patching. Changing directory back to the same directory as the PKGBUILD file:
Code: Select all
cd ./src/dolphin-example-17.04.2/
patch -p1 -i '../../tooltipmanager.diff'
cd ../../


Image

Editing the PKGBUILD:
Code: Select all
kwrite PKGBUILD


Image

3) Build the package from the edited source with the edited PKGBUILD:
Code: Select all
makepkg -e


Image


Note !
At this I have been using the cli. You could use KDE tools - Ark etc.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]