Closed ghost closed 5 years ago
@aidylewis,
It looks like the cli-extra
target only requires the core
target and no x11 stuff is installed.
Is it possible to install an X11 Display manager without a desktop?
x11
X11 via autodetected backend. Does not install any desktop environment.
Yes, you could update your chroot adding the x11
target like this:
sudo crouton -n buster -t x11 -u
That should satisfy the x11 requirement and hopefully the Java Swing app requirements.
Hope this helps, -DennisLfromGA
Thanks for the response @DennisLfromGA and the -u
flag which didn't delete my config. Will I need to manually start the x11 server - it doesn't seem to be running?
$ ~ xset q
xset: unable to open display ""
@aidylewis,
You may have to set the display first, try -
export DISPLAY=:0
xset q
I tried that when just using enter-chroot
and it did not work for me.
If the 'xiwi' xmethod was installed when you did your update you may be able to use it with your java app using something like:
startxiwi -n buster -f [Java Swing app]
See below for startxiwi
usage:
startxiwi [options] chroot_app [parameters]
Wraps enter-chroot to launch a window or tab in Chromium OS for any graphical application.
Applications launched in this way show in independent windows or tabs.
By default, it will use the primary user on the first xiwi-enabled chroot found and launch
the chroot_app in a window.
Options:
-b Fork and run the specified command silently in the background.
-c CHROOTS Directory the chroots are in. Default: /mnt/stateful_partition/crouton/chroots
-k KEYFILE Override the auto-detected encryption key location.
-n NAME Name of the chroot to enter. Default: first one found in CHROOTS
-t TARGET Only enter the chroot if it contains the specified TARGET.
-u USERNAME Username (or UID) to log into. Default: 1000 (the primary user)
-F Launch the chroot_app full-screen.
-T Launch the chroot_app in a tab.
-f Prevent xiwi from quitting automatically. (see NOTE below)
NOTE:
xiwi will normally close when the application returns. Some gui applications
fork before or during normal operation, which can confuse xiwi and cause it to
quit prematurely. If your application does not have a parameter that prevents
it from forking, and crouton is unable to automatically detect the fork, you can
use -f to prevent xiwi from quitting automatically.
xiwi will quit if you close the Chromium OS window when nothing is displayed.
You can cycle through multiple windows inside the application
via Ctrl-Alt-Tab/Ctrl-Alt-Shift-Tab, or close them via Ctrl-Alt-Shift-Escape.
If the chroot_app begins with 'start' but you still want to
use the default window manager, specify the full path of the application.
When you added the x11
target it should have also installed the 'xorg' or 'xiwi' xmethod which installs many X11 packages. When you did the update to add x11
you may have seen something like this when it completed:
With xorg:
You can flip through your running chroot desktops and Chromium OS by hitting Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.
With xiwi:
You can open your running chroot desktops by clicking on the extension icon. Once in a crouton window, press fullscreen or the "switch window" key to switch back to Chromium OS. You can launch individual apps in crouton windows by using the "xiwi" command in the chroot shell. Use startxiwi to launch directly from the host shell. Use the startxiwi parameter -b to run in the background. Example: sudo startxiwi -b xterm
You can add them manually with an update like:
sudo crouton -n buster -t xiwi
orsudo crouton -n buster -t xiwi
or bothsudo crouton -n buster -t xiwi,xorg
Hope this helps, -DennisLfromGA
Thanks @DennisLfromGA
sudo crouton -n buster -t xiwi -u
sudo startxiwi -n buster -f google-chrome
Is there a way to financially contribute to this project on a rolling basis? I am using a £150 Chromebook for home and work development - which is quite incredible.
Is it possible to return back to the terminal and use for example google-chrome?
@aidylewis,
If you mean returning to your terminal session and not tying it up the yes, use the '-b' option to run it in the background like:
sudo startxiwi -n buster -b -f google-chrome
If you mean return to the Chrome OS screen from the xiwi window then yes, you can use the key-combos ctrl+alt+shift+F1/Back and ctrl+alt+shift+F2/Forward to switch back and forth. From Chrome OS just use the same key-combo or the crouton integration extension in the browser toolbar and select your chroot, see below -
There are other ways to launch your xiwi session too, like:
sudo startxiwi -n buster -b -F -f google-chrome
(Launch the chroot_app full-screen.)sudo startxiwi -n buster -b -T -f google-chrome
(Launch the chroot_app in a tab.)EDIT: You can now use the new virtual desks feature and switch between them with shift+launcher+] and shift+launcher+[. See below for my three virtual desks with: browser, hangouts, crouton-xiwi -
Hope this helps, -DennisLfromGA
name: bullseye
encrypted: yes, unlocked
Entering /mnt/stateful_partition/crouton/chroots/bullseye...
crouton: version 1-20210907212903~master:9b281df5
release: bullseye
architecture: amd64
xmethod: xorg
targets: x11,xiwi,xorg,cli-extra,extension
host: version 14150.87.0 (Official Build) stable-channel grunt
kernel: Linux localhost 4.14.243-18084-g7bc10658733d #1 SMP PREEMPT Tue Nov 9 13:59:04 PST 2021 x86_64 GNU/Linux
freon: yes
➜ ~ xset q
xset: unable to open display ""
➜ ~ export DISPLAY=:0
➜ ~ xset q
xset: unable to open display ":0"
➜ ~ export DISPLAY=127.0.0.1:0
➜ ~ xset q
xset: unable to open display "127.0.0.1:0"
➜ ~ export DISPLAY=127.0.0.1:1
➜ ~ xset q
xset: unable to open display "127.0.0.1:1"
➜ ~ export DISPLAY=192.168.2.1:0
➜ ~ xset q
xset: unable to open display "192.168.2.1:0"
➜ ~
Debian Bullseye chroot.
Please describe your issue:
Trying to run a Java Swing app using cli-extras. Is it possible to install an X11 Display manager without a desktop? I can run Java Swing in Crostini.
If known, describe the steps to reproduce the issue:
Try to run a Java Swing app using Debain buster cli-extras with OpenJDK 11