Active Topics

 


Reply
Thread Tools
Posts: 1,335 | Thanked: 3,931 times | Joined on Jul 2010 @ Brittany, France
#191
Originally Posted by spoofykid View Post
In case it's useful to anyone:

I install the desktop via the Containers GUI, run 'setup xsession' within the GUI, attach the container within the GUI, open a new terminal window, because it's root I run su defaultuser or if your user is nano su nano to get out of root, I run /usr/bin/qxdisplay --wayland-socket-name "../../display/wayland-container-0" from that window, minimise that and the "waiting for xwayland' windows, in the terminal window with the attached container run /mnt/guest/start_desktop.sh 0, and then finally minimise it and change to the "waiting for xwayland" window which should have the desktop running.

Obviously this has all been documented, but the big one for me was exiting root using su defaultuser before running the wayland code.
I think you meant "nemo" instead of "nano".

Good to know the container setup and Xsession setup still work from the GUI, I misunderstood from tests with Mosen that they didn't. That means the only issue might be starting X from the GUI, which for the time being can be worked around from CLI. There's something weird though because it still works for me on SFOS 3.3 ported to the Pro1.
 

The Following 3 Users Say Thank You to Kabouik For This Useful Post:
Posts: 30 | Thanked: 24 times | Joined on Mar 2014
#192
Oh yeah, looks like I managed to solve the sound issue on Gemini PDA, SFOS 4.1.0.24:

First I did this:
Code:
$ devel-su
# mkdir -p /odm/etc/
# cd /odm/etc/
# ln -s /vendor/etc/audio_param .
# exit
Then I did this everytime the sound stopped to work:
Code:
$ systemctl --user restart pulseaudio.service
$ systemctl --user status pulseaudio.service
The last line is optional, just a quick check, if everything works.

At last, I played some sound in SFOS and voillį! It also worked in the running instance of Debian!

More information here:
https://forum.sailfishos.org/t/4-1-0...r-upgrade/6530

About the keyboard issue, xev seems to not recognize Fn. It gives blank bytes received, or something like that. After pressing Fn+o, it just writes this
Code:
'' (blank symbol received, key pushed)
'o' (key pushed)
'o' (key pulled)
'' (blank symbol received, key pulled)
or something like that, if I understand the log correctly.
 

The Following 3 Users Say Thank You to Mir57 For This Useful Post:
edp17's Avatar
Posts: 600 | Thanked: 713 times | Joined on Jul 2019 @ UK
#193
Hi all,

This post is for clearing out the misunderstanding around the 'debian-mouse-landscape.sh' and 'debian-mouse-portrait.sh' scripts.
I have created these for my Note4 (treltexx) because on that device the LXC app doesn't work. I can only start the container manually in the command line and where I needed two fingerterm windows to be able to start the container and enter into the desktop distro. With those scripts, one fingerterm window was enough to do everything, plus I didn't need to type all commands each time.
If you look into the scripts you'll see that both do the following:
- checks whether the container is started and if not, starts it
- then starts the qxdisplay as not root
- then attaches the container and starts the desktop within

The only difference between the two is that the xx-portrait.sh script calls the qxcompositor with the '-o portrait' parameter. This means it doesn't change the layout when you turn the phone from portrait to landscape and vice versa.

Oh, and the word "mouse" in their name is related to they both use qxcompositor instead of qxdisplay when starting the display.

This is all those scripts are doing.

Last edited by edp17; 2021-07-16 at 07:00.
 

The Following 4 Users Say Thank You to edp17 For This Useful Post:
Posts: 202 | Thanked: 385 times | Joined on Jul 2018
#194
@edp17 (or anyone ) - I'm getting error trying to open xwindow on latest SF update, (4.2):

"/usr/bin/qxdisplay: symbol lookup error: /usr/
bin/qxdisplay: undefined symbol: _ZN18QWayland
Compositor7openUrlEPvRK4QUrl, version Qt_5"

Any ideas?
Thanks
 

The Following 2 Users Say Thank You to levone1 For This Useful Post:
Posts: 202 | Thanked: 385 times | Joined on Jul 2018
#195
Well, I got it working by attaching container and running "startx -- /opt/bin/Xwayland"...
Run "su user" first to start non-root...

update - not consistent ... Worked one time, then, after reboot, wouldn't work, (server error - couldn't add screen...). Also got it to work one time simply by typing "/opt/bin/Xwayland" ... Not sure what makes the difference .

update - found a method that works, using Containers app, and tips from here - https://talk.maemo.org/showthread.php?t=98882

- open Containers app, and select container, and tap "start Xsession", (nothing happens visibly, but won't work if I don't do it), then tap "attach ". Terminal will open asking for root password, then show Linux root prompt.
- enter "mkdir /run/user/0" then "export $(dbus-launch)" then "export XDG_RUNTIME_DIR=/run/user/0" then "startx"

Desktop opens...

Last edited by levone1; 2021-09-30 at 14:16.
 

The Following User Says Thank You to levone1 For This Useful Post:
Posts: 202 | Thanked: 385 times | Joined on Jul 2018
#196
@edp17 (or anyone) Wondering if you could help with something -

Since recent SF versions, gui for Containers hasn't functioned the same as before, and need to use terminal to open Linux desktop. I have figured out how to do that, but now there is one difference - certain applications don't open in the same screen, when launched from the Linux desktop, but instead, a new Sailfish app window opens with the Linux app, (I guess it's a new Wayland window, or?). This would be fine with me, except for 1) there's no keyboard, and I can't figure out how to get one to open with the app, and 2) the new window gets automatically closed as soon as another app is brought to the foreground, (it will stay open when minimized to card view, but closes if a different card is selected).

Anyone have any ideas why certain (not all) apps aee opening this way, and how to get them to open in the cureent window instead?

The only hint I can get from termonal output is a message about "...wayland not providing any supported shell interface".

Thanks
 

The Following User Says Thank You to levone1 For This Useful Post:
edp17's Avatar
Posts: 600 | Thanked: 713 times | Joined on Jul 2019 @ UK
#197
Originally Posted by levone1 View Post
@edp17 (or anyone) Wondering if you could help with something -

Since recent SF versions, gui for Containers hasn't functioned the same as before, and need to use terminal to open Linux desktop. I have figured out how to do that, but now there is one difference - certain applications don't open in the same screen, when launched from the Linux desktop, but instead, a new Sailfish app window opens with the Linux app, (I guess it's a new Wayland window, or?). This would be fine with me, except for 1) there's no keyboard, and I can't figure out how to get one to open with the app, and 2) the new window gets automatically closed as soon as another app is brought to the foreground, (it will stay open when minimized to card view, but closes if a different card is selected).

Anyone have any ideas why certain (not all) apps aee opening this way, and how to get them to open in the cureent window instead?

The only hint I can get from termonal output is a message about "...wayland not providing any supported shell interface".

Thanks
On my Galaxy Note4 port the Container app never worked. I always use the terminal and the scripts I created (attached to the main post). I currently use SFOS4.1 on my Note4. I'll take a look how the debian works on it and let you know. Will think about your issue too.
 

The Following 2 Users Say Thank You to edp17 For This Useful Post:
edp17's Avatar
Posts: 600 | Thanked: 713 times | Joined on Jul 2019 @ UK
#198
@levone1
I've checked my install on the device and still can start the desktop distro. (SFOS 4.1)
I slightly needed to amend the script that I wrote to start it because the installed Waydroid interferes with the Debian container.

If you run the following commands in a terminal, you should be able to start the Desktop distro: (my container name is Debian, so I use this in the example, you can replace it with your container name)

Before you do this, please ensure the container is not running!

1. Start the container:
sudo lxc-start -n Debian -d &
(or start it with devel-su if you don't have sudo installed)
2. Start the compositor in landscape mode:
/usr/bin/qxcompositor --wayland-socket-name "../../display/wayland-container-0" &
or in portrait:
/usr/bin/qxcompositor -o portrait --wayland-socket-name "../../display/wayland-container-0" &
3. finally attach the container and start the distro:
sudo lxc-attach -n Debian -- /mnt/guest/start_desktop.sh 0 &

(I've made a script that is doing all in one go, so that can be used as an icon on the app drawer.)
 

The Following 4 Users Say Thank You to edp17 For This Useful Post:
jellyroll's Avatar
Posts: 435 | Thanked: 684 times | Joined on Apr 2012 @ Netherlands 020
#199
Qxdisplay and qxcompositor does work properly on SailfishOS 4.1.0.24 but not on 4.2.0.21.
Tested on a Pinephone.
 

The Following User Says Thank You to jellyroll For This Useful Post:
Posts: 202 | Thanked: 385 times | Joined on Jul 2018
#200
Originally Posted by edp17 View Post
@levone1
I've checked my install on the device and still can start the desktop distro. (SFOS 4.1)
I slightly needed to amend the script that I wrote to start it because the installed Waydroid interferes with the Debian container.

If you run the following commands in a terminal, you should be able to start the Desktop distro: (my container name is Debian, so I use this in the example, you can replace it with your container name)

Before you do this, please ensure the container is not running!

1. Start the container:
sudo lxc-start -n Debian -d &
(or start it with devel-su if you don't have sudo installed)
2. Start the compositor in landscape mode:
/usr/bin/qxcompositor --wayland-socket-name "../../display/wayland-container-0" &
or in portrait:
/usr/bin/qxcompositor -o portrait --wayland-socket-name "../../display/wayland-container-0" &
3. finally attach the container and start the distro:
sudo lxc-attach -n Debian -- /mnt/guest/start_desktop.sh 0 &

(I've made a script that is doing all in one go, so that can be used as an icon on the app drawer.)
We're using qxdisplay now, not qxcompositor ... still symbol lookup error...

I can get desktop to open and run fine using other steps. I was more curious about why some applications open in a separate window. I think the line in start_desktop script,

"export QT_QPA_PLATFORM=xcb # force qt applications backend to Xwayland
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/sbin"

maybe has something to do with it...

Last edited by levone1; 2021-10-20 at 12:37.
 

The Following User Says Thank You to levone1 For This Useful Post:
Reply

Tags
application, development, linux


 
Forum Jump


All times are GMT. The time now is 23:00.