Closed george-viaud closed 7 years ago
Can you go in the About dialog and copy here the "Revision" code? On my Ubuntu this works fine.
@droidmonkey Should be good add a check in DatabaseWidget.cpp
line 492
QDesktopServices::openUrl(url);
because return false on failure https://doc.qt.io/qt-4.8/qdesktopservices.html#openUrl
Revision: 354290a65f245bfea7afdad7da5d765a04ba1134
I will do a pull from this repo and build from source, will report back here (should have done that before opening the issue, sorry)
Update: I've now compiled from source and still have the same experience
Currently at Revision: 3f80134f07660c656e6f250f3921ccfebef5f335
v2.0.3
( CTRL-U still does not work unfortunately )
The menu item does still work (I can open url manually by right-clicking and selecting from the menu to open the URL)
thoughts and suggestions appreciated greatly - thank you for your time.
I just built and ran keepassx from the develop branch and the CTRL+U shortcut works perfectly on Ubuntu 16.04 pristine (running in a virtual machine).
@george-viaud can you please provide the URL you are trying to Open?
Also try to execute xdg-open <url>
in your terminal
Indeed - any URL, for example I made an entry for https://www.google.com which does not open with CTRL-U but does open when I use the pulldown menu.
xdg-open https://www.google.com
does open the target in Firefox as expected.
I suspect the key is not being bound correctly - how does keepassx monitor keystrokes system wide?
I'll add (which may be helpful) that the keys I have bound to auto-type do in fact work (CTRL-ALT-SHIFT-V)
@droidmonkey Thank you for testing in this fashion. I will try to spin up a virtual box w/ the same and perform the same test. I do not know what this will test other than my understanding on how/when to use the feature but it may be worthwhile as I recall having this exact same bug on 14.04 on my previous desktop. The current issue is on a brand new Dell developer edition laptop w/ a fairly fresh install of 16.04, so my thought was that this is a carry over of some sort. It may be something common to both installs however, but the only way I'll be able to find out is tracking back through how keepassx is binding keys and seeing where things go wrong.
Thank you all for your attention to this apparently unique problem - I do also appreciate your continued assistance if you should choose to lend it.
Some interesting events, mostly due to my rushing and missing things:
Although as you'll see the effect for me with regards to this issue is the same, I'm accidentally not actually running the current build after all. After I did a pull from the reboot repo I failed to realize it lives in a newly named directory. When I did my build I was actually building against the original repo's source - I've since corrected this and rebuilt, now running the current master branch of keepassxc (doh)
So, current rev running on both fresh VirtualBox and my local 16.04 instance is:
KeepassXC 2.1.0
Revision: 682eac3dbc9ea3247bf6d648ae634cdb22d3eb34
With that, the issue remains: CTRL-U does not open the link in either instance (laptop or vb).
For full clarity, here are the steps I used to build Keepassx on a fresh VirtualBox install of Ubuntu 16.04:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
sudo apt-get install build-essential cmake
sudo apt-get install libmicrohttpd-dev libxi-dev libxtst-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev
cd ~/
cd ~/Documents
mkdir sourcecode
cd sourcecode
git clone https://github.com/keepassxreboot/keepassxc.git
cd keepassxc
mkdir build
cd build
cmake ../.
sudo make -j 8 install
then executed w/ keepassxc
created new database created test entry in database w/ URL of https://www.google.com saved DB. highlighted entry in KeePassXC window and pressed CTRL-U on keyboard with no effect. right-clicked on same entry, clicked option for Open URL and this again worked.
This is the same behaviour I experienced on both machines, which makes me thing I'm either doing something wrong physically (i.e. problem between keyboard and chair) or perhaps something hardware specific which boggles me... especially since it's a VM in one case?
Thoughts greatly appreciated - I will happily try whatever sensible suggestions are presented. I'm also curious if anyone else has experienced this issue and hasn't said anything? (If you're lurking and have this issue, please let me know - I hate being an n
of 1)
@george-viaud Can you make this test: Edit this file /src/gui/MainWindow.cpp#L143 at line 143 and change the shortcut to something like CTRL + K and then build/compile KeePassXC and report the results
And a question. What Desktop Environment are you using? It's the same on all machine?
Stock Ubuntu DE, Unity I believe - will make that change now and report back after build completes.
Code updated and rebuilt. Menu now shows "Ctrl + K" but issue remains (Ctrl-K does not produce the desired effect either).
Side note: Ctrl + Alt + U also does not work for copying the URL (I hadn't known this was a feature until I saw the source at 144)
It appears whatever the issue is for Ctrl-U also effects Ctrl-Alt-U
I was thinking that maybe the DE (or something) was already binding and listening to that shortcut so KeePassXC couldn't get it. Maybe trying with "CTRL+V" ?
Good theory but I do not think it is the issue:
$ gsettings list-recursively org.gnome.desktop.wm.keybindings | sort
Reports back:
org.gnome.desktop.wm.keybindings activate-window-menu ['<Alt>space']
org.gnome.desktop.wm.keybindings always-on-top @as []
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings close ['<Alt>F4']
org.gnome.desktop.wm.keybindings cycle-group ['<Alt>F6']
org.gnome.desktop.wm.keybindings cycle-group-backward ['<Shift><Alt>F6']
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows ['<Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-windows-backward ['<Shift><Alt>Escape']
org.gnome.desktop.wm.keybindings lower ['disabled']
org.gnome.desktop.wm.keybindings maximize ['<Control><Super>Up']
org.gnome.desktop.wm.keybindings maximize-horizontally ['disabled']
org.gnome.desktop.wm.keybindings maximize-vertically ['disabled']
org.gnome.desktop.wm.keybindings minimize ['<Control><Alt>KP_0']
org.gnome.desktop.wm.keybindings move-to-center @as []
org.gnome.desktop.wm.keybindings move-to-corner-ne ['<Control><Alt>KP_Prior']
org.gnome.desktop.wm.keybindings move-to-corner-nw ['<Control><Alt>KP_Home']
org.gnome.desktop.wm.keybindings move-to-corner-se ['<Control><Alt>KP_Next']
org.gnome.desktop.wm.keybindings move-to-corner-sw ['<Control><Alt>KP_End']
org.gnome.desktop.wm.keybindings move-to-monitor-down ['<Super><Shift>Down']
org.gnome.desktop.wm.keybindings move-to-monitor-left ['<Super><Shift>Left']
org.gnome.desktop.wm.keybindings move-to-monitor-right ['<Super><Shift>Right']
org.gnome.desktop.wm.keybindings move-to-monitor-up ['<Super><Shift>Up']
org.gnome.desktop.wm.keybindings move-to-side-e ['<Control><Alt>KP_Right']
org.gnome.desktop.wm.keybindings move-to-side-n ['<Control><Alt>KP_Up']
org.gnome.desktop.wm.keybindings move-to-side-s ['<Control><Alt>KP_Down']
org.gnome.desktop.wm.keybindings move-to-side-w ['<Control><Alt>KP_Left']
org.gnome.desktop.wm.keybindings move-to-workspace-10 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-11 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-12 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-1 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-2 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-3 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-4 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-5 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-6 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-7 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-8 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-9 ['disabled']
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Shift><Control><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-last ['<Super><Shift>End']
org.gnome.desktop.wm.keybindings move-to-workspace-left ['<Shift><Control><Alt>Left']
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Shift><Control><Alt>Right']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Shift><Control><Alt>Up']
org.gnome.desktop.wm.keybindings panel-main-menu ['<Super>s']
org.gnome.desktop.wm.keybindings panel-run-dialog ['<Alt>F2']
org.gnome.desktop.wm.keybindings raise ['disabled']
org.gnome.desktop.wm.keybindings raise-or-lower @as []
org.gnome.desktop.wm.keybindings set-spew-mark @as []
org.gnome.desktop.wm.keybindings show-desktop ['<Control><Super>d']
org.gnome.desktop.wm.keybindings switch-applications-backward ['<Shift><Super>Tab', '<Shift><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-applications ['<Super>Tab', '<Alt>Tab']
org.gnome.desktop.wm.keybindings switch-group-backward ['<Shift><Super>Above_Tab', '<Shift><Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-input-source-backward ['<Shift><Super>space']
org.gnome.desktop.wm.keybindings switch-input-source ['<Super>space']
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-10 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-11 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-12 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-1 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-2 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-3 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-4 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-5 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-6 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-7 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-8 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-9 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Control><Alt>Down']
org.gnome.desktop.wm.keybindings switch-to-workspace-last ['<Super>End']
org.gnome.desktop.wm.keybindings switch-to-workspace-left ['<Control><Alt>Left']
org.gnome.desktop.wm.keybindings switch-to-workspace-right ['<Control><Alt>Right']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Control><Alt>Up']
org.gnome.desktop.wm.keybindings switch-windows-backward ['disabled']
org.gnome.desktop.wm.keybindings switch-windows ['disabled']
org.gnome.desktop.wm.keybindings toggle-above @as []
org.gnome.desktop.wm.keybindings toggle-fullscreen ['disabled']
org.gnome.desktop.wm.keybindings toggle-maximized ['<Control><Alt>KP_5']
org.gnome.desktop.wm.keybindings toggle-on-all-workspaces ['disabled']
org.gnome.desktop.wm.keybindings toggle-shaded ['<Control><Alt>s']
org.gnome.desktop.wm.keybindings unmaximize ['<Control><Super>Down']
Seems that you are having a very strange problem with shortcut binding :disappointed:
Indeed! Even on VM which makes it even more odd.
I just tried binding to Qt::Key_Semicolon (without control) for giggles and ran into the same.
As a sanity check, is this the procedure to test this feature? :
1) Open KeePassXC 2) Unlock database 3) On the list of entries, single-click an entry that has a URL entry so it is highlighted 4) Depress CTRL-U (or, whatever key we've modified the source for) 5) Watch the window open up in your browser
@droidmonkey Was your VM of 16.04 on a 64bit or 32bit VM? Thanks
And thank you all for your continued help. I really love this app.
also, did you apt-get update
and apt-get upgrade
that VM?
ok... BIG update here...
I did some searching for similar problems regarding QT keybindings on 16.04 and ran into this: http://askubuntu.com/questions/786280/texmaker-shortcuts-not-working-on-ubuntu-16-04
One of the "solutions" here was to apt-get remove appmenu-qt5
This fixes the issue entirely.
With that said, it does beg the question: What does appmenu-qt5 do and why does it interfere with this process? Followed by, can it be worked-around with a code change?
If it can I'd be interested in implementing the change, just not sure what that change might be at this time.
Found this relevant issue: https://bugs.launchpad.net/ubuntu/+source/appmenu-qt5/+bug/1313248
And the parent issue: https://bugs.launchpad.net/ubuntu/+source/appmenu-qt5/+bug/1380702
This all reads like a QT-Specific issue. It also sounds like it's going away in 16.10+ since they're (apparently) abandoning appmenu-qt
With that said, 16.04 w/ qt5 will be around for a while =) I do hope they decide to fix QT.
Many thanks for all the fish :+1:
Good to know that now It works.
Note: Please next time edit your comment instead of sending many of them. You spammed my email :innocent: :joy:
Ah very sorry - quite inconsiderate of me really... My humble apologies and thanks for your time and efforts. I hope to contribute myself when time permits.
Best
George, can you get it back to the broken state and test the CTRL+F shortcut to focus on the new search box. I used a different technique to implement that shortcut that may overcome the appmenu fail.
@droidmonkey, Indeed - and CTRL-F does work! The method you used doesn't appear to be effected.
To replicate (or try to) simply re-install appmenu-qt5:
apt-get install appmenu-qt5
I'm curious if you're able to reproduce that way?
Also, would it be easy to re-factor the code to use this alternative mechanism?
Interesting, I installed appmenu-qt5 and I can still open websites with CTRL+U.
Perhaps it has something to do with more than just this package - perhaps it needs a catalyst so to speak... The thread in the QT project might lend more understanding if you care to dive in - in all honesty it's beyond my depths.
Like I said earlier though - your alternative mechanism implementing CTRL-F doesn't appear to be effected by the apparent bug. If it's not hackish / is acceptable as good coding practice, I'd think a re-factoring to the alternative method would be a plus, that is, assuming others are effected by this.
QT seems to get ugly in some areas and I seem to be a magnet for it - for example, I have lots of issues w/ QT and the system tray icon (another well documented bug which I've personally tried to code around on the previous project with little success thus far).
Thanks again for all of your attention and time - you are greatly appreciated.
Hmmmm reading the description of the bug reports does not bode well. Although there is a workaround mentioned to launch the application with an environment variable set.
Funny thing, when I was testing the snapcraft (#83) deployment method I noticed that it created an entry in /etc/profile.d/
in the snapcraft file that specifically exports the workaround for the appmenu-qt5 integration issue.
Searching in my VM, I had the SAME EXACT FILE in profile.d in the VM. I think this is why I did not experience the bug in my VM environment. I suspect that newer installs of appmenu-qt5 add this export as part of the package.
I don't want to dredge this up again but it is worth it to mention / add to the record that this same appmenu-qt5 issue is responsible for rendering the buttons in the taskbar icon unusable. No need to re-open (please feel free to close) - just trying to improve searchability for related symptom.
So this is related to https://github.com/keepassxreboot/keepassxc/issues/102 ??
Stock Ubuntu 16.04.1 and I can confirm no in-app shortcuts work (i.e. auto-type from the main window with Ctrl+V, Open URL (Ctrl+U), etc.), except Ctrl+F.
Tried the radical work-around of uninstalling appmenu-qt5 (the interface changed a bit), both the in-app shortcuts as well as menu (#102) work now. Reinstalled it and the issues are back again.
Update
When launching this way: env UBUNTU_MENUPROXY='' keepassxc
, the shortcuts work, but the menu doesn't. The UI does NOT change.
This way: env QT_QPA_PLATFORMTHEME='' keepassxc
, everything works, but the UI DOES change (i.e. it looses Unity look&feel).
Just to let everybody know, the underlying issue with qt5 was recently fixed, the fix is in xenial-proposed now, should be in the main repo in a week or two. With this fix the shortcuts like Ctrl+U, Ctrl+B, etc. are working fine on Ubuntu 16.04 & 16.10 (should work on 17.04 too).
At first thanks for the keepass reboot! The given workaround env QT_QPA_PLATFORMTHEME='' keepassxc
does not work on Gnome Ubuntu 16.04 with zsh or bash.
Because the URL are not escaped correct - xdg-open fails.
Steps to reproduce:
env QT_QPA_PLATFORMTHEME='' keepassxc
Error Message:
Launch failed (/usr/bin/xdg-open https://trac.torproject.org)
Not working (on zsh):
/usr/bin/xdg-open https://trac.torproject.org
Working (on zsh):
/usr/bin/xdg-open "https://trac.torproject.org"
Would you be so kind to open a separate issue? Thanks a lot!
Sure thing
Expected Behavior
Pressing CTRL-U should open a browser window with the currently highlighted entries URL
Current Behavior
Pressing CTRL-U has no visible effect / does not hing. However, right clicking and using the drop-down menu option "Open URL" does work.
Your Environment
KeePassX 2.0.2 Ubuntu 16.04 LTS, w/ current updates QT 5.5.1 libcrypt 1.6.5
Thanks!