https://bugs.kde.org/show_bug.cgi?id=437883

            Bug ID: 437883
           Summary: the Terminal options for adding a startup application
                    have no effect
           Product: systemsettings
           Version: 5.21.5
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_autostart
          Assignee: nicolas.fe...@gmx.de
          Reporter: skierp...@gmail.com
                CC: plasma-b...@kde.org
  Target Milestone: ---

SUMMARY
I created a script to run some programs at startup. When I used kcm_autostart's
+ Add Application... dialog I checked the Terminal options "Run in terminal"
and "Do not close when command exits" to help me debug it. But these have no
effect in Fedora 34.

STEPS TO REPRODUCE
1. Run System Settings > Startup and Shutdown > Autostart
2. Choose + Add... > + Add Application and select the program Utilities >
KWrite
3. Expand Terminal options and check  "Run in terminal" and "Do not close when
command exits"
4. Click [OK]
5. Restart KDE
6. Look in journalctl output

OBSERVED RESULT
KWrite will start up. But it doesn't seem to start from a terminal, and the
terminal doesn't remain around.
If you run `journalctl -r` you'll see something like
   ... systemd-xdg-autostart-generator[4999]:
/home/USER/.config/autostart/KWrite.desktop:
14: Unknown key name 'TerminalOptions' in section 'Desktop Entry', ignoring.

EXPECTED RESULT
The Terminal options should have some effect, or they should be removed from
the Choose Application dialog in Autostart.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2 64-bit, Wayland

ADDITIONAL INFORMATION

Adding a startup application creates a .desktop file in $HOME/.config/autostart
e.g. KWrite.desktop, and these two options add the following lines to it:
    Terminal=true
    TerminalOptions=\s--noclose
Bug 433304 reports that TerminalOptions is deprecated. But Terminal=true
doesn't generate warnings yet doesn't seem to have an effect.

The actual startup of the application on Fedora 34 seems driven by systemd,
which at startup runs
/usr/lib/systemd/user-generators/systemd-xdg-autostart-generator to create
service files in /run/user/1000/systemd/generator.late/ . So maybe systemd
doesn't recognize these terminal options in a desktop file. Whereas user-facing
launchers like the `gtk-launch` command-line program and the KDE "Start menu"
Application Launcher do pay attention to these terminal options

The component that displays the Choose Application dialog and its "Terminal
options" is
https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kopenwithdialog.cpp#L750

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to