This is the old SliTaz forum - Please use the main

xorg problems and /etc/init.d/
  • erniaernia March 2010
    I'm using slitaz installed as liveusb and i had some X issues booting on different machines.
    I think that these were due to the if at line 75 of /etc/init.d/ (it's commented here):
    # Xorg auto configuration.
    #if [ ! -s /etc/X11/xorg.conf -a -x /usr/bin/Xorg ]; then
    echo "Configuring Xorg..."
    # $HOME is not yet set.
    Xorg -configure
    mv -f /root/ /etc/X11/xorg.conf
    sed -i 's|/usr/bin/Xvesa|/usr/bin/Xorg|' /etc/slim.conf
    sed -i s/"^xserver_arguments"/'\#xserver_arguments'/ /etc/slim.conf
    tazx config-xorg

    if i've saved my rootfs in a machine and try to boot in another machine /etc/x11/xorg.conf exists, but this does not mean that it is good for the machine i'm booting in.
    i got the problem tryng to but in my nvidia pc and in virtualbox.
    commenting the if out let me boot well in both the systems.
    could worth to put this change in the official
  • mojomojo March 2010
    Create a new slitaz-cooking with xorg usb key, bootup, make the change, delete the existing /etc/X11/xorg.conf ,writefs to save.

    Now boot again and see if you can get into X as if you really are a linux newb.

    You have no knowledge of Xorg -configure , are you stuck at black screen ?

    Try slitaz-2.0.iso with xvesa , with same video card,monitor the settings likely would work for both. video on slitaz-2.0 xvesa only

    # Screen size config for slim/Xvesa (last config dialog before login).
    if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
    # $HOME is not yet set.
    if grep -q "xarg=*" /proc/cmdline; then
    # Add an extra argument to xserver_arguments (xarg=-2button)
    XARG=`cat /proc/cmdline | sed 's/.*xarg=\([^ ]*\).*/\1/'`
    sed -i "s|-screen|$XARG -screen|" /etc/slim.conf
    if grep -q "screen=*" /proc/cmdline; then
    export NEW_SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
    if [ "$NEW_SCREEN" = "text" ]; then
    echo -n "Disabling X login manager: slim..."
    sed -i s/'slim'/''/ /etc/rcS.conf
    tazx `cat /etc/X11/wm.default`
    tazx `cat /etc/X11/wm.default`

  • erniaernia March 2010
    I wrote "commenting the if out let me boot well in both the systems".

    If i don't get it wrong the if i've commented out check if you don't have /etc/X11/xorg.conf and if you have xorg. Then , if both the conditions are true, it creates /etc/X11/xorg.conf, substitutes /usr/bin/Xvesa with /usr/bin/Xorg in /etc/slim.conf to tell slim to use Xorg instead of xvesa (for who's changing from xvesa to xorg), comments out the xserver_arguments line in /etc/slim.conf then call tazx with the "config-xorg" options which take the necessary steps to end the X configuration.
    IMHO nothing happens if you have a wrong xorg.conf and are using xorg.
    I did not worry about xvesa because i'm using cooking that has Xorg by default, maybe the better way to modify (as usual if i'm not wrong) would be
     if [ -x /usr/bin/Xorg ]; then

    that makes xorg reconfigured everytime you boot only if you have xorg installed
  • LuXLuX March 2010
    Hello Ernia,

    * Ernia wrote:
    if i've saved my rootfs in a machine and try to boot in another machine /etc/x11/xorg.conf exists, but this does not mean that it is good for the machine i'm booting in.

    I think that you're right, the raison d'être of the if/fi condition that you found is to forbid Slitaz to re-cconfigure Xorg if Xorg is installed and the system contains a config file for it. But is this really a bug in Slitaz? I don't think so. It seems to me that it is a normal behaviour when a system runs a program and finds a config file for it to use it instead of re-creating it. This is valid for Xorg too, since not everybody has a traveling usage of Slitaz like you (a live system can be used simply for seek of reactivity, but always on the same computer).

    On the other hand you know that this particular config file is not good to keep in your system for your traveling usage. So my opinion is that you should have removed your xorg.conf from /etc before you created your own rootfs. That way, the xorg.conf file would not have been included in your rootfs, hence the if/fi condition would have ensure that xorg.conf is re-created at every boot from this rootfs, as you wish.

  • erniaernia March 2010
    Ok, you are right. Currently i've installed xorg-xf86-input-evdev, deleted /etc/X11/xorg.conf and commented out all of the stuff relative to xorg in /etc/init.d/, so xorg reconfigures itself without xorg.conf everytime i boot. i just need a place in my home directory where to put "setxkbmap it" instead of typing it everytime, or to change the hal rule relative to the keyboard, if it exists, when i will have the time to check.
    i want to use slitaz as a rescue usb tool, so i need X in different machines.
    it's not a problem to me changing some init script (if i can understand where to put my hands), but maybe someone lesser prone to dig into slitaz would be discouraged from that. rerunning the X configuration at every boot does not take so much time, i think.

  • erniaernia March 2010
    just a question:
    is there any good reason to make not to parse xarg= boot options and comments out the "xserver_arguments=" in /etc/slim.conf if i use xorg?
    this makes impossible to add the "-nolisten tcp" as a boot option and as a xserver_arguments in /etc/slim.conf too.
    as a result you have xorg listen on tcp port 6000, which in my opinion is a security hole.
  • erniaernia March 2010
    if someone should be interested, in the end i got Xorg correctly configured removing /etc/X11/xorg.conf, commenting out all of /etc/init.d/ concerning xorg configuration, edited /etc/slim.conf to add the -nolisten tcp option, installed xorg-xf86-input-evdev, copied /usr/share/hal/fdi/policy/10svendor/10-keymap.fdi to /etc/hal/fdi/policy/ and edited it to have the it layout (changed us in it). this way i have no /etc/X11/xorg.conf and Xorg reconfigure itself everytime i boot keeping it keyboard layout. i think this is the best solution for those interested to use slitaz as liveusb booting in different machines.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social