1

I'm trying to make a live usb which runs an interactive shell script when booting. I'm using Ubuntu Customization Kit (uck), xubuntu-14.04.3-desktop-i386.iso and syslinux (in order uck can build final iso).

This interactive script read answers from command line and runs a graphical application, so xfce4 is one of the custom packages and the way I install my script is creating this file:

/home/xubuntu/.config/autostart/terminal.desktop

(xubuntu is the default user on live cd)

With the content:

[Desktop Entry]
Type=Application
Name=Terminal autoarranque
Exec=xfce4-terminal -e /usr/bin/myscriptfolder/myscript.sh
X-GNOME-Autostart-enabled=true

But as it is said in https://help.ubuntu.com/community/LiveCDCustomization,

"You cannot directly edit defaults for the live cd user (e.g., casper, ubuntu, or user) since that account is created at boot time"

So, I don't know how make the xfce terminal runs in order to launch the interactive script. If I do the former way, the next error appears when booting from usb:

Unable to load a failsafe session

Unable to determine failsaafe session name. Possible causes: xfconfd isn't running (D-Bus setup problem); environment variable $XDG_CONFIG_DIRS is set incorrectly (must include */etc*), or xfce4-session is installed incorrectly.

And if I create terminal.desktop on root folder, when Xubuntu starts, nothing happens as it is not the user session.

Any help please? Thanks a lot.

(if I test my script on an installed Xubuntu, it runs ok after login)

EDIT:

Is there any way to make the live-cd boots with a custom user?

1 Answer 1

0

Thanks to sixsixfive (https://forum.xfce.org/viewtopic.php?id=10029), I tried to create desktop file before xfce session starts (I did not know that 'on the fly' home directory of xubuntu user already exists at that point). So, if I add this to /etc/xdg/xfce4/xinitrc file, just before "xfce4-session" command, it works.

mkdir -p /home/xubuntu/.config/autostart
cat > /home/xubuntu/.config/autostart/terminal.desktop <<MYEOF
[Desktop Entry]
Type=Application
Name=Terminal autoarranque
Exec=xfce4-terminal -e /usr/bin/myscriptfolder/myscript.sh
X-GNOME-Autostart-enabled=true
MYEOF
sudo chmod 777 /home/xubuntu/.config/autostart/terminal.desktop

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .