Then did the following. The only difference from the tutorial is the name of the core file, to which I didn’t add any template placeholders. Let me know if you see something odd :-
root@colibri-imx8x-06858934:~# hello
Hello world
root@colibri-imx8x-06858934:~# systemctl status wayland-app-launch
● wayland-app-launch.service - Start a wayland application
Loaded: loaded (/lib/systemd/system/wayland-app-launch.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-11-16 14:14:11 UTC; 2min 14s ago
Process: 728 ExecStart=/usr/bin/wayland-app-launch.sh (code=exited, status=0/SUCCESS)
Main PID: 772 (Qt5_CinematicEx)
Tasks: 5 (limit: 1550)
Memory: 83.3M
CGroup: /system.slice/wayland-app-launch.service
└─772 /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience --fullscreen
Nov 16 14:14:08 colibri-imx8x-06858934 systemd[1]: Starting Start a wayland application...
Nov 16 14:14:11 colibri-imx8x-06858934 wayland-app-launch.sh[728]: /usr/bin/wayland-app-launch.sh: line 14: cd: HOME not set
Nov 16 14:14:11 colibri-imx8x-06858934 systemd[1]: Started Start a wayland application.
Nov 16 14:14:12 colibri-imx8x-06858934 wayland-app-launch.sh[772]: libpng warning: iCCP: known incorrect sRGB profile
Nov 16 14:14:12 colibri-imx8x-06858934 wayland-app-launch.sh[772]: libpng warning: iCCP: known incorrect sRGB profile
Nov 16 14:14:12 colibri-imx8x-06858934 wayland-app-launch.sh[772]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
root@colibri-imx8x-06858934:~# ps aux | grep Qt
root 772 60.4 4.6 707528 84984 ? Rl 14:14 1:57 /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience --fullscreen
root 796 0.0 0.0 2748 644 pts/0 S+ 14:17 0:00 grep Qt
root@colibri-imx8x-06858934:~# ulimit -c unlimited
root@colibri-imx8x-06858934:~# cat /proc/sys/kernel/core_uses_pid
1
root@colibri-imx8x-06858934:~# cat /proc/sys/kernel/core_pattern
core
root@colibri-imx8x-06858934:~# echo "/tmp/core" > /proc/sys/kernel/core_pattern
root@colibri-imx8x-06858934:~# cat /proc/sys/kernel/core_pattern
/tmp/core
root@colibri-imx8x-06858934:~# synch
-sh: synch: command not found
root@colibri-imx8x-06858934:~# sync
root@colibri-imx8x-06858934:~# ls -l /tmp/
total 560
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-bluealsa.service-kH6nIf
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-logind.service-7HKxAg
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-timesyncd.service-eR2aUg
-rw-r--r-- 1 root root 570877 Nov 16 14:14 viv_gc_img_builtin.lib
root@colibri-imx8x-06858934:~# cat /proc/sys/fs/suid_dumpable
0
root@colibri-imx8x-06858934:~# echo 2 /proc/sys/fs/suid_dumpable
2 /proc/sys/fs/suid_dumpable
root@colibri-imx8x-06858934:~# kill 772
root@colibri-imx8x-06858934:~# ls -l /tmp/
total 560
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-bluealsa.service-kH6nIf
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-logind.service-7HKxAg
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-timesyncd.service-eR2aUg
-rw-r--r-- 1 root root 570877 Nov 16 14:14 viv_gc_img_builtin.lib
root@colibri-imx8x-06858934:~# systemctl start wayland-app-launch
root@colibri-imx8x-06858934:~# ps aux | grep Qt
root 813 68.5 3.8 707532 70324 ? Sl 14:23 0:08 /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience --fullscreen
root 819 0.0 0.0 2748 620 pts/0 S+ 14:23 0:00 grep Qt
root@colibri-imx8x-06858934:~# kill -813 [PID]
-sh: kill: 813: invalid signal specification
root@colibri-imx8x-06858934:~# kill -11 813
root@colibri-imx8x-06858934:~# ls -l /tmp/
total 560
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-bluealsa.service-kH6nIf
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-logind.service-7HKxAg
drwx------ 3 root root 60 Nov 16 14:14 systemd-private-9960267ee2794b999a187fdacd62b56f-systemd-timesyncd.service-eR2aUg
-rw-r--r-- 1 root root 570877 Nov 16 14:14 viv_gc_img_builtin.lib
root@colibri-imx8x-06858934:~#
¡Ugh! No - sorry - I have been distracted by other important things. The core dump is just in case - naturally it is impossible that my software crashes
Let’s close the issue - I must have done something dumb - it’s unbeleivable that it should not work…
Just to confirm - it is working. Just a question of getting all your ducks in a line…
In my test above for example, I notice now, I made a typo :-
echo 2 /proc/sys/fs/suid_dumpable
( I missed the > !)
Other things to bear in mind are that these settings do not persist, and that the directory for the core must exist (thus simply “core” will do nothing).