1

As per the subject, the symlink pointing to a bash script is not executed when starting Kubuntu 22.10.

If I click on the symlink from Dolphin everything works, the original script is executed.

andrea@Tehesyan:/etc/profile.d$ ls -l
totale 52
...
lrwxrwxrwx 1 root   root     71 giu 13 19:14 script-remapping-mouse-keys.sh -> /home/andrea/programmazione/bash-scripts/script-remapping-mouse-keys.sh
-rwxrwxr-x 1 andrea andrea  176 mag 19 11:24 script-resetta-wifi-al-login.sh
-rwxr-xr-x 1 root   root    269 mag 16 11:25 script-start-pulseaudio.sh

The symlink is script-remapping-mouse-keys.sh, the other bash scripts run, but they are not symlinks!

Below is the original bash script, which still runs if I start the symlink from Dolphin.

#!/bin/bash
remote_id=18
mkdir -p /tmp/xkb/symbols
cat >/tmp/xkb/symbols/custom <<\EOF

xkb_symbols "remote" { key <AE04> { [ Home ] }; key <AE07> { [ End ] }; key <AE05> { [ Prior ] }; key <AE08> { [ Next ] }; }; EOF

setxkbmap -device $remote_id -print
| sed 's/(xkb_symbols.*)"/\1+custom(remote)"/'
| xkbcomp -I/tmp/xkb -i $remote_id -synch - $DISPLAY 2>/dev/null

Where could be the problem? Thanks

  • 1
    Being a symlink is not an issue ... Symlinks to executable scripts are treated equal to the target script file i.e. if the target file executes directly then, symlinks to it will execute equally ... But, the issue might be this: https://askubuntu.com/a/1450655 – Raffa Jun 14 '23 at 10:32
  • this seems right, but sadly KDE has problems launching scripts, sometimes it does and sometimes it doesn't, it's not reliable. I could however pause at the beginning of the original script to wait for the session to load. Thank you – CaneRandagio Jun 14 '23 at 13:45
  • 1
    Using sleep didn't work, I fixed it by creating a .desktop file in ~/.config/autostart/ – CaneRandagio Jun 14 '23 at 19:52

0 Answers0