WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problems with 'MPlayer-svn-gtk1.tcz' startup file  (Read 1845 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Problems with 'MPlayer-svn-gtk1.tcz' startup file
« on: August 14, 2011, 10:46:31 PM »
When one attempts to install the (slightly older) 'MPlayer-svn-gtk1.tcz' extension the following error messages are to be observed:
Code: [Select]
mkdir: can't create directory '/home/root/.mplayer': No such file or directory
ln: /home/root/.mplayer/subfont.ttf: No such file or directory
sh: missing ]
cp: can't create '/home/root/.mplayer/': Path does not exist

I believe those problems would go away if the 'USER' variable would be correctly set and a closing bracket added to where it's needed. So the whole script would look more like:
Code: [Select]
#!/bin/sh

read USER < /etc/sysconfig/tcuser

[ -d /home/$USER/.mplayer ] \
    || mkdir -p /home/$USER/.mplayer \
    && chown $USER:staff /home/$USER/.mplayer

[ -e /home/$USER/.mplayer/subfont.ttf ] \
    || ln -s /usr/share/fonts/luxisr.ttf /home/$USER/.mplayer/subfont.ttf

[ -e /home/$USER/.mplayer/gui.conf ] \
    || cp -p /usr/local/share/mplayer/gui.conf /home/$USER/.mplayer \
    && chown $USER:staff /home/$USER/.mplayer/gui.conf

You'll note that I'm a HUGE fan of 80 characters per line, hence a few more (cosmetic) changes have crept in ...

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Problems with 'MPlayer-svn-gtk1.tcz' startup file
« Reply #1 on: August 16, 2011, 05:28:10 AM »
It has literally been years since I have visited that extension. 

I will adjust the startup script, and I imagine the gtk2 version is similar.