IgnorantGuru's Blog

Linux software, news, and tips

Introducing SpaceTV – A New SpaceFM Plugin For Home Theaters

I recently discovered the mpv video player, which is an actively developed and feature-rich fork of the mplayer/mplayer2 video players. They’ve cleaned up a lot of code and added some nice options (see the differences).

What especially caught my interest is mpv’s ability to automatically save resume points for videos, so the next time you play that video, it plays where you left off, and it also restores the mpv volume and other settings used. Because of this, I have dropped use of my old mplayerstart script, which added resume functions to mplayer.

Like mplayer, mpv does not include a GUI, though it does include a new on-screen control panel. It’s the kind of video player that you control with command line options, usually run in fullscreen, and largely control with key shortcuts. This makes for a great HTPC video player that can be adjusted to operate exactly as you want.

IG SpaceTV plugin for SpaceFM
Toward this end, I have created a new plugin for SpaceFM which aims to turn SpaceFM into a simple media center. The plugin basically makes SpaceFM act as mpv’s GUI for selecting videos, and extends mpv’s resume abilities.

The basic idea is that when you open any video file in SpaceFM, the video immediately plays in fullscreen mode. If you played the video previously and didn’t finish it, it will automatically resume where you left off. mpv also remembers volume and other settings on a per video basis. Plus, you can resume the last video you had been playing (without navigating to it), play prior videos stepping backwards, or browse unfinished videos. You can also set mpv options within SpaceFM, and can play a given video with different options.

Of course there are many other ways to create similar behavior in SpaceFM, but I think mpv provides a great base for this. This plugin is fairly simple, and is intended as a starting point for building and customizing your HTPC (or any media PC). It also shows good examples for how to show simple dialogs, and other features of SpaceFM custom commands. One advantage to using a single script to play all videos is that you can customize this script, allowing it to use special options for some file types, etc.

In addition, the spacetv.sh script can be used independently of SpaceFM to extend mpv’s resume abilities – it only requires mpv. Normally mpv doesn’t remember the names of recently played videos, so it can’t resume the last video you played unless you navigate to it and open it again. With this script, names are remembered so you can resume the last video, or step through prior videos.

I strongly recommend reading the README file to get the most out of this plugin. It works best if set as an opener for all video files (so it’s automatic rather than needing to select it in a menu), and system-wide key shortcuts for Resume Last, etc. are recommended there. To get started visit IG SpaceTV Plugin.

January 19, 2014 Posted by | Scripts, Software | 1 Comment

My SpaceFM Plugins Repo

I have created a new github repo for my own SpaceFM plugins in an effort to make them reasonable to share and maintain. Note that this repo only contains plugins that I personally maintain. As always you can find a list of all plugins at the larger public SpaceFM Plugins Wiki.

Currently I have only one plugin there, my IG Burn Tools plugin, which I updated this morning. I’ve burned on a lot of discs with this plugin already and it works great for me. It’s simple so probably not everyone’s cup of tea, but it also demonstrates some more advanced uses of SpaceFM Dialog. I have also added more screenshots.

The github repo method is convenient for a number of reasons. You can watch the repo or subscribe to the feed to receive notifications of changes to any of my (currently one) plugins. You can also review the commits to see exactly what changes were made, and can access older versions of any plugin or file by going back into the git history.

From a maintenance perspective, github (which is free) provides a number of advantages. For example, it includes a wiki and a bug tracker, and it’s integrity checking helps avoid malicious activity. github can also host a homepage for the repo, or you can use the wiki (which can be publicly editable or locked). If you share SpaceFM plugins, you might want to consider this approach.

I setup a single “spacefm-plugins” repo for all my plugins, creating a subdirectory for each. Within each plugin’s subdirectory I added pkg and src directories. The pkg directory contains the current tar.gz plugin file (plus a signature file) for download. The src directory contains the extracted contents of the plugin file (so git can track changes within the plugin, and the contents can be browsed on github).

When I update a plugin, I export it as usual in SpaceFM, saving it directly to the pkg directory, replacing the older version. I then extract it to the src directory (I made a little custom command to do this), replacing the current contents. Then I review the ‘git diff’, commit the changes and push them. People watching the repo receive notification and can review the changes. For example, here are the changes I made this morning to the Burn Tools plugin for version 0.6.

All in all I think this is a very convenient approach, which should allow me to share lots of little plugins with a minimum of hassle as time goes on. But one is a start.

February 15, 2013 Posted by | Scripts | 5 Comments

Burn Tools – SpaceFM Plugin

A beta version of my Burn Tools plugin is now available. This turns SpaceFM into a limited burning app, and can also be extended to include additional options, modified burn commands, etc. The idea is that I did the coding on the GUI part, so now it should be easier to use that as a base for customizing.

At present, it burns single session discs only. It makes the filesystem image first, and if all goes well, then burns it. This takes more time than the one step approach, but I find it less likely to create coasters. Maybe at some point some xorriso or growisofs support will be incorporated by me or someone else. So this isn’t the fastest burning app around – it takes its time to reduce coasters, adds checksums, etc.

I wrote this plugin mostly for my own use. Although I’m not aiming for all uses here, the flexibility comes from it being a plugin, so you can hack the script, etc. I will support the existing GUI functionality, but if you have burn problems within the burn commands, you’ll need to research and adjust those yourself. But for most cases it should work as is.

This plugin also demonstrates some of SpaceFM’s new dialog and socket abilities for plugins. Since I wanted to make it a nice little state machine, it’s not the simplest example, but nevertheless demonstrates some ways that plugins can interact deeply with the SpaceFM window.

For now I have added IgnorantGuru’s Burn Tools to the SpaceFM Wiki – details, screenshot, and download links are there. Thanks for testing and feedback is welcome on how this works for you.

Also, special thanks to Thomas Schmitt and OmegaPhil for helping me with some of the finer bash points and testing (I forgot to add you to this version of the README).


 
Also, are you a GUI developer? Thomas Schmitt, author of cdrskin, xorriso, and libburn is looking for a developer to create a GUI front-end compatible with his long running xorriso, one of the most comprehensive and well-supported burn programs in development. He has added a demonstration Tcl/Tk frontend to the source. How to test:

  • Install Tcl/Tk if not present yet (old versions should be ok)
  • Get freshly
  • Build by:
    tar xzf xorriso-1.2.5.tar.gz && cd xorriso-1.2.5 && ./configure && make

  • Start xorriso and GUI script (with no need to install xorriso):
    xorriso/xorriso -launch_frontend frontend/xorriso-tcltk --stdio --

  • Read frontend/README-tcltk (and if curious enough: the code of frontend/xorriso-tcltk)
  • There is also example code in C provided for the fundamental communication stuff: frontend/frontend_pipes_xorriso.c
  • Other than the Tcl/Tk frontend, it starts an onw xorriso process instead of being started by xorriso. This gives the freedom to keep the own stdin and stdout alive, and to use a pair of pipe(2) for communication with xorriso.

If you’re interested, please contact Thomas – he’s a very helpful person to work with!

December 27, 2012 Posted by | Scripts, Software | 1 Comment

Sandfox Update

Sandfox 1.1.3 is available. This update simply adds one line to the default Firefox profile:

    bindro=/run/resolvconf

With recent Debian updates, due to changes in resolvconf, Firefox may require this bind for DNS lookups. Skype and other programs may also require this to be added to their profiles. I do not use Skype so feedback on this is requested.

If you’re already using Firefox, your profile will not be updated unless you delete /etc/sandfox/firefox.profile. Alternatively, you can add the above bindro line to that file manually.

Note that in some cases the actual location is /var/run/resolvconf. On recent Debian, /var/run is a link to /run, yet despite the fact that /var/run is already included, Firefox required this additional bind.

See previous Sandfox update

March 6, 2012 Posted by | Scripts | Comments Off

sandfox update

Sandfox 1.1.2 is available with the following changes:

  • accomodate a recent change in mount’s usage for remounting bind mounts (affected Arch Linux)
  • accomodate a recent change to how bind mounts type are listed in mtab – caused sandfox to report an error when creating a bind mount
  • added /dev/nvidia0 & /dev/nvidiactl binds to default profiles
  • added bindro=/opt/firefox to default firefox profile
  • improved detection for ‘firefox already running’ warning

NOTE: If you use nvidia display driver, you may want to add the following lines to /etc/sandfox/default.profile:

    bind=/dev/nvidia0
    bind=/dev/nvidiactl

Otherwise if you run sandfox with ––verbose you may see Firefox and Google Earth reporting errors about these missing files, which may affect video performance.

Sandfox 1.1.2

See previous changes to Sandfox

January 24, 2012 Posted by | Scripts | Comments Off

Sandfox Update

A very recent change to ps (addition of random spaces to the ends of lines in v3.3.0) broke Sandfox’s detection of sandfox daemons. Sandfox v1.1.1 corrects this problem.

See previous changes to Sandfox

December 1, 2011 Posted by | Scripts | Comments Off

xtract and mountiso rebuilds

The following packages in the PPA:
  mountiso_1.0.1-1_all.deb
  xtract_1.1.0-1_all.deb

did not install the scripts to the correct location due to a change in one of the deb build programs I use. Please upgrade to these packages to the correct the problem:

  mountiso_1.0.1-2_all.deb
  xtract_1.1.0-2_all.deb

November 25, 2011 Posted by | Scripts | Comments Off

mountiso update

mountiso v1.0.1 is available to correct a problem with relative paths on the command line (seems to be a theme), and also it adds a note on setup about setting max_loop to prevent loop devices disappearing on reboot.

November 22, 2011 Posted by | Scripts | Comments Off

xtract 1.1.0

xtract v1.1.0 is available. This update adds options for using xtract on the command line without zenity. Also, the ––inter and ––inter-name options have been renamed ––combine and ––ask. However, the old options will work even though they are not listed in the help, so there is no need to change existing setups.

Also, zenity is no longer required by the xtract deb package, but is required if you’re using xtract from within a file manager.

See previous changes to xtract

November 18, 2011 Posted by | Scripts | Comments Off

flash-plugin: abandon all hope

“Abandon all hope” was the title of a recent LWN security advisory on the Flash plugin, which has been my philosophy with regard to Adobe products for quite some time! It’s a good reminder to use something to isolate Flash from the rest of your system, be it a basic filesystem sandbox like Sandfox creates, or more comprehensive solutions.

It is a mistake to think these vulnerabilities are found and corrected in anything like a timely manner, and to assume that additional vulnerabilities aren’t created to replace them. As David Bowman might say, “The thing’s hollow – it goes on forever – and – oh my God – it’s full of holes!”

November 17, 2011 Posted by | Scripts, Tips | Comments Off

Follow

Get every new post delivered to your Inbox.

Join 131 other followers