How to set size of application running in vcn with xfce desktop

Hi,
I have made an app using vnc and xfce following the matlab example 4. Edit Launch Script — Open OnDemand 3.0.0 documentation

The relevant files are:

[root@ood-hepp hepp_hypatia]# cat submit.yml.erb 
---
batch_connect:
  template: vnc
[root@ood-hepp hepp_hypatia]# cat form.yml
---
title: "HYPATIA"
cluster: "zpath"
form:
  - bc_queue
  - bc_account
  - bc_num_hours
  - bc_num_slots
  - desktop
  - bc_vnc_idle
  - bc_vnc_resolution
  - bc_email_on_started

attributes:
  bc_vnc_idle: 0
  bc_vnc_resolution:
    required: true
[root@ood-hepp hepp_hypatia]# cat template/script.sh.erb
#!/usr/bin/env bash

# Clean the environment
module purge

# Set working directory to home directory
cd "${HOME}"

#
# Launch Xfce Window Manager and Panel
#


(
  export SEND_256_COLORS_TO_REMOTE=1
  export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>"
  export XDG_CONFIG_DIRS="<%= session.staged_root.join("config") %>"
  export XDG_DATA_HOME="<%= session.staged_root.join("share") %>"
  export XDG_CACHE_HOME="$(mktemp -d)"
  module restore
  set -x
  xfwm4 --compositor=off --daemon --sm-client-disable
  xsetroot -solid "#D3D3A4"

  xfsettingsd --sm-client-disable
  xfce4-panel --sm-client-disable
  
) &


#
# Start HYPATIA
#

# Load the required environment
module --ignore_cache load Java/11.0.2
cp -r /storage/shared/software/Hypatia ${HOME}/OnDemand_Hypatia
cd ${HOME}/OnDemand_Hypatia
set -x
java -jar Hypatia_7.4_Masterclass.jar

This results in the following desktop view

There are several things that are not so nice here

  1. The resolution is bad
  2. I would like the panel (? not sure if I am using the correct terminology) to fill more of the view.
  3. I would like to actually be able to see the desktop below and move the application around.

I have tried with different xfce4- settings in the script.sh.erb file, and also using a configuration file like bc_osc_matlab/template/config/xfce4/xfconf/xfce-perchannel-xml at master · OSC/bc_osc_matlab · GitHub

But due to lack of experience with xfce and vnc I am not sure what to change to achieve what I want.
Is there any experience out there that I could benefit from?

Thanks!
Maiken

Is this software publicly available? I’ll probably have to replicate to try stuff out as I’m not sure off hand what to do. Indeed some of our apps boot up like that and you have to full screen it afterwards.

For reference - here’s what the MATLAB settings are doing - they’re creating that menu bar that I have open there that has firefox, terminal and a file manager. There’s no desktop.

If you want the enitre desktop - i think this is the command. Instead of launching xfce4-panel you launch xfce4-session. Though even with the panel you should be able to drag the application around and resize it.

# Start up xfce desktop (block until user logs out of desktop)
xfce4-session

Thanks a lot for your reply.

Yes, for the MATLAB config, I understood there were several panels, so I did actually try to simplifiy that config file and remove all the panels except the one for the main application. But, I am not sure if that change was actually picked up, as I could not spot any difference in how the application was shown.

The application is this one: http://hypatia.phys.uoa.gr/Downloads/HYPATIA/Hypatia_7.4_Masterclass.zip

Thanks a lot for taking the time to have a look!
Maiken

Just a note - I am not sure if I need to change something in the vnc settings or the desktop (gnome/mate/xfce) settings.

So far, “whatever” I try (not meaning that what I tried is correct) I see no changes in the panel size when the app opens. Where whatever is changing obvious parameters in the xfce config file, trying some geometry settings in the script.sh.erb etc.

So maybe it is vnc that needs to be set up differently. But what would that be then?

Thanks again!
Maiken

I finally located the right file! It is in /var/www/ood/apps/sys//lib/smart_attributes/attributes/bc_vnc_resolution.rb

Now, how to set this in the configuration?

Update: I would expect that the bc_vnc_resolution is the right parameter to use to set this value, but I cant quite find the proper documentation to be able to set it in a way that works.

I see it used here: 3. Modify Form Attributes — Open OnDemand 3.0.0 documentation

I attempted to write a form.yml in the following way:

---
title: "HYPATIA"
cluster: "zpath"
form:
  - bc_queue
  - bc_account
  - bc_num_hours
  - bc_num_slots
  - desktop
  - bc_vnc_idle
  - bc_vnc_resolution
  - bc_email_on_started
attributes:
  bc_vnc_idle: 0
  bc_vnc_resolution:
    widget: "resolution_field"
    required: true

Since this part of the documentation Form Widgets — Open OnDemand 3.0.0 documentation seems to indicate that this is what should be used. However, the bc_vnc_resolution field does not show up in the form for some reason.

I attempted to add another custom variable

 my_vnc_resolution:
    widget: "resolution_field"

Then the field appears - but the setting still does not have any effect in the actual app. The size of the panel is still the default 800x600

Meanwhile I have opted to use xfce4-session instead of xfce4-panel as in this way I get the possibility to actually move around and rescale the app gui windows.

If you have some tips on how to actually manage to set bc_vnc_resolution or some other variable so that it actually does resize the window in panel mode, that would be highly appreciated.

Thanks again!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.