Mouse pad option

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#16 by Ed_P » 01 Mar 2013, 00:46

Hi fanthom, thanks for the help. I made the changes you suggested but the script didn't execute when I booted. I didn't see any error msgs when booting but I wasn't running it in QEMU which is what I do to see the booting msgs and do screen prints.

Those msgs in the previous screen print about udev timeout were unusual. I don't recall seeing them before or know why they popped up then. This is what I saw before making the changes you suggested.

Image
Uploaded with ImageShack.us

I'm going to reboot in QEMU again to see if I see anything related to the changes. I'll let you know what shows.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#17 by Ed_P » 01 Mar 2013, 01:33

!!!!! This is what I see when booting in QEMU!!

Image
Uploaded with ImageShack.us

But not when I boot it live.

My Grub4DOS menu item(s).

Code: Select all

title Porteus 2.0\n 233MB\n Porteus-v2.0-i486.iso
map --heads=0 --sectors-per-track=0 /ISOs/Porteus-v2.0-i486.iso (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz from=/ISOs/Porteus-v2.0-i486.iso vga=791 autoexec=startx rootcopy=/mnt/sdb1/scripts changes=EXIT:/porteussave.dat  
initrd /boot/syslinux/initrd.xz

title Porteus 2.0 - sans changes=\n 233MB\n Porteus-v2.0-i486.iso \n Use to check space usage of porteus.dat file.
map --heads=0 --sectors-per-track=0 /ISOs/Porteus-v2.0-i486.iso (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz from=/ISOs/Porteus-v2.0-i486.iso vga=791 autoexec=startx rootcopy=/mnt/sdb1/scripts  
initrd /boot/syslinux/initrd.xz
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Mouse pad option

Post#18 by brokenman » 01 Mar 2013, 02:02

i still don't get why you are calling a second script from rc.local when the job (synclient commands) can be called from within rc.local. Or perhaps after the desktop loads from within /etc/xdg/autostart. No need to pass the ball around. I also see you are loading modules from the modules folder where it says "Additional modules have been found". Why not just put your rc.local file inside one of the additional modules?

Code: Select all

mkdir -p /tmp/dump/etc/rc.d
echo "synclient PalmDetect=1" >> /tmp/dump/etc/rc.d/rc.local
dir2xzm /tmp/dump /path/to/modules/folder/startstuff.xzm
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#19 by Ed_P » 01 Mar 2013, 02:25

@fanthom

There is no pause when booting the flash drive directly.

My Porteus changes.

Code: Select all

root@porteus:~# ls /mnt/sdb1/scripts/bin/
touchpad.sh*
root@porteus:~# cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

sh /bin/touchpad.sh
root@porteus:~# 
@brokenman

I assume at some point there will be another release of Porteus. And when that happens I want to be able to carry all my tweaks and customizations to the new release with as little effort as possible. Things that exist outside the ISO I can keep and simply relink to.

Whenever I have upgraded my Window systems it has taken me weeks and months to migrate all my changes over to the new systems, I would like to minimize that effort with Porteus. But maybe Porteus is like Windows and will be just as hard to upgrade with all changes manually integrated into each ISO, especially with my limited knowledge of Linux commands.

As for modules I have no idea where they came from let alone how to create one.

PS My synclient changes need more work, the cursor is still jumping around. :evil:

Code: Select all

synclient PalmDetect=1 PalmMinWidth=4
synclient RightEdge=5950 BottomEdge=5950
# https://stuffivelearned.org/doku.php?id=os:linux:general:synapticstouchtricks#digging_deeper_with_synclient
# http://guides.ianrenton.com/howto-linux-and-synaptics-touchpads-for-little-fingers/
# http://forum.porteus.org/viewtopic.php?f=81&t=1955&p=13313#p13313
# /etc/rc.d/rc.local
Ed

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mouse pad option

Post#20 by fanthom » 01 Mar 2013, 06:26

@EdP
i have an impression that /dev/sdb1 does no exist in qemu session.
that's why you are getting "touchpad.sh no such file" messages which are much confusing.

/dev/sdb1 does exist when you boot on real PC and touchpad.sh gets executed properly (it just does not do the job you would expect).

btw: "autoexec=startx" is no longer necessary so please remove it.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#21 by Ed_P » 01 Mar 2013, 07:00

fanthom wrote:@EdP
i have an impression that /dev/sdb1 does no exist in qemu session.
I get the same error with /mtn/sdb1/ and I can access /mnt/sdb1/ once Porteus is up under QEMU.
/dev/sdb1 does exist when you boot on real PC and touchpad.sh gets executed properly (it just does not do the job you would expect).
I'm expecting it to set synclient parm values and I don't see that that has happened after I boot. When I manually execute the script the values change.
btw: "autoexec=startx" is no longer necessary so please remove it.
Done. Thanks.

BTW What does the expression ~/.config/autostart mean? I suspect the ~ refers to a common path but what about the /.?
Ed

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mouse pad option

Post#22 by fanthom » 01 Mar 2013, 08:55

I get the same error with /mtn/sdb1/ and I can access /mnt/sdb1/ once Porteus is up under QEMU.
please boot porteus in qemu then show me output of 'lspci -knn'
What does the expression ~/.config/autostart mean?
'~' means home diectory '.config' is a hidden folder the rest is normal path.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#23 by Ed_P » 02 Mar 2013, 06:16

fanthom wrote:you are booting from ISO image so please put your script into /mnt/sdb1/scripts/bin folder and boot with 'rootcopy=/mnt/sdb1/scripts' cheatcode so it will be coped directly to aufs.
your custom rc.local should contain following command:

Code: Select all

sh /bin/touchpad.sh
When I use the rootcopy cheatcode I get this.

Image
Uploaded with ImageShack.us
fanthom wrote:btw: "autoexec=startx" is no longer necessary so please remove it.
When I don't use the autoexec cheatcode I get this.

Image
Uploaded with ImageShack.us

At this point rootcopy is out and autoexec is back in.
fanthom wrote:please boot porteus in qemu then show me output of 'lspci -knn'
Please note that while Porteus boots quickly natively, in QEMU it is horrendously slow. At least an hr. If I'm awake when it finally comes up and I get terminal mode open I will edit this post and include the output below.

-update-

crap! crap!! CRAP!!!

I finally got the system up, got Xterminal up, executed your command, saved the output to a txt file, copied the txt file to the USB drive and signed off of Porteus. But when I look at the files on the USB drive under Windows the lspci.txt file ISN'T THERE!!! :wall: :wall: :wall: :wall:

If anything good came out of this I did notice that the USB drive in QEMU is sda1 rather than sdb1 when booted live.

I'll try tomorrow. :x
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#24 by Ed_P » 02 Mar 2013, 15:33

Not the format you were expecting I'm sure but at least this time you can see it.

Image
Uploaded with ImageShack.us

And I thought this might be worth showing also.

Image
Uploaded with ImageShack.us

So, where and what to do to run my stupid script? And I don't care if it doesn't run or is found in QEMU!! :oops:
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Mouse pad option

Post#25 by brokenman » 02 Mar 2013, 20:59

As for modules I have no idea where they came from let alone how to create one.
Modules are any files that end in .xzm and in the last post i left instructions for how to create one. Porteus is 'modular' by nature and this is one of it's greatest strengths. To upgrade you could simply drop your 'changes' module into the new upgrade in the 'modules' folder or use the extramod= cheatcode to point to it. Depending on your changes you should have no problem.

After the list of base module in the screenshot (001-core.xzm, 002-xorg.xzm etc) i see a file in yellow called 'changes' which is being loaded. This should have the .xzm suffix. I would like to see the contents of this changes module.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mouse pad option

Post#26 by fanthom » 02 Mar 2013, 21:29

@EdP
did you ever create a /mnt/sda1/scripts folder in qemu virtual session? did you ever put you script there?
if yes then you must use 'rootcopy=/mnt/sda1/scripts' chatcode instead of 'rootcopy=/mnt/sdb1/scripts' as it looks to me that /dev/sdb drive does not exist in virtual session.
if you are not sure about drive naming then 'rootcopy=/scripts' will also be ok as booting script will find it itself.


from my point of view it would be easiest if you could remaster porteus ISO and put your script inside the module (as suggested by brokenman) or in /porteus/rootcopy folder (and do not use 'rootcopy=' cheatcode then).

before you start doing anything please read following docs:
link
link2
link3

@brokenman
'changes' module appears when you are booting with 'changes=EXIT:' cheatcode as destination point must be treated as normal module (read-only) if we want to perform writes only during shutdown.
i know it may sound weird but it has to be like that.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#27 by Ed_P » 02 Mar 2013, 22:03

fanthom wrote:@EdP
did you ever create a /mnt/sda1/scripts folder in qemu virtual session? did you ever put you script there?
if yes then you must use 'rootcopy=/mnt/sda1/scripts' chatcode instead of 'rootcopy=/mnt/sdb1/scripts' as it looks to me that /dev/sdb drive does not exist in virtual session.
if you are not sure about drive naming then 'rootcopy=/scripts' will also be ok as booting script will find it itself.
Yes I had a /scripts/bin folder on the USB drive so it was there regardless of the drive designation that Porteus assigned to it. But do note I rarely use QEMU except to try and catch booting problems. Porteus, like several other apps, are WAY TOO SLOW to use effectively run that way. As noted previously it takes over an hour to just boot Porteus and it doesn't have an online connection under QEMU.

However, your last comment tweaked my interest. It may explain the script problem not executing, I should put it in the root of the USB drive and reference it WITHOUT a path setting. /touchpad.sh rather than /mnt/sdb1/script/bin/touchpad.sc or whatever. Or would /script/bin/touchpad.sh work? I'm referring to the rc.local file's entry for it.
from my point of view it would be easiest if you could remaster porteus ISO and put your script inside the module (as suggested by brokenman) or in /porteus/rootcopy folder (and do not use 'rootcopy=' cheatcode then).
I'm not disagreeing with your view at this point. I assumed working with this would be a challenge for me with my limited/non-existent Linux knowledge. I wasn't planning on it being hard for Portues also.
before you start doing anything please read following docs:
link
link2
link3
I have read those links. A couple of times. :D But most seem to be are based on an install of Porteus verses an ISO approach.
@brokenman
'changes' module appears when you are booting with 'changes=EXIT:' cheatcode as destination point must be treated as normal module (read-only) if we want to perform writes only during shutdown.
i know it may sound weird but it has to be like that.
Thank you for answering brokenman's question because I was going to ask him how to find it so I could see what was in it also. :D

-edit-

etc/rc.d/rc.local

Code: Select all

root@porteus:~# cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

sh /touchpad.sh
Boot msg

Code: Select all

sh /touchpad.sh  no such file or directory

Code: Select all

root@porteus:~# ls /mnt/sdb1/
!QEMU_USB_booter.cmd*  ISOs/               autorun.inf*        ntldr*
!Rebuild.cmd*          PorteusNotes.txt*        beep.txt*             porteussave.dat*
Autorun/                   PswdsISOsWiFi.txt*     boot.ini*             scripts/
Boot/                        QEMU/                         grldr*                 touchpad.sh*     <--------------------
CD2ISO/                   Splashimages/             menu.lst*
Contig/                      Temp/                          ntdetect.com*
:cry:
Ed

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mouse pad option

Post#28 by fanthom » 03 Mar 2013, 02:39

@EdP
only linuxrc is smart enough to search for file/folder on all devices.
in case of rc.local you have to give a full path.

i'm 100% sure that this time it will work. please save following code as as /mnt/sdb1/test.sh

Code: Select all

#!/bin/sh
echo -en "fanthom is master of everything\npress enter if you agree (if you do not do it then booting wont continue)"
read
and launch it from rc.local:

Code: Select all

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

sh /mnt/sdb1/test.sh
now reboot and check if script is found during boot.

btw: save this file from linux and not Windows (formatting incompatibility).
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#29 by Ed_P » 03 Mar 2013, 04:09

Are you serious!!! Image It worked!! Image

So why doesn't it find mine? :cry: My script works when I manually execute it. Image

touchpad.sh

Code: Select all

synclient PalmDetect=1 PalmMinWidth=4
synclient RightEdge=5950 BottomEdge=5950
synclient FingerLow=44 FingerHigh=45
synclient MinSpeed=.2
# https://stuffivelearned.org/doku.php?id=os:linux:general:synapticstouchtricks#digging_deeper_with_synclient
# http://guides.ianrenton.com/howto-linux-and-synaptics-touchpads-for-little-fingers/
# http://www.yeap.de/blog2.0/archives/84-Configuring-the-Synaptics-Touchpad.html
# http://forum.porteus.org/viewtopic.php?f=81&t=1955&p=13313#p13313
# http://ubuntuforums.org/showthread.php?t=1855689
# /etc/rc.d/rc.local
Works as far as changing values, not that it is stopping the stupid cursor jumping.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Mouse pad option

Post#30 by Ed_P » 03 Mar 2013, 05:01

Ok, so I tweak my script a bit.

touchpad.sh

Code: Select all

#!/bin/sh
# /etc/rc.d/rc.local
synclient PalmDetect=1 PalmMinWidth=4
synclient RightEdge=5950 BottomEdge=5950
synclient FingerLow=44 FingerHigh=45
synclient MinSpeed=.2
# https://stuffivelearned.org/doku.php?id=os:linux:general:synapticstouchtricks#digging_deeper_with_synclient
# http://guides.ianrenton.com/howto-linux-and-synaptics-touchpads-for-little-fingers/
# http://www.yeap.de/blog2.0/archives/84-Configuring-the-Synaptics-Touchpad.html
# http://forum.porteus.org/viewtopic.php?f=81&t=1955&p=13313#p13313
# http://ubuntuforums.org/showthread.php?t=1855689
And when I RIGHT click on it, in /mnt/sdb1/, and click on Execute, I get the following screen:

Image
Uploaded with ImageShack.us


HOW can this be????? :%)
Ed

Post Reply