View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007214||Kali Linux||[All Projects] Feature Requests||public||2021-06-07 10:11||2021-09-13 21:10|
|Target Version||Fixed in Version|
|Summary||0007214: Kali live-build should start into wanted window-manager|
I am stuck with a little issue, that maybe possible easily be fixed.
The issue: When I am building a live-build of kali (in the usual way with build.sh), I want to build it with LXDE.
This works, however, when the live-build is starting, it automatically is booting into XFCE (which is installed by default).
How can I force to the live-system boot into LXDE instead of XFCE?
I suppose, this can be set by me in the git files somewhere, however, that would force to edit this setting after any git pull.
Or is it possible to add a "boot parameter" to ./build.sh, so that it will start LXDE by default?
Thank you very much for any informations and thanks for all the great work.
||in build.sh isn't there is line with graphical env choose then you may change it try it it won't cost you and maybe you could learn something valuable let us know if that worked|
I checked the build.sh, but could not find any line, where to set the window-manager, except those lines with the "variant" entry. This tag is added by me, when I build a live system. I am building with a script, I made myself:
----- snip -----
### Author Hans-J. Ullrich <email@example.com>
### License: GPL
### Set some variables, not active yet.
### architecture: i386, amd64, arm
### Distribution, you might not want to change it.
### Your preferred window-manager: lxde, kde, xfce, gnome
### Environmet for your local proxy
### language, keyboard, locales everything you might not need to change
BOOTAPP="boot=live hostname=uit-kali ignore_uuid locales=de_DE.UTF-8 keyboard-layouts=de keyboard-variants=nodeadkeys"
### Clean your system, not really necessarey, as the latter "./build.sh" does
### this either.
# lb clean
### VERY IMPORTANT: Make sure, apt-cacher is started, even, if you are sure,
### it is already running!
/etc/init.d/apt-cacher-ng stop && sleep 3 && /etc/init.d/apt-cacher-ng start
### set your needed environment and preparations.
### This command starts the actual build. All commands are in one line.
### However, this script might be improved, to use variables for better
### configuration possibilities.
# ./build.sh --arch $ARCH --distribution $DISTRO --variant $VARIANT --verbose -- --apt-http-proxy $PROXY
./build.sh --arch $ARCH --distribution $DISTRO --variant $VARIANT --verbose -- --apt-http-proxy $PROXY --bootappend-live "$BOOTAPP"
### these options can be used for further commands after build
### for example, if you want to burn a dvd, shutdown, whatever
### Examples for my personal needs below
### Suggestions for handling the built image.
# cp /home/username/live-build-config/images/*.iso /home/user/
# wodim /path_to_your_live_build/live-build-config/images/your_image_name.iso
### Some opportunities at unattended build run, what to do after the build succeeded.
# halt -p
# shutdown -h now
---- snap ------
As can be seen, I am using for the variant the term "lxde", so I expected LXDE as standard window-manger, not XFCE. This script worked most of the time, but some day something changed and kali-live is booting into XFCE. Is there soemthing wrong with my script???
||./build.sh --arch $ARCH --distribution $DISTRO --variant $VARIANT --verbose -- --apt-http-proxy $PROXY --bootappend-live "$BOOTAPP" in my opinion this line have mispell afer verbose -- apt-http-proxy not -- --apt-http-proxy maybe change value variant from lxde to xfce :) just kidding if this won't work try update kali using apt full-upgrade|
Does not work, the "--" before --apt-http-proxy is necessary, otherwise it does not build. Besides: This configration worked for years before!
Anyone else with ideas?
||maybe try build normally with xfce and after building process is complete just install lxde from repository|
Ok, now I tried several things.
First, according to this link
I created the directory /etc/skel in config/includes.chroot and put a custom .xsession in it for the default user. This did not work.
Second try, was to edit ./build.sh directly and do not use the tag "--variant lxde". Again no success.
Then I searched the whole downloaded git tree, to explore, how the user "kali" was created. I found the scripts and the hooks, but none of them showed me, how the default user was created (at least, maybe I did not see it)
It is also not clear for me, how the subdirectories in the home of user kali are created. Of course, in this home directory my .xsession from the /etc/skel was missing. However, I found my .xsession in /etc/skel, so any new added user would get it. But in the live-system I do not add new users!
So I guess, this is either a bug (because IMO setting the tag "--variant lxde" or any other variant) should set the default window manager to exactly that one.
Besides: This behaviour was exactly so in prior times, so something must have changed!
Due to this report should be changed to a higher level, as I believe it is defitely a bug.
||something is definitely not right i give you that because if you declaring variable --variant lxde then bash must execute her too in live-usb you can't add user AND after reboot and enter again in live usb there won't be that user you created because everything is written to RAM not physical disk at the end you're right this may be bug or your shell interpreting differently than it should|
Ok, things are now clear. To avoid mixes between different shells I made a last try.
As can be seen in my script, I am using "/bin/sh" in the shebang line, and ./build.sh is using "/bin/bash". Of course, one could get the idea, these two
do not work together. But as I said before: This worked before!
So, to eliminate this point of failure, I build the image completely manually, just the ./build.sh command and the whole rats tail addded (yes, also --variant lxde added).
If everything would work like expected, doing this way (and all possible interferences are in this case eliminated!) it should now start LXDE by default.
But it does NOT! So it is clearly a bug. So it would be nice, if that could be fixed by those, who created the git tree or the build.sh - in short, the developers.
For those, who need a workaround:
After the build is finished, you can extract the ISO-file by some tools (i.e. Acetoniso whatever).
Then extract the filesystem.squashfs into a directory (kali got tools for this in its repo)
Now enter the /home/kali of the extracted filesystem.squashfs and add a ".xsession"-file in it with the needed entries for the required window-manager (see the link in my posts before related to debian).
At last repack the filesystem.suashfs and copy it to the folder, where you unpacked the ISO, then repack the ISO again.
This should solve the problem, however it is a large effort and I would appreciate a faster and easier solution.
So please change this report from wishlist to bugreport, state normal.
Thanks for reading this and any help.
According to the following output in build.log
[2021-06-25 09:52:58] lb config -a amd64 --distribution kali-rolling -- --variant lxde --apt-http-proxy http://localhost:3142/ --bootappend-live boot=live hostname=kali ignore_uuid locales=de_DE.UTF-8 keyboard-layouts=de keyboard-variants=nodeadkeys
it is not very clear for me, what ./build.sh really does. Ok, I can set my variables here, after cleaning the old tree (lb clean --purge), it is starting lb config with my set variables, but according to line 187 in ./build.sh I there is a "--" before the command --variant. This looks weired for me, however, lb config does not know that command as the manual says.
Then, in line 289 you are using the entries of line 187 again (KERNEL_CONFIG_OPTS), and we are using still the "--" before the --variant. This looks weired for me.
As far as I know, it was possible in earlier times to use lb config and lb build with variables. In ./build.sh I can not see, where the variable --variant is given to lb build. On the other hand lb config does not know the tag --variant (according to the manual).
So, I would be happy, if someone could explain me, what I am reading wrong.
The other question is, why do we no more use the simple commands "lb config" and "lb build" like we did in earlier times and as it is recommended in the manual of live-build? What was the idea to change to ./build.sh?
Thanks for making things clearer for me!
Me again. I am still hasseling with this issue.
For testing purposes I am trying several things.
Sorry, I am not very good in scripting, but please allow me to share my thoughts though.
I believe, that there is a problem with the file "build.sh" or auto/config or live-build itself and want to try to explain.
In line 187 of build.sh you are setting the variables for lb config. Taking a closer look, and starting manually "lb config --help", I can not see
any switch named "variant". So I just tried to do some things manually.
1. lb config --architecture amd64 --variant lxde
Did not work, and telling "variant not known"
2. lb config --architecture amd64 -- --variant lxde
3. Tried lb config, then lb build, this started. But when I put these two commands in a bash script. it does not work. The reason for it, is, that of undefinetly reasons the command "lb config" is called again.
I also discovered, that the given tag "--variant lxde" (i.e. doing a command "./build.sh --arch amd64 --distribution kali-rolling --variant lxde") is going to overwritten by something. So that the actuual tag is "--variant default --variant lxde".
This causes the build fallback to default, and so it appears, that whatever I give at variant, always XFCE will be chosen and built, because this is the default(!)
And of course, then it will start XFCE at boot, what is NOT intended. This is the bug and this bugreport should be set to "normal" I suggest.
Still I can not say, what has been changed in the past. Suddenly my scripts did not work any more - after an upgrade of the git tree!
And as I do not know, what was changed there and when, it is difficult for me, to say, what really happened.
Hopefully I could bring a little more light into this issue.
Of course I read the documentations, but this did not really help.
Please feel free for more information.
Hi, I just tried to build a Kali Live ISO with the LXDE variant, and it works for me, I can't reproduce your problem.
I run the following command:
./build.sh --variant lxde --verbose
When I boot the iso, I land straigh on the LXDE desktop. See the screenshot attached.
I also checked whether XFCE was installed, and it is not. There are only a few utils from XFCE, but this is not the whole XFCE desktop, far from that.
┌──(root�kali)-[~] └─# dpkg -l | grep xfce ii libxfce4util-bin 4.16.0-1 amd64 tools for libxfce4util ii libxfce4util-common 4.16.0-1 all common files for libxfce4util ii libxfce4util7:amd64 4.16.0-1 amd64 Utility functions library for Xfce4
Screenshot from 2021-09-02 14-09-19.png (938,573 bytes)
I tried this too, but got no success. However, did you try this with XFCE installed, too? I want XFCE and LXDE to be installed, and I want LXDE to be started.
But when you say, this is working, I will try to build a new image without any XFCE. Just to see, if this is working.
Yes I built with LXDE only. That's what you get if you invoke the build script with --variant, like in "./build.sh --variant lxde --verbose". You'll get Kali built with ONE desktop environment and only one.
If you want XFCE + LXDE, I guess that you can for example build with one variant, and list additional packages to install into this variant.
For example, if you want to build with "--variant lxde", and install XFCE additionally, try this:
# list additional packages to install echo "xfce4" > kali-config/variant-lxde/package-lists/xfce.list.chroot # build ./build.sh --variant lxde --verbose
With this, you build the LXDE variant, and you also install the xfce4 package. "xfce4" is the metapackage that brings in all the XFCE desktop environment. I didn't try it myself. You could also use the metapackage "kali-desktop-xfce" instead of "xfce4" in the example above.
(edited for clarity)
|2021-06-07 10:11||vanguard||New Issue|
|2021-06-09 19:58||Michu||Note Added: 0014691|
|2021-06-10 19:08||vanguard||Note Added: 0014695|
|2021-06-11 15:31||Michu||Note Added: 0014699|
|2021-06-11 16:40||vanguard||Note Added: 0014705|
|2021-06-14 17:30||Michu||Note Added: 0014713|
|2021-06-20 07:31||vanguard||Note Added: 0014717|
|2021-06-20 16:42||Michu||Note Added: 0014718|
|2021-06-21 15:44||vanguard||Note Added: 0014719|
|2021-06-25 08:24||vanguard||Note Added: 0014852|
|2021-08-27 18:50||vanguard||Note Added: 0015047|
|2021-09-02 07:16||arnaudr||File Added: Screenshot from 2021-09-02 14-09-19.png|
|2021-09-02 07:16||arnaudr||Note Added: 0015071|
|2021-09-02 07:16||arnaudr||Note Edited: 0015071||View Revisions|
|2021-09-02 07:17||arnaudr||Note Edited: 0015071||View Revisions|
|2021-09-02 07:18||arnaudr||Note Edited: 0015071||View Revisions|
|2021-09-02 07:45||vanguard||Note Added: 0015072|
|2021-09-02 08:10||arnaudr||Note Added: 0015073|
|2021-09-02 09:35||arnaudr||Note Edited: 0015073||View Revisions|
|2021-09-13 21:10||g0tmi1k||Severity||feature => minor|
|2021-09-13 21:10||g0tmi1k||Priority||low => normal|