No it certainly shouldn't be this difficult. In fact after recreating your same scenario i just can't get it to fail. Your bootline has autoexec=startx which is booting you directly into root. I suggest removing this but in any case i just recreated you situation annd it worked fine. Here is exactly what i did.
At the Porteus boot menu i pressed TAB and my boot line has the following:
quiet rw from=/mnt/sda4/porteus.iso autoexec=startx
This logs me in as root and i did the following in a console.
Code: Select all
root@porteus:~# leafpad /mnt/sda6/dump/touchpad.sh
In this script i put one single line (after the #!/bin/bash)
echo "This works!" > /tmp/output.tmp
I then saved the file and closed it. Then continued.
Code: Select all
root@porteus:~# chmod +x /mnt/sda6/dump/touchpad.sh
root@porteus:~# sh /mnt/sda6/dump/touchpad.sh
I tested to make sure the script runs
Code: Select all
root@porteus:~# cat /tmp/output.tmp
This works
root@porteus:~# rm /tmp/output.tmp
Now i go to the menu click on Preferences/Razor-qt settings/Razor Session configurator.
Click 'autostart' then click 'add'.
In the name i put 'synclient'
In the command i put 'sh /mnt/sda6/dump/touchpad.sh'
I checked the box to wait for the system tray then clicked ok. This created the file /root/.config/autostart/synclient.desktop
Now i want to make a module that will load at boot.
Code: Select all
root@porteus:~# mkdir /tmp/mymodule
root@porteus:~# cp -a --parents /root/.config/autostart/synclient.desktop /tmp/mymodule/
root@porteus:~# dir2xzm /tmp/mymodule/ /tmp/mymodule.xzm && rm -rf /tmp/mymodule
Now i create a folder that i can put all the modules i want to load at boot.
Code: Select all
root@porteus:~# mkdir /mnt/sda6/dump/mymodules
root@porteus:~# mv /tmp/mymodule.xzm /mnt/sda6/dump/mymodules
Now on the next boot i added one more thing to my boot line. Press TAB during boot and then my boot line is the same as before except i added:
After booting i found that the script had run because there was a file at /tmp/output.tmp with the words "This works!" inside.
------------
So please try EXACTLY as i did above (substituting paths for your own) and let me know how it goes.
PS: Today i learned that 32bit can boot directly to root if you add autoexec=startx. I don't recommend this, i think you should be removing this line and booting directly into guest ... or even better ... create a porteus USB drive to test all this stuff.