Announcement

Collapse
No announcement yet.

weird scripting bug/crash with xsel?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    weird scripting bug/crash with xsel?

    I make this script with appropriate execution permission:

    Code:
    #!/bin/bash
    rm /tmp/got_here /tmp/xsel.txt > /dev/null 2>&1
    xsel -b > /tmp/xsel.txt
    touch /tmp/got_here
    If I run it from a terminal, it works as expected: /tmp/xsel.txt has the clipboard contents and /tmp/got_here appears.

    If I associate it with a keyboard shortcut via Settings -> Shortcuts -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Command/URL, something odd happens. It seems to "crash" or otherwise die after xsel is run. The result is that xsel.txt appears with the contents of the clipboard, but got_here does not appear. (This is a stripped-down version of a script I'm working just to demo the issue.)

    Any ideas?

    Thanks!

    edit: update -- my script seems to work if I use xclip instead of xsel... which is great and all but if this is a kubuntu bug I'd like to file it...
    Last edited by chconnor; May 03, 2021, 06:11 PM.

    #2
    Bug filed: https://bugs.kde.org/show_bug.cgi?id=437003

    Comment

    Working...
    X