Page 1 of 1

V-REP's window WM_CLASS attribute is empty on Linux

Posted: 24 Mar 2015, 18:01
by fferri
The WM_CLASS attribute of the V-REP main window (used by window manager to associate windows with the owning application), is not set.

You can find out by running in a terminal xprop WM_CLASS and clicking anywhere in the V-REP window.
Output on my machine:

Code: Select all

$ xprop WM_CLASS
WM_CLASS(STRING) = " ", " "
This is a problem if I want to create a .desktop launcher for V-REP, because even if I make a launcher button for it, when started, the window will have a separate button.

Re: V-REP's window WM_CLASS attribute is empty on Linux

Posted: 25 Mar 2015, 14:37
by coppelia
Hello,

We have modified this, and the WM_CLASS should now be "V-REP". This will be available in the next release (3.2.1)
Thanks!

Cheers

Re: V-REP's window WM_CLASS attribute is empty on Linux

Posted: 25 Mar 2015, 17:04
by fferri
Great!

Then, provided that also the changes to vrep.sh have been done, you can have V-REP integrated with GNOME menu and Ubuntu Unity, by creating a file in $HOME/.local/share/applications/vrep.desktop (or in the global location /usr/local/share/applications/vrep.desktop) with contents:

Code: Select all

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Exec=/opt/vrep/vrep.sh
Name=V-REP
Icon=/opt/vrep/programming/windowsOnlyProjects/v_repClientApplication/v_rep.ico
Terminal=0
StartupWMClass=V-REP
Note: I assumed V-REP is installed in /opt/vrep.
In fact, what I do on Linux is to unpack the V-REP package to /opt/V-REP_PRO_EDU_V3_2_0_rev6_64_Linux and then create a symlink /opt/vrep pointing to it, so I can also switch between vrep versions if needed.

Note2: probably the icon path I choose is not correct, but I was unable to find the actual V-REP icon.

Still it is not standard, and makes some assumptions, but it is getting closer :-)