Difference between revisions of "TipsTricks"

From WikiDLXTV
Jump to: navigation, search
Line 53: Line 53:
  
  
* Missing or wrong shebang<br>[http://en.wikipedia.org/wiki/Shebang_%28Unix%29 Shebang] is the very first line in a *nix script which tells the OS how to open/execute the script file. Beginners often remove that line because they think it's a comment, which also start with a #.
+
* Missing or wrong shebang<br>[http://en.wikipedia.org/wiki/Shebang_%28Unix%29 Shebang] is the very first line in a *nix script which tells the OS how to open/execute the script file. Beginners often remove that line because they think it's a comment, which also start with a #.<br>
 +
Also there must be no whitespace (space, tab) before the shebang, the first two characters in the file should be '''#!'''.<br>
 +
Example: This shebang will tell the system to use the perl interpreter to run the script:
 +
#!/usr/bin/perl
 +
 
 +
 
 +
* Leading spaces in script
 +
This seems to be mostly happening when you klick 'SELECT ALL' on a code box on the forum and copy/paste in an editor.
 +
To avoid this simply manually select the code in the codebox with the mouse and copy it.<br>
  
  

Revision as of 08:26, 5 October 2012

WDLXTV Tips & Tricks

This is a collection of useful tips and tricks regarding common problems with WDLXTV.

Reboot

When we say reboot we mean reboot, that's either pulling the plug or typing reboot in telnet/ssh or klicking reboot in webend.
Powering the unit down with remote POWER button is only standby and it's not sufficent when you need to reboot.


WDTV acting weired

If your WDLXTV starts acting weired and it seems only YOU are affected (others can't reproduce the problem),
here's what to do first (best in this order and check after each step with full reboot):

  • Reset to factory settings in OSD (Settings->System Setting->Reset to factory defaults)
  • Delete any .wd_tv folder you find on any drives (and shares if r/w) connected to WDTV
  • Complete Config Reset (WEC->Config->Reset Everything)


Change View (List/Thumb/Preview)

To switch between List and Thumb display when you browse your media files on WDTV, on remote press OPTION, select new view mode with LEFT/RIGHT then press OK.


SSH/FTP not working

You need to set a telnet password first! SSH and FTP will NOT work without a root password set. Set_SSH_password


Editing WDLXTV files on windows

Use Notepad++, PSPad, etc... any Editor that knows about *nix linebreaks and doesn't change file names (or extensions) on it's own ;) So hardly any editor BUT NOT MS Notpad....


Custom UMSP plugins

Besides putting umsp-plugins.tgz in /conf (which is a bad idea because it has very limited space!)
you can put a file called umsp-plugins.zip in the root of a usb drive (just like an app.bin). This way you can circumvent the space limitations of /conf.


Boot WDLXTV from USB

You don't need to flash the firmware every time you want to try/test/use a different version, just boot it from USB.
Difference_between_FW_formats#EXT3-Boot_.5Bnon-flash.5D
USB_Boot


EarlyMounts

Sometimes it's required to access a connected usb drive quite early during boot (eg. for use with rtorrent).
In this case you can tell WDLXTV to mount this drive early under /tmp/mnt/<UUID-of-USB-drive> by simply creating an empty file named .mnt in the root of that drive.
This can also be done by simply ticking the drive under WEC->Main->EarlyMounts and save.


Scripts don't work

There are numerous reason why a script can fail to run, I'll try to list the most common ones here:

  • Script has no executable flag
    In order to be able to execute any script on linux you need to set the executable rights on the file. Have a look here for more information: Linux file permissions
    eg. to allow everybody to execute the file you need to enter something like this:
chmod a+x yourscript.ext


  • Script has DOS/Windows or MAC linebreaks
    This is a quite common problem and sometimes not obvious at first glance. To avoid this simly run your script through dos2unix to make sure it has propper linux linebreaks:
dos2unix yourscript.ext


  • Missing or wrong shebang
    Shebang is the very first line in a *nix script which tells the OS how to open/execute the script file. Beginners often remove that line because they think it's a comment, which also start with a #.

Also there must be no whitespace (space, tab) before the shebang, the first two characters in the file should be #!.
Example: This shebang will tell the system to use the perl interpreter to run the script:

#!/usr/bin/perl


  • Leading spaces in script

This seems to be mostly happening when you klick 'SELECT ALL' on a code box on the forum and copy/paste in an editor. To avoid this simply manually select the code in the codebox with the mouse and copy it.



to be continued... --Recliq 11:37, 7 April 2012 (UTC)