0

I'm trying to set up a simple pc that basically boots, plays a training video that's saved in the base directory of the flash drive plugged into the pc, and that's it.

currently, I have a logon script set to run

sleep 5; totem --fullscreen /media/(username)/*asterisk*/*asterisk*.mp4

(specified where I placed asterisks because formatting turns them into italics)

which is just setup to wait a few seconds after boot to allow the pc to recognize the flash drive, then opens any .mp4 file located in any flash drive.

Is there any way to set this to open any video from multiple filetypes? I.E, open any .MP4/.MWV/ etc? (filetypes just for example - I'm not sure exactly what types they may end up using)

5
  • use xdg-open or gnome-open - personally xdg-open is probably best, see unix.stackexchange.com/questions/36380/…
    – Panther
    Feb 14, 2017 at 21:31
  • I'm no expert, so I could be very wrong, but what I'm trying to do is make the script run regardeless of what they plug into it, so if one time they plug in a usb with a .mp4, it'll run the video, OR, if they plug in a usb with a .wmv, it'll still run without changing the script at all. It looks like xdg-open just sets a preferred application - am I wrong and it can let me open whatever filetype I need?
    – james_D
    Feb 14, 2017 at 21:58
  • xdg-open /path/to/file will open the file in question with the default media player. Yes you can set thee defaults as well. See also askubuntu.com/questions/642511/…
    – Panther
    Feb 14, 2017 at 22:02
  • but how does that open a file with a varying file type? I need the script to be able to open anything, regardless of if the user supplies a .mp4 / .avi / .mov etc
    – james_D
    Feb 15, 2017 at 13:27
  • xdg-open /fpath/to/file.*
    – Panther
    Feb 15, 2017 at 17:01

0

You must log in to answer this question.

Browse other questions tagged .