Is there a way to modify the startup?


#21

@Andras could you please open a terminal window and enter the following
cd $HOME/piper & ls -al
and send me a picture of the results


#22

pi@raspberrypi ~ $ cd HOME/piper pi@raspberrypi ~/piper ls -al
összesen 56
drwxr-sr-x 4 pi pi 4096 febr 26 18:51 .
drwxrwsr-x 4 root staff 4096 febr 26 18:51 …
-rw-r–r-- 1 pi pi 256 márc 12 14:10 edid.dat
drwxr-sr-x 22 pi pi 4096 febr 26 18:54 game
drwxr-sr-x 2 pi pi 4096 márc 12 14:10 logs
-rwxr-xr-x 1 pi pi 25774 aug 29 2018 README.md
-rwxr-xr-x 1 pi pi 7604 jan 15 21:18 start.py
pi@raspberrypi ~/piper $


#23

What version of Piper do you have? If you select the gear icon on the main menu, at the bottom left of the next window in small font you will see it.

And does your piper kit have a green speaker ball?

Edit: oops I see you said you were on 2.4.4 . Did you upgrade to get there or flash the SD card or was 2.4.4 already on the SD card?


#24

Indeed we have 2.4.4 and with the green speaker ball. I am not sure if this was the original or get it during an upgrade. The SD card I haven’t manually upgraded, if it got 2.4.4 during an upgrade it should have been only via the “UPDATE” function of the app itself. But I haven’t checked the original version when we unpacked the box in December.
Thanks


#25

Sorry this is taking so long but I’m trying to recreate your situation (and babysit grandkids :blush:)
Can you open the terminal window and just type ls -al. I’m looking for the listing of piper it should look like this:
lrwxrwxrwx 1 pi pi 30 Mar 13 23:02 piper -> /usr/local/games/piper/game/..


#26

Hi Paul, it is there: (edited, first version looked veird)

pi@raspberrypi ~ $ ls -al
összesen 424
drwxr-xr-x 36 pi pi 4096 márc 13 14:18 .
drwxr-xr-x 4 root root 4096 dec 25 14:14 .
-rw-r–r-- 1 pi pi 69 szept 24 2015 .asoundrc
-rw------- 1 pi pi 2359 márc 14 11:17 .bash_history
-rw-r–r-- 1 pi pi 220 szept 24 2015 .bash_logout
-rw-r–r-- 1 pi pi 3243 szept 24 2015 .bashrc
drwxr-xr-x 13 pi pi 4096 márc 2 22:38 .cache
drwx------ 8 pi pi 4096 dec 26 19:20 .claws-mail
drwx------ 25 pi pi 4096 márc 12 12:58 .config
drwx------ 3 pi pi 4096 szept 24 2015 .dbus
-rw-r–r-- 1 pi pi 233271 okt 6 2017 debug.txt

drwxr-xr-x 2 pi pi 4096 márc 12 12:48 Desktop
drwxr-xr-x 6 pi pi 4096 okt 5 2017 Documents
drwxr-xr-x 2 pi pi 4096 okt 5 2017 Downloads
drwx------ 3 pi pi 4096 dec 25 13:58 .gconf
-rw-r–r-- 1 pi pi 53 okt 19 2015 .gitconfig
drwx------ 3 pi pi 4096 dec 25 14:00 .gnupg
drwxr-xr-x 2 pi pi 4096 jan 5 10:35 .gstreamer-0.10
drwxr-xr-x 2 pi pi 4096 okt 19 2015 .idlerc
-rw------- 1 pi pi 49 okt 6 2017 .lesshst
drwx------ 3 pi pi 4096 okt 19 2015 .local
drwxr-xr-x 9 pi pi 4096 okt 20 2015 .Mathematica
drwxr-xr-x 3 pi pi 4096 okt 20 2015 .minecraft
drwxr-xr-x 2 pi pi 4096 szept 24 2015 Music
drwxr-xr-x 2 pi pi 4096 febr 16 09:15 .oracle_jre_usage
drwxr-xr-x 2 pi pi 4096 szept 24 2015 Pictures
lrwxrwxrwx 1 pi pi 30 dec 25 14:15 piper -> /usr/local/games/piper/game/…
drwxr-xr-x 6 pi pi 4096 dec 25 12:38 .piper.bak
drwxr-xr-x 3 pi pi 4096 okt 6 2017 piper-beta
lrwxrwxrwx 1 root root 26 dec 25 14:15 pipercode -> /usr/local/games/pipercode
drwxr-xr-x 11 pi pi 4096 okt 6 2017 .pipercode
lrwxrwxrwx 1 pi pi 9 okt 6 2017 pipermix -> pipercode
drwx------ 3 pi pi 4096 okt 6 2017 .pki
drwx------ 3 pi pi 4096 márc 12 11:53 .pp_backup
-rw-r–r-- 1 pi pi 675 szept 24 2015 .profile
drwxr-xr-x 2 pi pi 4096 szept 24 2015 Public
drwx------ 5 pi pi 4096 márc 12 11:46 .purple
drwxrwxr-x 2 pi pi 4096 jan 27 2015 python_games
-rwxrwxrwx 1 root root 134 márc 12 10:19 sample.py
drwxr-xr-x 3 pi pi 4096 júl 15 2016 .scratch
drwxr-xr-x 2 pi pi 4096 júl 15 2016 Scratch
-rwxr-xr-x 1 root root 56 márc 13 14:18 self-repair.sh
drwxr-xr-x 4 pi pi 4096 márc 2 21:37 .sonic-pi
drwxr-xr-x 2 pi pi 4096 szept 24 2015 Templates
drwxr-xr-x 2 pi pi 4096 dec 25 13:51 .themes
drwx------ 4 pi pi 4096 okt 16 2015 .thumbnails
drwxr-xr-x 2 pi pi 4096 szept 24 2015 Videos
drwxr-xr-x 3 pi pi 4096 okt 5 2017 .Wolfram
drwxr-xr-x 10 pi pi 4096 okt 5 2017 .WolframEngine
-rw------- 1 pi pi 56 márc 13 14:18 .Xauthority
-rw------- 1 pi pi 3944 márc 13 14:18 .xsession-errors
-rw------- 1 pi pi 3944 márc 13 14:18 .xsession-errors.old

pi@raspberrypi ~ $ ls -al | grep piper

lrwxrwxrwx 1 pi pi 30 dec 25 14:15 piper -> /usr/local/games/piper/game/…
drwxr-xr-x 6 pi pi 4096 dec 25 12:38 .piper.bak
drwxr-xr-x 3 pi pi 4096 okt 6 2017 piper-beta
lrwxrwxrwx 1 root root 26 dec 25 14:15 pipercode -> /usr/local/games/pipercode
drwxr-xr-x 11 pi pi 4096 okt 6 2017 .pipercode
lrwxrwxrwx 1 pi pi 9 okt 6 2017 pipermix -> pipercode
pi@raspberrypi ~ $


#27

@Andras - I still working on this and waiting for some feed back from the Piper Guys. For some reason, the files are different after the updates than a fresh install.

There is one other thing you could do - reflash the SD card using the latest image then apply the changes I mentioned above.


#28

I did as you suggested, reflashed a brand new SD card and applied your above described procedure. Everything was exactly as you described (/home/pi/piper/PiperLauncher was also there).

However it appearently did not stop piper from starting. After the first reboot, the application indeed did not start, but during the subsequent reboots, it did start every time. The changes are still there, but Piper starts during Pi start. Not sure why, I am also looking to find out the mechanism which starts it again and again.


#29

That’s strange…I flash my SD and test it again


#30

Paul, I could reproduce it flashing again the SD card, so strangely doing the above steps inhibit Piper starting only once then it starts during subsequent starts.

Slightly different topic but still related to this, if I flash a brand new image, is there a way to transfer the progress my son achieved in Piper story mode to the new Piper app?


#31

@Andras - I just flashed my sd card using the 2.2.4 image - followed the directions above and it will not boot into Piper no matter how many times (well 3 as of this post) I reboot. Are you sure you edited all 34 files and renamed Piper2 to Piper2m?

As for saving what has been done, you will have to cd /var/lib and copy everything that is in the piper directory then after reflashing, restore the file to that location.

I’m going to suggest to Piper that a backup/restore option be provided


#32

Thank you for sharing the way of restoring progress in Piper, I managed to restore what we achieved on the new SD card. I agree having a backup/restore feature is a great idea.

Regarding the automatic start of Piper, I know what happens here. After applying the above steps, you can reboot the box as many times as you want and Piper will not auto start as far as you do not manually start Piper. Once you manually start, it will execute a script (/home/pi/piper/game/boot_files/update_boot_files.sh) which copies the /home/pi/piper/game/boot_files/piperBoot.desktop file to /etc/xdg/autostart directory. Then the system during next reboot will automatically start the application defined by any files with .desktop extension here, so it will start the app defined in the piperBoot.desktop.
So the point here is to have something different defined in piperBoot.desktop file which is not matching the file name of the main start script (Piper2m in our above example)
Having Piper2m in piperBoot.desktop and renaming the main script from Piper2 to Piper2m is just the opposite of what we wanted to achieve.

I finally left the name of the main start script as Piper2 (under piper/game/boot_files) and put “Exec=sh /home/pi/piper/game/boot_files/do_not_start” into piperBoot.desktop. Then start Piper manually and this will be copied over to /etc/xdg/autostart and since “do_not_start” will not match Piper2, the app will not start.

However as in your example, it is important to have the correct script name in /home/pi/Desktop/piper.desktop as this defines the script to be called when user clicks on the icon on the desktop, so Piper stays manually startable.

Anyway cutting the long story short, it works now, thanks for you assistance!


#33

This is very odd because for me, the Piper does not auto start even after starting th game I

  1. made the coding changed
  2. reboot
  3. Piper doesn start so I manually click the desktop item to run Piper
  4. reboot
  5. Piper doesn start so I manually click the desktop item to run Piper
  6. reboot
  7. Piper doesn start so I manually click the desktop item to run Piper
    etc