title: Clear Clipboard on KDE
body: <p>I am using gtk to clear the clipboard on Linux platforms with X11, and I was hoping that it would work across all Linux platforms. However, my gtk code does not work for Fedora KDE and some distributions of Fedora. When <code>clipboard_clear</code> function is called, the clipboard does not get cleared.</p>
  
  <pre><code>void clipboard_clear() {
    gtk_init(&amp;args,NULL);
    GtkClipboard* cb = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
    gtk_clipboard_clear(cb);
    gtk_clipboard_set_text(cb, "", 0);
  
    cb = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
    gtk_clipboard_clear(cb);
    gtk_clipboard_set_text(cb, "", 0);
  }
  </code></pre>
  
  <p>Is there anything that I can do to make this gtk implementation work as it suppose to on a Fedora KDE? If not, are there any libraries that can clear the clipboard on KDE and be statically linked? (Qt is not one among them because of licensing restrictions.)</p>