Sorry, I know this is a common question, but I couldn't find a solution for SliTaz specifically. I've remastered a SliTaz LiveCD and added my application to it, I then added a line in local.sh to run the application during boot. However, when the program attempts to execute, I get the message "Error: Unable to initialize gtk, is DISPLAY set properly?" I've tried setting DISPLAY and several other solutions, but most of them seem tailored to other distros. Does anyone have any idea how to solve this in SliTaz?
Alternatively, I noticed Openbox has an autostart applications function, but can't seem to find where on the LiveCD the config file is stored or generated from, I think that would also solve my issue. Thanks.
You can find access to Openbox's autostart config in 3 places: 1. "Red Spider Button"---> Preferences ---> Auto started applications 2. Right click the Desktop ---> Openbox ---> Autostart Script 3. Located at /home/username/.config/openbox/autostart.sh - replaces username with your username and also remember that files or folders starting with full stop are hidden by default.
The program that you want to run seems to require gtk, which means xorg needs to be running before you start it. It means either putting it just before slim in your boot scripts (could get messy) or adding it to Openbox's autostart script. Anyway, I hope the above helps :)
Thanks, that's just the sort of info I was looking for. I managed to track down where autostart.sh was hiding in the LiveCD and changed it and it came up fine. I would still be interested in knowing how to wrangle xorg into working if anyone else happens to know how.
The easiest way would probably probably try the following: 1. Open a terminal window and type leafpad myapp & (You can name it anything - myapp is just an example) 2. Write the following into the file: #!/bin/sh application-you-want-start & and save and exit 3. Back at the terminal type chmod +x myapp 4. Now type su and press enter/return 5. Enter your root password and press enter/return 6. Type cp -a myapp /etc/init.d/ and allow it to copy. Then close the terminal. 7. Now go to "Red Spider button" ---> System Tools ---> Control Box 8. Click on the Initialization tab and add myapp to the Run daemons box just before slim, so it looks something like this: dbus hald firewall myapp slim and click the Change next to it.
Now it should be set to boot just before slim does and right after xorg starts. I'm not sure if this method works, but it probably will. If it doesn't, it may mean having to mess with the boot scripts directly...
Why wrapping "application-you-want-start" in a "myapp" script rather than directly adding "application-you-want-start" in "Run daemons" box ? Is this a workaround for some problem ?
Erm, because Run Daemons runs the scripts in /etc/init.d/ and not the actual program? I guess you could just directly add it, but I don't know what kind of effect this will have.
Oh yeah I got it. :-] Do you think that a symbolic or hardlink of "application-you-want-start" in /etc/init.d/ would work ? (just to let my curiosity talk)