RaySession icon indicating copy to clipboard operation
RaySession copied to clipboard

Ray-hack client type ?

Open newlaurent62 opened this issue 5 years ago • 26 comments

Hello,

Some questions about ray-hack (ray_control --help-all | grep -i hack returns empty on master branch)

What is the main goal of ray-hack feature ? Is there a reference example ? Is this feature nsm compatible ?

BR, Laurent

newlaurent62 avatar Jun 22 '20 14:06 newlaurent62

Sorry it's not documented at all for the moment (client templates should be redone too).

The main goal is to do exactly what ray-proxy does, but directly. No reference exemple for the moment, just add executable via GUI, and uncheck "NSM Protocol" checkbox.

So, factually, this is not an nsm compatible feature.

Houston4444 avatar Jun 22 '20 15:06 Houston4444

The main goal is to do exactly what raye-proxy does, but directly.

What are the advantages of ray-hack over ray-proxy ?

Is there any tricks supported by ray-hack that cannot be done with ray-proxy ?

newlaurent62 avatar Jun 22 '20 16:06 newlaurent62

This is simpler for desktop file searches, client is stopped when process is stopped (with ray-proxy, if process is too quickly stopped it displays proxy window). User can edit easily parameters even if client is stopped. It's a little lighter also because proxy window is embedded.

Houston4444 avatar Jun 23 '20 12:06 Houston4444

If i can get ray_control command to create ray-hack instead of ray-proxy and set properties, i should be able, i hope with minimal efforts, to use it in rayZ-builder.

newlaurent62 avatar Jun 23 '20 12:06 newlaurent62

You can now use ray_control add_executable EXECUTABLE ray_hack. Then you set properties with ray_control client CLIENT_ID set_properties. Current ray_hack specific properties are "config_file", "save_sig", "stop_sig", "wait_win" and "no_save_level".

Houston4444 avatar Jun 23 '20 13:06 Houston4444

When i try to create a ray_hack with "bin/Jamulus" as executable it complains that "Absolute paths are not permitted. Clients must be in $PATH"

Also, this is not an absolute path but a relative path to the proxy-dir/bin/Jamulus and it worked with ray-proxy.

How can i get this to work ?

newlaurent62 avatar Jun 23 '20 13:06 newlaurent62

oups, try again ! You could also set any executable and change it after with set_properties.

Houston4444 avatar Jun 23 '20 16:06 Houston4444

Sorry, but i'm unsure of the commands to apply:

To create a clientID : ray_control add_executable "\$executable" ray_hack not_start

To set the ray_hack properties :

ray_control client \$clientID set_ray_hack_properties wait_win:"\$wait_window" \
              config_file:"\$config_file" \
              no_save_level:"\$no_save_level" \
              save_sig:"\$save_signal" \
              stop_sig:"\$stop_signal" 

To set the executable properties :

      ray_control client \$clientID set_properties launched:"\$launched" \
          icon:"\$icon" \
          label:"\$label" \
          executable:"\$executable" \
          arguments:"\$arguments" \
          icon:"\$icon" \
          name:"\$name"

newlaurent62 avatar Jun 23 '20 16:06 newlaurent62

I come back to proxy generation code and it seems that RaySession does not create XML proxy file anymore.

newlaurent62 avatar Jun 23 '20 17:06 newlaurent62

I come back to proxy generation code and it seems that RaySession does not create XML proxy file anymore.

Quite strange, I didn't change anything relative to proxy. Are you sure ?

To set ray_hack properties use for example:

ray_control client $CLIENT_ID set_properties "config_file:$config_file \
save_sig:0"

So you can set them in the same time you set executable or what else properties.

Houston4444 avatar Jun 24 '20 06:06 Houston4444

Quite strange, I didn't change anything relative to proxy. Are you sure ?

When i generate a session with my RaySession version it works and when i use the same code with the master branch, it doesn't work : ray-proxy GUI pop up when starting the session.

The generation process seems to work without any warnings or errors in both cases.

I revert start_new_hidden to start_new, but it doesn't help.

newlaurent62 avatar Jun 24 '20 12:06 newlaurent62

You are right, I am checking this.

Houston4444 avatar Jun 24 '20 13:06 Houston4444

Ok fixed. Why don't you want to use Ray-Hack client ?

Houston4444 avatar Jun 24 '20 13:06 Houston4444

I did not say that.

I just come back to ray-proxy because i faced some errors that i did not understand. I wanted to test RaySession with code already working from my side.

With your guidelines, i'm implementing ray_hack feature.

newlaurent62 avatar Jun 24 '20 13:06 newlaurent62

Generation process and session load / clients started works now with ray_hack.

Thanks !

newlaurent62 avatar Jun 24 '20 13:06 newlaurent62

It seems that when using

clientID=$(ray_control add_executable obs ray_hack nostart)

and then doing:

ray_control client $clientID set_properties executable:"wrapper.sh" is not take into account. (On ray-proxy that worked.)

Will i be able to do that with ray_hack ?

newlaurent62 avatar Jun 24 '20 13:06 newlaurent62

If it works well here, I can't reproduce the issue.

Houston4444 avatar Jun 24 '20 13:06 Houston4444

Sorry it's an error on my side.

newlaurent62 avatar Jun 24 '20 13:06 newlaurent62

Icons in /usr/share/pixmaps cannot be found with ray_hack type.

ray-proxy type find icons in this dir.

newlaurent62 avatar Jun 24 '20 14:06 newlaurent62

I don't see how it can be possible. In all cases, that's nor ray_hack protocol nor ray-proxy which search icons. For now, icons are found by the system (here Qt search them from theme), or alternatively from any path if icon is set to an absolute path.

Houston4444 avatar Jun 24 '20 14:06 Houston4444

Ok i found the error. I need some rest ...

Thanks !

newlaurent62 avatar Jun 24 '20 15:06 newlaurent62

The icon is missing on my side when the attached script is applied. It creates a session and adds one client.

However, if i input "gx_head" in the Ray Hack GUI icon, the icon is found.

It may be due to the fact that the icon is not the default icon of the executable. ray-config-session is the wrapper script that you can install with sudo make install-wrapper in rayZ-builder dir.

You will find more information in the zip file

script.zip

Do you have the same behavior on your side ?

newlaurent62 avatar Jun 25 '20 15:06 newlaurent62

When setting "gx_head" icon, the name does not appear in ray hack GUI and the icon does not display. When setting "gxhead" icon, the name appears in ray hack GUI but has not been found in /usr/share/pixmaps, so it is not display. (Also i created it before)

So it seems that when i input "gx_head" in ray_hack GUI, the icon is not found in /usr/share/pixmaps but from another location.

Doing a locate gx_head.png tells me that RaySession has one in its repository: raysession-git/resources/app_icons/gx_head.png

newlaurent62 avatar Jun 25 '20 17:06 newlaurent62

I tried your script, but the icon is correctly set from the start. Note that /usr/share/pixmaps/gx_head.png was already existing.

Doing a locate gx_head.png tells me that RaySession has one in its repository: raysession-git/resources/app_icons/gx_head.png

Yes, these are fallback icons, because I never know why but on some systems some icons were not found by Qt. I suspect this is the same bug that affects you. What is your DE ? I can't really do anything, sorry. Maybe try to use absolute paths for icons.

Houston4444 avatar Jun 28 '20 14:06 Houston4444

I suspect this is the same bug that affects you. What is your DE ?

My Desktop Environment is XFCE4 (4.14) on ubuntu 20.04.

I can't really do anything, sorry.

I ask with ray_control to set the icon to "gx_head" and it did not. The icon was missing on my config (because of a bug), is this the wanted behavior ? Using GUI, i can set an icon name that is not found on the machine and then save and retrieve this name in further session loading.

newlaurent62 avatar Jun 28 '20 15:06 newlaurent62

Ok it works when i set icon to /usrs/share/pixmaps/gx_head

So please, could it be possible to set an icon name or path list in suitable order to overcome this bug ? for example:

ray_control client $clientID set_property icon:"gx_head:/usr/share/pixmaps/gx_head"

This would be optional.

Because i need my session to work on my env but i don't want it to not work on a different env ...

newlaurent62 avatar Jun 28 '20 15:06 newlaurent62