Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: quixote_arg on July 05, 2018, 09:53:26 AM

Title: CorePlus as video player kiosk
Post by: quixote_arg on July 05, 2018, 09:53:26 AM
Hi,

For my kids public school (0 budget) I'm trying to recycle an old pc (circa 2005) with 512mb of RAM to work as a video player kiosk, i.e. the pc will play videos from a dir over and over again.

My idea is to have everything in a usb drive (no hdd at all on the pc).

I installed CorePlus on a USB and it works fine. I downloaded and installed VLC on demand and it also works fine, now I want to make things permanent.

I cannot get to install VLC on boot on the USB drive.

I click the Set button on the TCE field and select /mnt/sdb1 (the location of the usb drive). The TCE field now shows /mnt/sdb1/tce/optional

Then it installs vlc and it works fine, but if I reboot, then VLC is gone.

What am I doing wrong?

Thanks
Title: Re: CorePlus as video player kiosk
Post by: Rich on July 05, 2018, 10:04:35 AM
Hi quixote_arg
Click on the  Apps  icon. Then in the  Apps  utility click  Apps->Maintenance->OnDemand Maintenance  and select  VLC.  Click the
"Delete item from list"  buttton. No go to  Apps->Maintenance->OnBoot Maintenance  and select  VLC. Click the  "Add item"
button.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 05, 2018, 12:23:37 PM
Thanks Rich for your reply.

vlc.tcz is already on the OnBoot list

One thing I noticed is that if I try to do a backup to sdb1 then it shows "unable to mount device sdb1". Mount tool shows sdb in green (mounted?) and sdb1 in red (not mounted?)

If there's an easy way to install vlc (and it's dependencies) to the usb disk from outside tinycode (i.e. my main linux computer) then maybe that way is easier?

Any help will be much appreciated
Title: Re: CorePlus as video player kiosk
Post by: Misalf on July 05, 2018, 12:54:11 PM
Code: [Select]
URL="http://tinycorelinux.net/9.x/x86/tcz"
for i in $(wget -O - "$URL"/vlc.tcz.tree) ; do for j in "" .dep .md5.txt ; do wget "$URL"/"$i$j" ; done ; done
Change the URL variable according to the TinyCore version and architecture you're using.
Title: Re: CorePlus as video player kiosk
Post by: curaga on July 05, 2018, 01:00:09 PM
How did you install it? Having the main device mountable sounds weird. If you used a third-party installer (or dd?), please try the included installer.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 05, 2018, 01:07:55 PM
How did you install it? Having the main device mountable sounds weird. If you used a third-party installer (or dd?), please try the included installer.

Indeed... I used dd to burn the .iso file to the usb stick and boot with it. Not a good move?  ::)

I remember reading in the forums that it is possible to install on the same usb used to boot, is that the case?

Thanks
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 05, 2018, 01:10:20 PM
This thread (http://forum.tinycorelinux.net/index.php/topic,20135.msg125292.html) is the one I meant. Is this advisable?
Title: Re: CorePlus as video player kiosk
Post by: Rich on July 05, 2018, 01:33:38 PM
Hi quixote_arg
This thread (http://forum.tinycorelinux.net/index.php/topic,20135.msg125292.html) is the one I meant. Is this advisable?
Though I don't recall that particular thread, I have seen other references to using  dd  to copy the  ISO  file to a thumb drive. I have
however always been under the impression that this was to avoid burning an actual CD, with the intent being to boot the thumb
drive and using that to run the install program.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 05, 2018, 03:36:13 PM
So it seems that the whole problem was that I was using the live CorePlus without ever installing it. I used two USB drives (dd to usb1, boot, install to usb2) and now everything seems to be working fine.

Thanks!

Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 06, 2018, 09:15:05 AM
Follow up question:

Since the usb has 2 partitions (sdb1 for CorePlus, sdb2 for the videos to show), I have to mount /dev/sdb2 on boot. I added a line to /opt/bootlocal.sh
Code: [Select]
mount /dev/sdb2
This works but feels like it's not the proper way to do it, out of curiosity: is there a better way?
Title: Re: CorePlus as video player kiosk
Post by: Rich on July 06, 2018, 09:23:50 AM
Hi quixote_arg
Using  bootlocal.sh  for this is fine.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on July 06, 2018, 09:30:19 AM
Thanks all for the help!

With tiny core linux I managed to reuse a very old computer with 512mb of RAM to play videos, all from a USB drive. Fantastic!
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 19, 2018, 08:51:31 AM
Hi all!

Follow up on this thread. The old computer works great for playing (slightly reduced) videos.

I have one problem though. Sometimes I go to the school and find it like this:

(https://i.imgur.com/cSVWuFc.jpg)

At first I thought it was a screensaver (which I have disabled via xset), but after ~8 hours of it running fine displaying videos and that screen not showing up, I'm more inclined to think it's a crash.

Have you ever encountered this screen before? Know what it is?

thanks!
Title: Re: CorePlus as video player kiosk
Post by: Rich on August 19, 2018, 09:49:18 AM
Hi quixote_arg
Just speculation but I think either  X  or the desktop manager crashed. Possibly due to the  OOM-killer  (Out Of Memory) killing
a program to free up some RAM.
Title: Re: CorePlus as video player kiosk
Post by: curaga on August 19, 2018, 01:10:33 PM
That is the X logo, which does point to a screensaver. I don't ever recall seeing it on a screen like that though.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 20, 2018, 08:48:33 AM
That is the X logo, which does point to a screensaver. I don't ever recall seeing it on a screen like that though.

I thought that myself too, but me myself saw it running about 8 hours straight playing videos and that screen never showed up! So either it has a very long activation time or it's some kind of error... I'll keep you posted
Title: Re: CorePlus as video player kiosk
Post by: curaga on August 20, 2018, 12:54:36 PM
Could it have been a prank by a bypasser?
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 20, 2018, 04:12:51 PM
Could it have been a prank by a bypasser?

I don't think so, as the computer is only connected to the monitor. No keyboard, no mouse, no internet connection!
Title: Re: CorePlus as video player kiosk
Post by: Rich on August 20, 2018, 04:38:35 PM
Hi quixote_arg
If you're looking to try to track down why this is happening, plug in a keyboard next time this happens. Try  Ctrl-Alt-F1  to
switch to the console or  Ctrl-Alt-Backspace  to kill X and kick you into the console. If the machine responds to the
keyboard you should get the black console screen. You might have to hit the  Enter  key a couple of times to get the
prompt if you just see a flashing cursor. You can then enter:
Code: [Select]
dmesg > dmesg.txtThen check the file  dmesg,txt  to see if any errors cropped up, most likely near the end of the file.
Title: Re: CorePlus as video player kiosk
Post by: Nathan_SR on August 20, 2018, 09:18:20 PM

Hi quixote_arg

To keep track of the foreground gui application name, you can use the wmctrl or the xdotool command, on a regular basis, through a script.

The following articles explain the same in greater detail :

https://askubuntu.com/questions/21262/shell-command-to-bring-a-program-window-in-front-of-another

https://askubuntu.com/questions/728157/how-to-get-the-list-of-running-gui-applications-in-the-unity-launcher

https://superuser.com/questions/142945/bash-command-to-focus-a-specific-window

https://www.google.com/search?q=linux+foreground+gui+app+name

Regards,

Nathan SR
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 22, 2018, 01:52:36 PM
Hello all

Updates to this puzzle:

Today I went to the school at about 2pm and the screen was with the X on it. They told me they turned it on at about 9am so it's 5 hours later. I saw it playing videos 8 hours so the screensaver theory loses ground.

I plugged in a keyboard, and when I pressed CTRL (to press CTRL-ALT-F1) the X went away and vlc resumed playing videos! The screensaver theory makes a comeback!

I checked dmesg and saw nothing unusual, no error messages (unfortunately, I didn't take a pic of the screen, will do next time).

I rebooted the machine, and less than 10 minutes later, the X screen shows up again. Screensaver theory loses ground, once again  :-\

Apparently there's no screensaver program running, but there are a few libs that might do something screensaver related.

Code: [Select]
sudo find / | grep -i screens(https://i.imgur.com/u9ruNnr.jpg)

Code: [Select]
ps ax(https://i.imgur.com/AO3Mtv9.jpg)
Title: Re: CorePlus as video player kiosk
Post by: aus9 on August 23, 2018, 04:12:20 AM
Hi

Have you checked that you have disabled VLC screensaver function?
https://askubuntu.com/questions/69615/how-do-i-stop-the-screensaver-from-coming-on-during-vlc-movie-watching

^^ is GUI

or show the output to
Code: [Select]
cat .config/vlc/vlcrc | grep saver
so you are looking for
disable-screensaver=0

and there are some other suggestions in that link too
Title: Re: CorePlus as video player kiosk
Post by: curaga on August 23, 2018, 04:43:38 AM
The X server's built-in screensaver is controlled via xset.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 23, 2018, 08:44:10 AM
The X server's built-in screensaver is controlled via xset.

I added
Code: [Select]
xset s off -dpms to one of the startup files. On the other hand it's confusing because if it's a screensaver it should run at a deterministic timeout, but I saw it showing up in less than 10 minutes and also saw it not showing up in more than 7 hours
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 23, 2018, 08:44:55 AM
Have you checked that you have disabled VLC screensaver function?

I'll try this, thanks
Title: Re: CorePlus as video player kiosk
Post by: curaga on August 23, 2018, 01:09:30 PM
Perhaps it's applied at a bad time? Next time you have it happening, open up a shell and "xset q" to see what the screensaver values are.
Title: Re: CorePlus as video player kiosk
Post by: quixote_arg on August 23, 2018, 02:32:31 PM
I'll check that.

But if it is the case that the xset parameters are not propertly set up, then the screensaver should activate at roughly the same time, no? However the infamous screen showed up between 20 minutes and >8 hours
Title: Re: CorePlus as video player kiosk
Post by: Misalf on August 23, 2018, 10:59:58 PM
I have no idea. But if it's a screensaver thing and your xset config does not apply after a given amount of time, another program may be resetting things.
In case of MPlayer, this is useful or could be problematic if not used correctly:
$HOME/.mplayer/config
Code: [Select]
heartbeat-cmd="[ $DISPLAY ] && xset s reset &"
Title: Re: CorePlus as video player kiosk
Post by: Pats on August 24, 2018, 02:42:26 AM
Two posible options to disable screen savers : ...
1) Disable the power management setting for X. In a X terminal type :
 
Code: [Select]
xset -dpms
For persistancy of this setting xorg.conf is useful. :
Code: [Select]
 
Section
"Monitor"  Identifier  "Monitor1"   
Option "DPMS"  "false"
Section
"ServerFlags"   
Option "BlankTime" "0"

2)  If using xinit to start X session , then in .xinitrc file :
 
Code: [Select]
xset -dpms
3) Hardware problems :
Loose power cables , Damaged display card , loose RAM memory  plates  in  memory slots , monitor is about to die in near future !
Title: Re: CorePlus as video player kiosk
Post by: Rich on August 24, 2018, 06:57:13 AM
Hi quixote_arg
... I added
Code: [Select]
xset s off -dpmsto one of the startup files. ...
By  "one of the startup files"  I presume you are referring to  bootlocal.sh  or  bootsync.sh? If that's the case, place your  xset
command at the end of the  .xsession  file in your  home  directory instead.