Open tuxedotje opened 5 years ago
What do you mean by "See nothing in copyq"? Can you be more specific?
Today copyq will not start, I would like to use it.
I remove copyq from PC (Fedora 31 beta)
and install new.
try to open copyq. Click on icon and nothing happens.
type copyq in terminal message: Warning: CopyQ server is already running.
GUI of copyq opens when I type
If CopyQ is running, you can run copyq show
to show the main window.
Run copyq logs|tail -50
to list recent logs. There might be some warnings or errors.
copyq logs|tail -50
CopyQ Warning [2019-10-28 06:44:45.887]
Looks like CopyQ cannot access clipboard for some reason -- or more specifically mouse selection. It seems you are running Wayland (as opposed to X11) and I thought it doesn't support selection.
You can try disabling all options under "Clipboard Manipulation" except "Store Clipboard" in CopyQ configuration:
That is unfortunately not working neither.
CopyQ Warning [2019-10-31 16:13:56.013] <Server-1796987>: Failed to set global shortcut "Ctrl+Shift+G" for command "Google".
CopyQ ERROR [2019-10-31 16:13:56.085] <monitorClipboard-1796997>: Null data in selection.
CopyQ Warning [2019-10-31 16:13:56.085] <monitorClipboard-1796997>: Failed to retrieve selection data (try 1/3)
CopyQ ERROR [2019-10-31 16:13:56.085] <monitorClipboard-1796997>: Null data in selection.
CopyQ Warning [2019-10-31 16:13:56.086] <monitorClipboard-1796997>: Failed to retrieve selection data (try 2/3)
CopyQ ERROR [2019-10-31 16:13:57.114] <monitorClipboard-1796997>: Null data in selection.
CopyQ Warning [2019-10-31 16:13:57.115] <monitorClipboard-1796997>: Failed to retrieve selection data (try 3/3)
CopyQ ERROR [2019-10-31 16:13:58.615] <monitorClipboard-1796997>: Null data in selection.
CopyQ Warning [2019-10-31 16:13:58.615] <monitorClipboard-1796997>: Failed to retrieve selection data (try 3/3)
CopyQ Warning [2019-10-31 16:14:44.884] <Server-1798041>: CopyQ server is already running.
CopyQ Warning [2019-10-31 16:15:22.008] <Server-1796987>: Failed to set global shortcut "Ctrl+Shift+G" for command "Google".
CopyQ ERROR [2019-10-31 16:15:22.069] <monitorClipboard-1798772>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:22.069] <monitorClipboard-1798772>: Failed to retrieve selection data (try 1/3)
CopyQ ERROR [2019-10-31 16:15:22.070] <monitorClipboard-1798772>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:22.070] <monitorClipboard-1798772>: Failed to retrieve selection data (try 2/3)
CopyQ ERROR [2019-10-31 16:15:23.122] <monitorClipboard-1798772>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:23.122] <monitorClipboard-1798772>: Failed to retrieve selection data (try 3/3)
CopyQ Warning [2019-10-31 16:15:23.673] <Server-1796987>: Failed to set global shortcut "Ctrl+Shift+G" for command "Google".
CopyQ ERROR [2019-10-31 16:15:23.790] <monitorClipboard-1798834>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:23.790] <monitorClipboard-1798834>: Failed to retrieve selection data (try 1/3)
CopyQ ERROR [2019-10-31 16:15:23.790] <monitorClipboard-1798834>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:23.790] <monitorClipboard-1798834>: Failed to retrieve selection data (try 2/3)
CopyQ ERROR [2019-10-31 16:15:24.742] <monitorClipboard-1798834>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:24.743] <monitorClipboard-1798834>: Failed to retrieve selection data (try 3/3)
CopyQ ERROR [2019-10-31 16:15:26.168] <monitorClipboard-1798834>: Null data in selection.
CopyQ Warning [2019-10-31 16:15:26.169] <monitorClipboard-1798834>: Failed to retrieve selection data (try 3/3)
Oh, sorry, I pasted wrong screenshot. The configuration to avoid checking mouse selection should be like this:
@rgarcia89 Can you please check again?
Doesn't work neither. It is also not able to set the shortcuts like you can see here
Failed to set global shortcut "Ctrl+Shift+G" for command "Google".
It is also not able to set the shortcuts like you can see here
Setting global shortcuts in Wayland is not supported (not sure if they already have a generic API for it).
So this means that nothing of copyq is currently usable under fedora 31 and wayland... Thats really bad 🙈
So this means that nothing of copyq is currently usable under fedora 31 and wayland... Thats really bad see_no_evil
I'm going to update to F31 soon and see if Wayland is finally usable for me. I'll try to fix these issues while I'm at it. :)
OK, I've upgraded to F31.
Looks like it's not possible to access clipboard with Qt unless the window requesting the access is focused.
This is also somewhat related: Custom notifications (a "tooltip" window) gets focused when they pop up and it doesn't seem to be possible to show them without focus (I messed around with window attributes). Couple of other Qt applications are broken because they use some special window behaviors (e.g. smplayer
cannot embed video player window, konsole
doesn't show menus).
It could be a bug in Gnome.
Below is short snippet to test the clipboard access (uses PyQt5). If you click "Update" button it gets formats currently in clipboard. Clicking "Get" gets the selected format. You can select the format in combo box, but opening the combo list somehow breaks clipboard access so Get and Update buttons no longer work unless the window is deactivated and activated again.
#!/usr/bin/env python3
import sys
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
def update_format_list(combo):
combo.clear()
data = app.clipboard().mimeData()
for mime in data.formats():
combo.addItem(mime)
def get_format(combo, label):
mime = combo.currentText()
data = app.clipboard().mimeData().data(mime)
if mime.startswith('image'):
image = QtGui.QImage.fromData(data)
pixmap = QtGui.QPixmap.fromImage(image)
label.setPixmap(pixmap)
else:
text = data.data().decode()
label.setText(text)
combo = QtWidgets.QComboBox()
update_format_list(combo)
label = QtWidgets.QLabel()
label.setAlignment(QtCore.Qt.AlignCenter)
get_button = QtWidgets.QPushButton('&Get')
get_button.clicked.connect(lambda: get_format(combo, label))
update_button = QtWidgets.QPushButton('&Update')
update_button.clicked.connect(lambda: update_format_list(combo))
hlayout = QtWidgets.QHBoxLayout()
hlayout.addWidget(combo, stretch=1)
hlayout.addWidget(get_button)
hlayout.addWidget(update_button)
vlayout = QtWidgets.QVBoxLayout()
vlayout.addLayout(hlayout)
vlayout.addWidget(label)
window = QtWidgets.QWidget()
window.setLayout(vlayout)
window.show()
app.exec_()
Workaround is to set QT_QPA_PLATFORM
environment variable and use Xwayland (xorg-x11-server-Xwayland
fedora package) to handle X11 apps.
E.g. launch CopyQ with:
env QT_QPA_PLATFORM=xcb copyq
If CopyQ autostarts, you can change Exec=...
line in ~/.config/autostart/copyq.desktop
:
Exec=env QT_QPA_PLATFORM=xcb copyq
@hluk this way copied text is stored in copyq. The only thing not working right now is storing text selected by the mouse. Thanks figuring out that workaround
The only thing not working right now is storing text selected by the mouse.
@rgarcia89 Mouse selections should work only from other X11 apps. AFAIK, Wayland doesn't support them.
See also: https://wiki.gnome.org/Initiatives/Wayland/PrimarySelection
I use Arch Linux with Sway. After the last update all the above described behavior happens here too now.
if I launch in this way works:
E.g. launch CopyQ with:
env QT_QPA_PLATFORM=xcb copyq
if I add in desktop file doesn't works
Exec=env QT_QPA_PLATFORM=xcb copyq
fedora 33 any clue?
Regards.,
For Fedora (32 and 33), there is development package with much better Wayland support.
You can install the package using:
sudo dnf install 'dnf-command(copr)'
sudo dnf copr enable lholecek/copyq
sudo dnf install copyq
For Archlinux, the copyq-git
package in the AUR works as expected.
assuming you installed to defrault system path
Exec=/usr/bin/env -S "QT_QPA_PLATFORM=xcb /usr/bin/copyq"
for different path
Exec=/usr/bin/env -S "QT_QPA_PLATFORM=xcb <your installed path>/bin/copyq"
It still happens with me in Fedora 38 with Gnome 44.2 Wayland session
$ -> copyq
Warning: [default] QtWarning: QSocketNotifier: Can only be used with threads started with QThread
Warning: [qt.qpa.qgnomeplatform.theme] QtWarning: The desktop style for QtQuick Controls 2 applications is not available on the system (qqc2-desktop-style). The application may look broken.
Warning: [default] QtWarning: Activating Wayland clipboard took 5000 ms
ERROR: [default] QtCritical: Failed to activate Wayland clipboard
Warning: Failed to set global shortcut "Ctrl+Alt+V" for command "Show main window under mouse cursor".
$ -> sudo dnf info copyq
Last metadata expiration check: 0:25:46 ago on Sunday 18 June 2023 08:56:15 AM.
Installed Packages
Name : copyq
Version : 7.0.0
Release : 1.fc38
Architecture : x86_64
Size : 9.0 M
Source : copyq-7.0.0-1.fc38.src.rpm
Repository : @System
From repo : updates
Summary : Advanced clipboard manager
URL : https://github.com/hluk/CopyQ
License : GPL-3.0-or-later
Description : CopyQ is advanced clipboard manager with searchable and editable history with
: support for image formats, command line control and more.
Same here, found out it happens to the Flatpak version (7.0.0) I installed. Just nothing showing up in the clipboard when you try to copy things, nothing gets added.
flatpak run com.github.hluk.copyq
Warning: [default] QtWarning: QSocketNotifier: Can only be used with threads started with QThread
Warning: [default] QtWarning: Activating Wayland clipboard took 5000 ms
ERROR: [default] QtCritical: Failed to activate Wayland clipboard
Warning: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
Installing an older copyq with apt on Ubuntu 22.04 made it work though.
I believe that the normal clipboard access does not work in Gnome Wayland session. It would need to be implemented somehow using Gnome Shell extensions.
You can verify if the clipboard access works with wl-paste
CLI (on Fedora 38 it is part of wl-clipboard
package).
Same here, found out it happens to the Flatpak version (7.0.0) I installed.
If you have this problem only with Flatpak version, it is possible that some arguments/permissions are missing in the specification:
I could not reproduce the problem, but I've only tested it in Sway.
I am also experiencing the same problem after installing from apt
on Ubuntu 23.04:
CopyQ Warning [2023-08-22 13:41:54.682] <Server-9243>: [default] QtWarning: Activating Wayland clipboard took 5000 ms
CopyQ ERROR [2023-08-22 13:41:54.692] <Server-9243>: [default] QtCritical: Failed to activate Wayland clipboard
CopyQ Warning [2023-08-22 13:41:54.881] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
CopyQ Warning [2023-08-22 13:41:59.920] <monitorClipboard-9268>: [default] QtWarning: Activating Wayland clipboard took 5000 ms
CopyQ ERROR [2023-08-22 13:41:59.925] <monitorClipboard-9268>: [default] QtCritical: Failed to activate Wayland clipboard
CopyQ Warning [2023-08-22 13:45:08.616] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
CopyQ Warning [2023-08-22 13:45:26.711] <monitorClipboard-9381>: [default] QtWarning: Activating Wayland clipboard took 5000 ms
CopyQ ERROR [2023-08-22 13:45:26.719] <monitorClipboard-9381>: [default] QtCritical: Failed to activate Wayland clipboard
CopyQ Warning [2023-08-22 13:45:29.941] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
CopyQ Warning [2023-08-22 13:45:29.945] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
I am also experiencing the same problem after installing from
apt
on Ubuntu 23.04:CopyQ Warning [2023-08-22 13:41:54.682] <Server-9243>: [default] QtWarning: Activating Wayland clipboard took 5000 ms CopyQ ERROR [2023-08-22 13:41:54.692] <Server-9243>: [default] QtCritical: Failed to activate Wayland clipboard CopyQ Warning [2023-08-22 13:41:54.881] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate() CopyQ Warning [2023-08-22 13:41:59.920] <monitorClipboard-9268>: [default] QtWarning: Activating Wayland clipboard took 5000 ms CopyQ ERROR [2023-08-22 13:41:59.925] <monitorClipboard-9268>: [default] QtCritical: Failed to activate Wayland clipboard CopyQ Warning [2023-08-22 13:45:08.616] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate() CopyQ Warning [2023-08-22 13:45:26.711] <monitorClipboard-9381>: [default] QtWarning: Activating Wayland clipboard took 5000 ms CopyQ ERROR [2023-08-22 13:45:26.719] <monitorClipboard-9381>: [default] QtCritical: Failed to activate Wayland clipboard CopyQ Warning [2023-08-22 13:45:29.941] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate() CopyQ Warning [2023-08-22 13:45:29.945] <Server-9243>: [qt.qpa.wayland] QtWarning: Wayland does not support QWindow::requestActivate()
Me too, I'm having the same problem, the solution would be to switch to X11 instead of Wayland, but I don' t know if that can affect any other functionality in my pc
Same for me. I guess it must be a mere configuration issue, otherwise I couldn't understand how this issue is still unsolved after almost 5 years, as it prevents the software from achieving its sole purpose on modern linux distributions. In the search of other tools I found others having the same issue e.g. here (in German) with the final verdict "Failed; on to the next tool."
I guess it must be a mere configuration issue, otherwise I couldn't understand how this issue is still unsolved after almost 5 years, as it prevents the software from achieving its sole purpose on modern linux distributions.
CopyQ supports clipboard management in Wayland via some standard protocol, but (as mentioned before) Gnome Wayland session allows clipboard managers to be implemented only as Gnome Shell Extensions. From a security perspective, it makes sense ...although any other app that has focus can access the clipboard.
I believe, the workaround is to start CopyQ under XWayland with the following command (if it is supported in your Gnome installation):
env QT_QPA_PLATFORM=xcb copyq
Note: I still use Sway (or KDE occasionally) without any issue, so I don't have a reason to investigate further and fix this myself currently.
Fedora 40 still have issue
I do try this on Ubuntu 24.04.1 but when I change some setting in app itself, it overwrites my changes...
Workaround is to set
QT_QPA_PLATFORM
environment variable and use Xwayland (xorg-x11-server-Xwayland
fedora package) to handle X11 apps.E.g. launch CopyQ with:
env QT_QPA_PLATFORM=xcb copyq
If CopyQ autostarts, you can change
Exec=...
line in~/.config/autostart/copyq.desktop
:Exec=env QT_QPA_PLATFORM=xcb copyq
biep@Puk:~$ copyq
Warning: [default] QtWarning: QSocketNotifier: Can only be used with threads started with QThread
Warning: [default] QtWarning: Activating Wayland clipboard took 5000 ms
ERROR: [default] QtCritical: Failed to activate Wayland clipboard
Warning: [default] QtWarning: This plugin does not support setting window opacity
But strangely enough, it fails the other way around too: I have a well-filled history, but choosing an item won't copy it to my active window.
For whoever is having this issue from the future here's what I found:
cause of issue: copyq is having a problem with the wayland
window manager which is shown in copyq's logs when opening copyq select this tab (Help>Show Log)
the issue & the detailed solution mentioned in here
x11
window manager instead of wayland
to achieve this use this commandExec=env QT_QPA_PLATFORM=xcb copyq
before you launch it you may want to kill the previous process first using this command pkill copyq
keep in mind that launching copyq using the command above only works for the current instance so to have it always get launched using x11
you want to type the command above in the .desktop
file for the app. Its name can be something like this com.github.hluk.copyq.desktop
or this copyq.desktop
The desktop file can be found in a directory depending on how you installed it
/var/lib/snapd/desktop/applications/
if you installed it using snap package manager~/.local/share/applications/
/usr/share/applications/<name_of_copyq_desktop_file>
requires admin permissionchange the default execution command Exec= copyq --start-server show
by including the command above
Exec=env QT_QPA_PLATFORM=xcb copyq --start-server show
[Autostart]
if you want to add the app to the autostart list you can copy the desktop file above to the autostart directory
example:
cp /usr/share/applications/<name_of_copyq_desktop_file> ~/.config/autostart/
To verify that the solution worked:
Describe the bug A clear and concise description of what the bug is. copy some text from different sources, try to read the content of clipboard in CopyQ, nothing. To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen. content from clipboard in copyq Screenshots If applicable, add screenshots to help explain your problem. CopyQ Clipboard Manager v3.9.2 Version, OS and Environment Fedora 31 beta
Additional context Add any other context about the problem here. on trying to start copyq in terminal " Warning: CopyQ server is already running."