Bug 412612 - Enable autostart during startup - option is not saved
Summary: Enable autostart during startup - option is not saved
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-04 18:07 UTC by WojtasJD
Modified: 2019-10-05 23:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.4


Attachments
KDE neon 5.16.5 - Building "latte-dock" ver. 0.9.85 (43.01 KB, text/plain)
2019-10-05 22:34 UTC, WojtasJD
Details
Manjaro KDE neon 18.1.0 - Building "latte-dock" ver. 0.9.85 (45.22 KB, text/plain)
2019-10-05 23:02 UTC, WojtasJD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description WojtasJD 2019-10-04 18:07:09 UTC
SUMMARY


STEPS TO REPRODUCE
1. Install KDE neon 5.16.5  or Manjaro KDE 18.1.0
2. Install latte-dock 0.9.2 or 0.9.3 (KDE neon) or 0.9.1 (Manjaro)
3. Run Latte Dock and go to Dock Settings -> Settings -> Preferences and mark under Behavior "Enable autostart during startup" -> Apply and OK

OBSERVED RESULT
Marking "Enable autostart during startup" option is not saved (if you go again to Settings... option is unmarked) and therefore during next session Latte is not launched.

EXPECTED RESULT
Save "Enable autostart during startup" option.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.16.5 x64 | Manjaro KDE 18.1.0 x64
KDE Plasma Version: 5.16.5 | 5.16.4
KDE Frameworks Version: 5.62.0 | 5.61.0
Qt Version: 5.12.3 | 5.13.0

ADDITIONAL INFORMATION
There is a folder: ~/.config/autostart
Launching Latte from terminal emulator: latte-dock --cc doesn't help

Another person with this behavior:
https://forum.manjaro.org/t/new-to-kde-i-have-question/104312
Comment 1 Michail Vourlakos 2019-10-04 18:10:34 UTC
what are your ~/config/autostart before and after you enable the option in Latte?

1. Isnt a latte-dock.desktop file appears in that folder after you install Latte?
2. Do you have a /usr/share/applications/org.kde.latte-dock.desktop file in your system?
Comment 2 Michail Vourlakos 2019-10-04 18:11:13 UTC
[1*] - Isnt a org.kde.latte-dock.desktop file appears in that folder after you enable the Latte option for autostart?
Comment 3 WojtasJD 2019-10-05 14:26:39 UTC
Thanks for reply.

It's weird - I've installed another fresh KDE neon 5.16.5 + Latte 0.9.3 and here autostart option is working fine.
I've installed also Kubuntu 19.04 (Plasma: 5.15.4, Frameworks: 5.56.0, Qt: 5.12.2) + Latte 0.8.8 and here autostart option is also working fine!

But in other three installations [fresh KDE neon 5.16.5 + Latte 0.9.3 (virtual machine) ; another KDE neon 5.16.5 + Latte 0.9.3 (bare metal) ; Manjaro 18.1.0 + Latte 0.9.1 (virtual machine):
- org.kde.latte-dock.desktop file doesn't appear in ~/.config/autostart/ if I click autostart option (+ Apply)
- there is a file /usr/share/applications/org.kde.latte-dock.desktop (both "KDE neon" and "Manjaro KDE")
- I did small experiment with steps as follows: 
 1. I've manually copied file /usr/share/applications/org.kde.latte-dock.desktop  ->  ~/.config/autostart/  
 2. After launching Latte, in settings autostart option is marked
 3. Rebooted system, Latte Dock is auto-starting
 4. In settings I've unchecked autostart option (+ Apply) and then ~/.config/autostart/org.kde.latte-dock.desktop file was deleted (as expected)
 5. Marked autostart option (+ Apply) and then in folder ~/.config/autostart/ file was NOT created

Additional steps on this machines doesn't help:
- latte-dock uninstall
- delete file: ~/.config/lattedockrc
- delete folder: ~/.config/latte
- delete folder: ~/.cache/lattedock
- latte-dock new install
Comment 4 Michail Vourlakos 2019-10-05 14:36:11 UTC
(In reply to WojtasJD from comment #3)
> Thanks for reply.
> 
> It's weird - I've installed another fresh KDE neon 5.16.5 + Latte 0.9.3 and
> here autostart option is working fine.
> I've installed also Kubuntu 19.04 (Plasma: 5.15.4, Frameworks: 5.56.0, Qt:
> 5.12.2) + Latte 0.8.8 and here autostart option is also working fine!
> 
> But in other three installations [fresh KDE neon 5.16.5 + Latte 0.9.3
> (virtual machine) ; another KDE neon 5.16.5 + Latte 0.9.3 (bare metal) ;
> Manjaro 18.1.0 + Latte 0.9.1 (virtual machine):
> - org.kde.latte-dock.desktop file doesn't appear in ~/.config/autostart/ if
> I click autostart option (+ Apply)
> - there is a file /usr/share/applications/org.kde.latte-dock.desktop (both
> "KDE neon" and "Manjaro KDE")
> - I did small experiment with steps as follows: 
>  1. I've manually copied file
> /usr/share/applications/org.kde.latte-dock.desktop  ->  ~/.config/autostart/
> 
>  2. After launching Latte, in settings autostart option is marked
>  3. Rebooted system, Latte Dock is auto-starting
>  4. In settings I've unchecked autostart option (+ Apply) and then
> ~/.config/autostart/org.kde.latte-dock.desktop file was deleted (as expected)
>  5. Marked autostart option (+ Apply) and then in folder
> ~/.config/autostart/ file was NOT created
> 
> Additional steps on this machines doesn't help:
> - latte-dock uninstall
> - delete file: ~/.config/lattedockrc
> - delete folder: ~/.config/latte
> - delete folder: ~/.cache/lattedock
> - latte-dock new install

can you test a commit when I uploaded it ?
Comment 5 Michail Vourlakos 2019-10-05 14:40:21 UTC
Git commit e04c57f4031dadb67bb087446818df66baac32f3 by Michail Vourlakos.
Committed on 05/10/2019 at 14:39.
Pushed by mvourlakos into branch 'v0.9'.

search for Latte desktop file in more generic way

--there are distros that do not return /usr/share/applications
as their first global path for desktop files. It is better to not
just search for the "applications" path but rather the desktop
file also to make sure that we use the first one found.
FIXED-IN:0.9.4

M  +1    -1    app/settings/universalsettings.cpp

https://commits.kde.org/latte-dock/e04c57f4031dadb67bb087446818df66baac32f3
Comment 6 Michail Vourlakos 2019-10-05 14:43:19 UTC
Git commit a69f3013d83dd95e87b6864e543fd5222823e0f9 by Michail Vourlakos.
Committed on 05/10/2019 at 14:43.
Pushed by mvourlakos into branch 'master'.

search for Latte desktop file in more generic way

--there are distros that do not return /usr/share/applications
as their first global path for desktop files. It is better to not
just search for the "applications" path but rather the desktop
file also to make sure that we use the first one found.
FIXED-IN:0.9.4

M  +1    -1    app/settings/universalsettings.cpp

https://commits.kde.org/latte-dock/a69f3013d83dd95e87b6864e543fd5222823e0f9
Comment 7 Michail Vourlakos 2019-10-05 14:44:10 UTC
is it possible to check that this commit fixes the issue?
Comment 8 WojtasJD 2019-10-05 22:34:39 UTC
Created attachment 123040 [details]
KDE neon 5.16.5 - Building "latte-dock" ver. 0.9.85

Of course I can check ;) TL;DR - autostart is working, now file org.kde.latte-dock.desktop is copied to ~/.config/autostart/
Thank you! (Latte is reporting itself ver. 0.9.85).

"KDE neon 5.16.5" (two installations with Latte Dock build/configure problems):
According to build instruction from https://github.com/KDE/latte-dock/blob/master/INSTALLATION.md I've installed dependencies:
sudo apt install cmake extra-cmake-modules qtdeclarative5-dev libqt5x11extras5-dev libkf5iconthemes-dev libkf5plasma-dev libkf5windowsystem-dev libkf5declarative-dev libkf5xmlgui-dev libkf5activities-dev build-essential libxcb-util-dev libkf5wayland-dev git gettext libkf5archive-dev libkf5notifications-dev libxcb-util0-dev libsm-dev libkf5crash-dev libkf5newstuff-dev


and:
--------------------------------------------------------------------
wojtasjd@KDE:~$ git clone https://anongit.kde.org/latte-dock.git
Cloning into 'latte-dock'...
remote: Counting objects: 33586, done.
remote: Compressing objects: 100% (12146/12146), done.
remote: Total 33586 (delta 24994), reused 29019 (delta 21205)
Receiving objects: 100% (33586/33586), 6.36 MiB | 4.30 MiB/s, done.
Resolving deltas: 100% (24994/24994), done.
wojtasjd@KDE:~$ cd latte-dock/
wojtasjd@KDE:~/latte-dock$ sh install.sh
install.sh: 12: [: unexpected operator
install.sh: 12: [: unexpected operator
install.sh: 16: [: -a: unexpected operator
install.sh: 22: [: -a: unexpected operator
install.sh: 25: [: -a: unexpected operator
install.sh: 29: [: unexpected operator
install.sh: 32: [: unexpected operator
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/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/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find KF5SysGuard (missing: KF5SysGuard_DIR)
-- Could NOT find KF5SysGuard: found neither KF5SysGuardConfig.cmake nor kf5sysguard-config.cmake 
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find KF5 (missing: SysGuard)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF5.cmake:110 (find_package_handle_standard_args)
  CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/wojtasjd/latte-dock/build/CMakeFiles/CMakeOutput.log".

wojtasjd@KDE:~/latte-dock$ 
wojtasjd@KDE:~/latte-dock$ sh install.sh
install.sh: 12: [: unexpected operator
install.sh: 12: [: unexpected operator
install.sh: 16: [: -a: unexpected operator
mkdir: nie można utworzyć katalogu „build”: Plik istnieje
wojtasjd@KDE:~/latte-dock$ 
wojtasjd@KDE:~/latte-dock$ which sh
/bin/sh
wojtasjd@KDE:~/latte-dock$ file /bin/sh
/bin/sh: symbolic link to dash
wojtasjd@KDE:~/latte-dock$ file /bin/dash
/bin/dash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=a783260e3a5fe0afdae77417eea7fbf8d645219e, stripped

wojtasjd@KDE:~/latte-dock$ ./install.sh
-- Could NOT find KF5SysGuard (missing: KF5SysGuard_DIR)
-- Could NOT find KF5SysGuard: found neither KF5SysGuardConfig.cmake nor kf5sysguard-config.cmake 
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find KF5 (missing: SysGuard)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF5.cmake:110 (find_package_handle_standard_args)
  CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/wojtasjd/latte-dock/build/CMakeFiles/CMakeOutput.log".
wojtasjd@KDE:~/latte-dock$ 
--------------------------------------------------------------------

So I propose updating build instruction to also add this dependencies: libkf5sysguard-dev , pkg-config 
Executing "sh install.sh" throw some errors but simply "./install.sh" works fine.

Beside "pkg-config" there was some other "Could NOT find" messages - I've attached file with build output.
Comment 9 WojtasJD 2019-10-05 23:02:14 UTC
Created attachment 123041 [details]
Manjaro KDE neon 18.1.0 - Building "latte-dock" ver. 0.9.85

Manjaro KDE 18.1.0 - here autostart also works fine ;)
[Plasma: 5.16.4; Frameworks: 5.61.0; Qt: 5.13.0]

Build without problem, only some warnings about deprecated-declarations - file with build output attached.
Comment 10 Michail Vourlakos 2019-10-05 23:12:27 UTC
The INSTALLATION.md  file is distro/community driven, I don't maintain it, it is maintained only from kde community. Feel free to send any commit for it