[x]Blackmoor Vituperative

Friday, 2020-06-05

MyMedia under screen

Filed under: Linux,Movies,Software — bblackmoor @ 11:47

I use a Python application called MyMedia to stream videos from my Ubuntu media server to my Roku boxes.

I installed Ubuntu 20 yesterday. The painfully slow navigation problem (caused by the slow but inevitable deprecation of python 2) re-appeared, and I tried to re-create the fix. Initially, I just succeeded in preventing MyMedia from running at all.

Here is what actually worked.

  1. First, I copied all of my backed up MyMedia files to /usr/local/bin/mymedia
  2. Then I installed python 2.7…
  3. sudo apt-get install python2
  4. Then I installed pip, but first I had to install curl…
  5. sudo apt-get install curl
  6. curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
  7. sudo python2 get-pip.py
  8. Then I installed Pillow
  9. sudo python2 -m pip install --upgrade Pillow
  10. It might not have been necessary, but I installed several image libraries…
  11. sudo apt-get install libjpeg-dev
  12. sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
  13. sudo apt-get install zlib1g-de
  14. sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
  15. In common.py, I made sure that this…
  16. import Image
  17. … had been replaced with this…
  18. #import Image
    from PIL import Image

Huge success!

Note that during this process, I got several warnings about Python 2.7 being deprecated, like this one:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

It’s only a matter of time before MyMedia becomes unusable. I would love to get access to the git repository and try to update it for Python 3, if that’s possible. I’ve asked, but the original developer is no longer associated with the project. It may be that I’ll have to find a new solution to this problem in a year or so.

Also, I have updated my init script (/etc/init.d/memedia), which runs mymedia in a screen

# Provides: minidlna
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mymedia server
# Description: mymedia media server.

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
DESC="MyMedia media server"

case "$1" in
su - $USER -c "cd $DAEMONPATH; screen -dm -S $SCREENNAME python2 $DAEMON"
su - $USER -c "screen -S $SCREENNAME -X quit"
su - $USER -c "screen -wipe"
su - $USER -c "screen -list | grep $SCREENNAME"
echo "Usage: $SCRIPTNAME {start|stop|status}" >&2
exit 3

Friday, 2016-01-08

Expanding Ubuntu LVM in VCenter

Filed under: Linux — bblackmoor @ 16:40

These are notes for my own benefit, but I am sharing them publicly in case someone else might find them useful. The paths and volume names below are specific to my own situation, of course: yours will probably be different.

  • In VCenter, add an ISO for GParted to the data store.
  • Set the VM to boot to the bios.
  • Set the bios to boot from the CD drive.
  • Load the ISO in the CD drive of the VM.
  • In gparted, deactivate the partitions so they can be resized.
  • In gparted, expand the LVM partitions to use the additional 100 GB of file space.
  • Shut down the VM and remove the ISO from the VM.
  • Start up the VM, and in Ubuntu, run these commands:
  • sudo lvextend /dev/mapper/template-root /dev/sda5
  • sudo resize2fs /dev/mapper/template-root
  • Then reboot the VM one more time.

Wednesday, 2012-07-04

MediaWiki on Dreamhost: Error creating thumbnail

Filed under: Linux,The Internet — bblackmoor @ 12:41

I have a number of web sites I administer. Most of these are hosted on Dreamhost, and most of them run MediaWiki.

Recently, I have noticed an error whenever I upload an image to the wikis. What is supposed to happen is that ImageMagick resizes the image to make a set of thumbnails. What has been happening is that ImageMagick displays an error:

Error creating thumnail:

Exactly like that, with nothing after the colon. After many hours of research (and great help from the Dreamhost tech support team), I finally found the solution. Add this line to the LocalSettings.php file:

$wgMaxShellMemory = 524288

Thursday, 2011-04-21

Microsoft gets Novell’s Patents rights but must share them with Open-Source Software

Filed under: Intellectual Property,Linux,Programming — bblackmoor @ 09:17

In response to pressure from the U.S. Department of Justice and Germany’s Federal Cartel Office (Das Bundeskartellamt), Microsoft and its CPTN Holding Partners — Apple, EMC, and Oracle — have revised their agreements so that the Novell patents will be under both GPLv2 and Open Innovation Network protection.

So what does it all mean? Andrew “Andy” Updegrove, founding partner of Gesmer Updegrove, a top technology law firm, said, “This is a rather breath-taking announcement from a number of perspectives. Among others, the granularity of the restrictions imposed demonstrates a level of understanding of open source software in general, and Linux in particular, that has not been demonstrated by regulators in the past. It also demonstrates a very different attitude on the part of both the U.S. and German regulators, on the one hand, and Microsoft, on the other, from what we saw the last time that Microsoft was under the microscope. In the past, Microsoft was more disposed to fight than negotiate, and the U.S. and the European Commission were far apart in their attitudes. This announcement conclusively places open-source software on the U.S. regulatory map.”

(from Microsoft gets Novell’s Patents rights but must share them with Open-Source Software, ZDNet)

I think this is a really interesting development. Interesting in the sense that it’s not antagonistic to consumers and developers, and that it’s not what I predicted, or even guessed might happen.

Tuesday, 2010-03-30

SCO loses again: jury says Novell owns UNIX SVRX copyrights

Filed under: Intellectual Property,Linux — bblackmoor @ 16:38

In camera veritas

The SCO Group was dealt a serious, potentially fatal blow today in its courtroom battle against Linux. The jury in the trial between SCO and Novell has issued a verdict affirming that Novell is the rightful owner of the UNIX SVRX copyrights. This verdict will make it difficult for SCO to continue pursuing its baseless assault on the open source operating system.

(from SCO loses again: jury says Novell owns UNIX SVRX copyrights, Ars Technica)


Thursday, 2010-02-11

Six easy steps to a more secure Linux server

Filed under: Linux,Security — bblackmoor @ 14:44

The actual title of the article is “Six easy steps to make a super secure Linux server”, but I think that’s hyperbole. Even so, these are some basic steps that should be followed, and they do help make a server more secure.

  1. Install latest security updates.
  2. Disable root login via SSH
  3. Disable or filter extra services
  4. Remove active guest accounts and test accounts
  5. Remove version notification
  6. Hide application errors and PHP errors

(From Six easy steps to make a super secure Linux server, Technicant)

Friday, 2009-12-04

Fedora 12 is out

Filed under: Linux — bblackmoor @ 12:15

Fedora 12 has been released into the wild, and the general response is positive.

Every time a new version of Fedora (or any major Linux distribution) is released, there is always a great deal of confusion over the various releases: x86, i386, 686, and so on. Here is a quick guide that covers the vast majority of cases:


  • A generic “lowest common denominator” designation for Intel 80386 compatible CPUs (includes all of the above, but does not take advantage of extended instructions on those later CPUs).

Don’t use this unless you have to.


  • All Intel 32-bit Pentiums (excluding Pentium 1 and Pentium MMX)
  • All AMD 32-bit Athlons

If your computer is several years old, you will probably have nothing to lose by using this version. However…


  • AMD’s Athlon 64, Athlon 64-FX, and Opteron
  • Intel EMT64 processors – Pentium 4, Pentium D, Pentium Extreme Edition, Celeron D, Xeon and Pentium Dual-Core processors, the Atom 230 and 330 and in all versions of the Core 2, Intel Core i9, Core i7, Core i5 and Core i3

If your computer is less than a few years old, try this version first. If it won’t work on your machine, you will know almost immediately. If it does work on your machine, you may find that the performance is improved slightly (when compared to a 32 bit kernel), because the compiler was able to take advantage of slight improvements made in the instruction set for your processor.

So, start with x86-64. If that does not work, try i686. If that doesn’t work, try i386.

Good luck!

Tuesday, 2009-08-25

SCO Group wins Unix copyright appeal

Filed under: Intellectual Property,Linux — bblackmoor @ 17:17

According to a new report on ZDNet, the SCO group won an appeal in its copyright case. In case you are wondering if this will halt or reverse the inexorable death spiral of SCO, or if it has any repercussions for the Unix/Linux world… it won’t, and doesn’t. All this means is that SCO owes money to Novell, and that SCO should have had a trial before they lost in Utah, rather than a summary judgment.

Bottom line: SCO will waste more of its investors money beating this dead horse. For Novell, it means a few more pennies, and for the rest of the Linux world, it’s a footnote in the history books.

Sunday, 2009-08-16

Aliases under sudo

Filed under: Linux — bblackmoor @ 23:52

If you would like aliases to work when you use sudo (for example, so that when you type sudo ls, your directory listings are in color, assuming you set up an alias for ls="ls --color=auto"), add the following lines to your ~/.bashrc:

# Enable aliases when using sudo.
alias sudo='sudo ' # Note the trailing space.

Credit for this goes to Curtis Free. Thanks, Curtis.

Wednesday, 2009-06-10

18 Androids on the way

Filed under: Linux,Technology — bblackmoor @ 22:33

Google says that there are at least 18 Android devices on the way. Let’s hope that at least one of these has:

  1. Everything the T-Mobile G1 has, including a physical keyboard,
  2. a 4.5″ (measured diagonally) screen (but the same aspect ratio as the G1),
  3. the Bluetooth DUN profile enabled (currently disabled on the G1, to my extreme annoyance).

Crossing my fingers…

Next Page »