Code Monkey home page Code Monkey logo

Comments (17)

mkropat avatar mkropat commented on July 30, 2024

Sure, I don't think that would be too difficult. I can probably get it done sometime in the next week or so.

I'm thinking that the WM_NAME match should be in conjunction with the normal PID or WM_NAME match. By that I mean if you run jumpapp -t "(snapshotname) [Running]" virtualbox, Jumpapp will find all windows that would normally match "virtualbox" (by either PID or WM_CLASS) AND of only those windows match any that have a WM_NAME containing "(snapshotname) [Running]" virtualbox". Any thoughts about that?

from jumpapp.

klayman avatar klayman commented on July 30, 2024

I think there is no -t option? If you meant jumpapp -i "(snapshotname) [Running]" virtualbox, then this command is just launching new instance of virtualbox.

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Sorry for the confusion, I was writing about how it should work, not how it works now. I'm proposing that I add a new -t option that matches on WM_NAME.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Got it ) Somehow I thought that -i option is exactly to match by WM_NAME.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Just as a follow-up: a workaround with just cycling through all windows with the "virtualbox" string in their command-name or WM_CLASS would be fine for me. The problem is - I can't switch with jumpapp virtualbox to any window except for the main (VM manager) window.

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Oh, I see. You're having trouble jumping to the guest window at all.

From your description of the WM_CLASS names, it sounds like everything should work fine on your computer. When I try it on my computer with VirtualBox, I have no problem cycling through all the guest VM windows.

To start, can you paste the output of wmctrl -lpx when you have multiple VirtualBox windows open?

For reference, here's what my output looks like:

$ wmctrl -lpx
0x02000008  0 6844   gnome-terminal.Gnome-terminal  rainer mlk@rainer:~
0x01a000ac -1 6686   desktop_window.Nemo   rainer Desktop
0x02a0008a  0 17872  Navigator.Firefox     rainer Switching to VirtualBox window · Issue #7 · mkropat/jumpapp - Mozilla Firefox
0x02e00003  0 18775  Qt-subapplication.VirtualBox  rainer Oracle VM VirtualBox Manager
0x03200002  0 19816  Qt-subapplication.VirtualBox  rainer aquilla [Running] - Oracle VM VirtualBox

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Sure. The two lines corresponding to VirtualBox are very similar to your output:

0x04000003  0 11140  Qt-subapplication.VirtualBox  dell.local Oracle VM VirtualBox Manager
0x04400053  0 11186  Qt-subapplication.VirtualBox  dell.local windows (elog) [Running] - Oracle VM VirtualBox

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Sorry for dropping the ball on this issue. I recently pushed an update to jumpapp that includes a new -L option that lists matching windows. I added it in order to troubleshoot issues like this.

If you're still having the issue, would you mind running jumpapp -L virtualbox for me?

For example, this is what the output looks like on my computer:

$ jumpapp -L virtualbox
Matched Windows [2]
0x02e00003 rainer 14828 0 VirtualBox: Oracle VM VirtualBox Manager
0x03200002 rainer 15808 0 VirtualBox: aquilla [Running] - Oracle VM VirtualBox

If the window you want isn't showing up in the output, that means that jumpapp is having trouble finding the window.

If the window you want does appear in the list, then try running wmctrl -ia <window_id>. So in my example, I'd run: wmctrl -ia 0x03200002. If that command doesn't activate the window, then that means wmctrl is having a problem.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

I have tried it with -L option and jumpapp found only the main window:

$ jumpapp -L virtualbox
Matched Windows [1]
0x03200003 dell.local 2487 0 VirtualBox: Oracle VM VirtualBox Manager

If I close the VirtualBox Manager window, then jumpapp vitrualbox returns

Error: found running process for 'virtualbox', but found no window to jump to

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Weird. For some reason the WM_CLASS match must not be working. I'm going to investigate some more later on and see why that might be. I may even end up having to add more debug options :)

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

I did some more investigation, but I just can't reproduce the issue. I tried simulating your computer by inserting in the output from your earlier comment into a modified copy of jumpapp. But when I ran it I got the expected output:

./jumpapp -L virtualbox
Matched Windows [2]
0x04000003 dell.local 11140 0 VirtualBox: Oracle VM VirtualBox Manager
0x04400053 dell.local 11186 0 VirtualBox: windows (elog) [Running] - Oracle VM VirtualBox

(Both windows are returned, not just the one.)

The only thing I can think is that there's something about your bash environment that's different from mine. If you post the output of bash --version and shopt, I can try to reproduce your exact environment, otherwise I'm out of ideas.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Here is the bash version:

$ bash --version
GNU bash, version 4.2.53(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

and shopt output:

$ shopt
autocd          off
cdable_vars     off
cdspell         off
checkhash       off
checkjobs       off
checkwinsize    on
cmdhist         on
compat31        off
compat32        off
compat40        off
compat41        off
direxpand       off
dirspell        off
dotglob         off
execfail        off
expand_aliases  on
extdebug        off
extglob         on
extquote        on
failglob        off
force_fignore   on
globstar        off
gnu_errfmt      off
histappend      on
histreedit      off
histverify      off
hostcomplete    off
huponexit       off
interactive_comments    on
lastpipe        off
lithist         off
login_shell     off
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nocasematch     off
nullglob        off
progcomp        on
promptvars      on
restricted_shell    off
shift_verbose   off
sourcepath      on
xpg_echo        off

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Darn, I still can't reproduce the issue :(

bash-4.2$ echo $BASH
/home/mlk/Downloads/bash-4.2.53/root/bin/bash
bash-4.2$ shopt >my.shopt
bash-4.2$ diff my.shopt klayman.shopt 
32c32
< login_shell       on
---
> login_shell       off
bash-4.2$ ./jumpapp -L virtualbox
Matched Windows [2]
0x02800006 aquilla 17698 0 VirtualBox: Oracle VM VirtualBox Manager
0x02000002 aquilla 17807 0 VirtualBox: Test [Running] - Oracle VM VirtualBox

(Running on a Fedora 19 box)

I'm out of ideas to try, unfortunately. Feel free to leave the issue open if you want. Maybe someone else has the same problem.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Got it ) The problem is in the seamless mode. Though I see absolutely no difference in wmctrl -lpx output.

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

Oh, seamless mode. I wasn't thinking about that. I have an idea what it might be. I'll investigate more later.

from jumpapp.

mkropat avatar mkropat commented on July 30, 2024

I think I figured it out. I just pushed jumpapp version 0.7, which should be able to match VirtualBox windows in seamless mode.

One quirk of this change is that jumpapp will now match VirtualBox's global "toolbar", which makes it seem like jumpapp did nothing even though it actuall did. That's probably not what we want, but I'm not yet sure the best way to handle it.

from jumpapp.

klayman avatar klayman commented on July 30, 2024

Thank you very much for your effort! Now switching works fine.

from jumpapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.