View Issue Details

IDProjectCategoryView StatusLast Update
0007214Kali Linux[All Projects] Feature Requestspublic2021-06-25 08:24
Reportervanguard Assigned To 
Status newResolutionopen 
Product Version2021.2 
Target VersionFixed in Version 
Summary0007214: Kali live-build should start into wanted window-manager
DescriptionDear maintainers,

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, 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 ./, so that it will start LXDE by default?

Thank you very much for any informations and thanks for all the great work.





2021-06-09 19:58

reporter   ~0014691

in 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


2021-06-10 19:08

reporter   ~0014695

I checked the, 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 <>
### 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 "./" 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.
export http_proxy=http://localhost:3142/
lb config

### 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.
# ./ --arch $ARCH --distribution $DISTRO --variant $VARIANT --verbose -- --apt-http-proxy $PROXY
./ --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
#/etc/init.d/apt-cacher-ng stop

### 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
# reboot
# 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???

Best regards



2021-06-11 15:31

reporter   ~0014699

./ --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


2021-06-11 16:40

reporter   ~0014705

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?


2021-06-14 17:30

reporter   ~0014713

maybe try build normally with xfce and after building process is complete just install lxde from repository


2021-06-20 07:31

reporter   ~0014717

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 ./ 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.


2021-06-20 16:42

reporter   ~0014718

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


2021-06-21 15:44

reporter   ~0014719

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 ./ 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 ./ 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 - 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.

Best regards



2021-06-25 08:24

reporter   ~0014852

Hi again,
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 ./ 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 ./ 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 ./ 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 ./

Thanks for making things clearer for me!

Best regards


Issue History

Date Modified Username Field Change
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