View Issue Details

IDProjectCategoryView StatusLast Update
0007214Kali LinuxFeature Requestspublic2022-02-22 07:59
Reportervanguard Assigned ToGamb1t  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionreopened 
Product Version2021.2 
Summary0007214: Kali live-build should start into wanted window-manager
Description

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

Best

Hans

Attached Files

Activities

Michu

Michu

2021-06-09 19:58

reporter   ~0014691

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

vanguard

vanguard

2021-06-10 19:08

reporter   ~0014695

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

#!/bin/sh

Author Hans-J. Ullrich <[email protected]>

License: GPL

Set some variables, not active yet.

architecture: i386, amd64, arm

ARCH=i386

Distribution, you might not want to change it.

DISTRO=kali-rolling

Your preferred window-manager: lxde, kde, xfce, gnome

VARIANT=lxde

Environmet for your local proxy

PROXY=http://localhost:3142/

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.

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.

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

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

Hans

Michu

Michu

2021-06-11 15:31

reporter   ~0014699

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

vanguard

vanguard

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?

Michu

Michu

2021-06-14 17:30

reporter   ~0014713

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

vanguard

vanguard

2021-06-20 07:31

reporter   ~0014717

Ok, now I tried several things.
First, according to this link
https://live-team.pages.debian.net/live-manual/html/live-manual/examples.en.html
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.

Michu

Michu

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

vanguard

vanguard

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

Best regards

Hans

vanguard

vanguard

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

Best regards

Hans

vanguard

vanguard

2021-08-27 18:50

reporter   ~0015047

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

  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.

Best

Hans

arnaudr

arnaudr

2021-09-02 07:16

manager   ~0015071

Last edited: 2021-09-02 07:18

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:

<pre>
./build.sh --variant lxde --verbose
</pre>

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.

<pre>
┌──(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
</pre>

vanguard

vanguard

2021-09-02 07:45

reporter   ~0015072

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.

arnaudr

arnaudr

2021-09-02 08:10

manager   ~0015073

Last edited: 2021-09-02 09:35

Yes I built with LXDE only. That's what you get if you invoke the build script with <em>--variant</em>, like in "<em>./build.sh --variant lxde --verbose</em>". You'll get Kali built with ONE desktop environment and only one.

If you want XFCE + LXDE, I <em>guess</em> 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 "<em>--variant lxde</em>", and install XFCE additionally, try this:

<pre>

list additional packages to install

echo "xfce4" > kali-config/variant-lxde/package-lists/xfce.list.chroot

build

./build.sh --variant lxde --verbose
</pre>

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)

Gamb1t

Gamb1t

2022-02-16 19:36

manager   ~0015755

This report has been filed against an old version of Kali. We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux (https://www.kali.org/get-kali/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing, and also give information about your setup?
For more information, please read: https://www.kali.org/docs/community/submitting-issues-kali-bug-tracker/

vanguard

vanguard

2022-02-18 18:22

reporter   ~0015768

Sorry to distuurbe you again. But this bug is still in the latest kali version.

Maybe you can help. I searched for the entry, where the "default" windowmanager is set. As lightdm is starting the "default" windowmanager,
this default must be defined somewhere. I believe, it is set during the build process, but I am not sure.

If I would know, where ./build.sh is setting its variables, which are preset by the "--variant lxde" at build start, I could check if it is done correctly.

As I said: I am building in the latest kali version, and the packages are freshly downlaoded (so no cached files). I believe, this is a bug (I admit, a little bug), but
it would be nice, if this can be fixed.

The problem is just a knowledge thing, because I do not know exactly, where I have to look at.

Thanks for reading this.

Best regards

Hans

arnaudr

arnaudr

2022-02-22 07:58

manager   ~0015790

I think we can close this issue really.

By default, Kali Linux comes with XFCE. We also provide a build scripts + documentation to make it easy to build Kali iso with other desktop environments, like LXDE. And it works, as tested above.

If you want to have more than that, eg. a Kali image with two desktops pre-installed, that's fine, but we can't support you on this journey. Instead you should seek for the help of the community on https://forums.kali.org/ or on IRC #kali-linux on irc.oftc.net). Here is not the place, we don't have the manpower to provide support, sorry.

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
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
2021-09-02 07:17 arnaudr Note Edited: 0015071
2021-09-02 07:18 arnaudr Note Edited: 0015071
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
2021-09-13 21:10 g0tmi1k Severity feature => minor
2021-09-13 21:10 g0tmi1k Priority low => normal
2022-02-16 19:36 Gamb1t Assigned To => Gamb1t
2022-02-16 19:36 Gamb1t Status new => closed
2022-02-16 19:36 Gamb1t Resolution open => won't fix
2022-02-16 19:36 Gamb1t Note Added: 0015755
2022-02-18 18:22 vanguard Status closed => feedback
2022-02-18 18:22 vanguard Resolution won't fix => reopened
2022-02-18 18:22 vanguard Note Added: 0015768
2022-02-22 07:58 arnaudr Note Added: 0015790
2022-02-22 07:59 arnaudr Status feedback => closed