Bug 450184 - Application-specific action "start_new_session" does not appear in menu in a Plasma session
Summary: Application-specific action "start_new_session" does not appear in menu in a ...
Status: REPORTED
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.90.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-13 23:55 UTC by Alexander Potashev
Modified: 2022-04-15 23:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2022-02-13 23:55:19 UTC
SUMMARY
Application-specific action "start_new_session" does not appear in menu or toolbar in a Plasma session.

STEPS TO REPRODUCE
1. Build and run KTimeTracker from HEAD (https://invent.kde.org/pim/ktimetracker/-/commit/32f33e4f0c3a6301ac7a8bb55e6741209dabb5fb), an older version could also let you reproduce the bug.
2. Open File menu

OBSERVED RESULT
There is no menu item "File -> Start New Session". There are no relevant error messages on the stderr/stdout, it just silently hides.

EXPECTED RESULT
There should be a menu item "File -> Start New Session" because the action "start_new_session" is listed for the File menu in ktimetrackerui.rc, and the same action "start_new_session" is registered by the C++ code (see src/timetrackerwidget.cpp)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.23.5
(available in About System)
KDE Plasma Version:  5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Workarounds:
 A. Rename "start_new_session" to something else in the KTimeTracker source code (e.g. to "new_session" or to "start_new_session_")
 B. Run KTimeTracker in Fluxbox (or another DE)

I wonder if Plasma defines a conflicting action with the same name "start_new_session". If this is the case, could we maybe introduce namespaces for actions in order to avoid such conflicts?
(Or at least make such conflicts noticeable to the users and/or developers?)
Comment 1 Alexander Potashev 2022-04-15 22:58:05 UTC
Looks like it's caused by the following section in /usr/share/kde-settings/kde-profile/default/xdg/kdeglobals on Fedora:

```
# HOW: https://develop.kde.org/deploy/kiosk/introduction/
# WHY: https://bugzilla.redhat.com/show_bug.cgi?id=1929643
[KDE Action Restrictions]
action/start_new_session=false
action/switch_user=false
```
Comment 2 Alexander Potashev 2022-04-15 23:10:13 UTC
Git commit f8ed5ac856934ef8008680bdf97bfa0e6d316cfc by Alexander Potashev.
Committed on 15/04/2022 at 23:09.
Pushed by aspotashev into branch 'master'.

Fix action "Start New Session".

Looks like the problem was caused by the following section in
/usr/share/kde-settings/kde-profile/default/xdg/kdeglobals on Fedora:

```
[KDE Action Restrictions]
action/start_new_session=false
action/switch_user=false
```

M  +1    -1    src/ktimetrackerui.rc
M  +2    -2    src/timetrackerwidget.cpp

https://invent.kde.org/pim/ktimetracker/commit/f8ed5ac856934ef8008680bdf97bfa0e6d316cfc