Hi there,
I’m launching 2 instances of cog as a browser inside weston, but the application windows spawns “randomly” on the screen. Is there any way to reorganize the screen? and position the window in a specific X/Y location?
Hi there,
I’m launching 2 instances of cog as a browser inside weston, but the application windows spawns “randomly” on the screen. Is there any way to reorganize the screen? and position the window in a specific X/Y location?
This might not be exactly what you want, but have a look at this SO post: gtk3 - Moving (repositioning) a Child Window or Dialog in Gtk / Gtkmm - Stack Overflow
The reply has the following line:
So whether you can arbitrarily move windows: the answer is no.
Hi there @nandanv ,
Thanks for the response but that’s not seems to be what i’m looking for (at least the way i can “see” it)
I don’t want to move the windows/apps around the, i want to make them spawn i’m a logical arranged specific way in a 1080p screen and stay there, instead of spawning “randomly”
A more visual way to explain this:
I have a 1080p screen connected via HDMI to my apalis board, and i want to launch the “com.example.left” with a size of 960x1080 starting at x=0, y=0, and the “com.example.right” with a size of 960x1080 starting at x=960, y=0
Hello @rawmance ,
In your drawing I see that you want to use Weston kiosk shell.
Looking at the description of the shell I see that:
Weston’s kiosk-shell is a simple shell targeted at single-app/kiosk use cases.
That means that it can only display a single app, full-screen. To use multiple apps you would need to use multiple outputs.
As an alternative you could try the IVI shell, but I have no experience on this one.
Best regards,
Josep
Hi @josep.tx ,
I’m trying to investigate now the ivi-shell, but it seems that there are no “sufficient” examples on how to use this.
I’m trying to figure out what is the best path to achieve this
Hello @rawmance ,
Unfortunately I could not find any additional information on this topic. Have you been able to make any progress on your side?
Best regards,
Josep
Hi there guys,
Sorry but still no clue how to do that, the ivi-shell documentation vs examples are very rare, (or atleast i can’t find proper) i still keep trying to find a way to apply the solution i need, as changing the complete UI solution isn’t a way
Hello @rawmance,
I see that you tagged yocto as your development environment. Does this mean you built a reference multimedia image adding Cog?
I’m launching 2 instances of cog as a browser inside weston, but the application windows spawns “randomly” on the screen.
Could you please list down the steps/procedure with which I could get into this status? Then I could take a look and possibly reproduce the issue and try to solve it from there.
Hi there,
Yes, i’ve built a very simple image: your reference multimedia image, and adding wpe+cog support just to test this scenario.
After that, when running weston i just spawn 2 cog instances via ssh:
export XDG_RUNTIME_DIR=/run/user/`id -u`
cog --gapplication-app-id=com.example.left -P wl http://127.0.0.1:8082
cog --gapplication-app-id=com.example.right -P wl http://127.0.0.1:8081
and then, 2 instance of cog appear on the screen. Ofcourse, on random positions.
Thanks in advance
Hi @rawmance !
I have an update to share with you, although it is most probably not so useful.
It is related to the IVI shell on Weston.
After going to Weston’s source code, I found a weston.ini.in
example for IVI shell:
Important observation:
@westondatadir@
with /usr/share/weston
, and@bindir@
with /usr/bin
After modifying the file, I placed it on the module (outside containers) in /home/torizon/weston-ivi/weston.ini
Then, I killed all containers running on the module (e.g. $ docker rm $(docker stop $(docker ps -a -q))
) and ran the following command on the module to launch the Weston container using IVI shell:
$ docker run -e ACCEPT_FSL_EULA=1 --rm --name=weston \
--net=host --cap-add CAP_SYS_TTY_CONFIG \
-v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
-v /home/torizon/weston-ivi/:/etc/xdg/weston/ \
--device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \
torizon/weston-vivante:$CT_TAG_WESTON_VIVANTE --tty=/dev/tty7
Some comments:
dos2unix
program) I must bind mount the folder /home/torizon/weston-ivi
on top of the folder /etc/xdg/weston
instead of mounting only the file weston.ini
.--developer
in order to use the weston.ini
from /etc/xdg/weston
instead of from /etc/xdg/weston-dev
With all this, I had access to the following on HDMI:
And I could launch applications which will stay on half screen, as you need:
A general comment:
A potential issue:
Let us know if this helps you
Best regards,
Hi @rawmance !
Did you have time to try the steps I shared above?
Does it help you?
Let us know
Best regards,