WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tiny Aps Tips  (Read 6018 times)

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Tiny Aps Tips
« on: April 10, 2010, 02:53:27 PM »
I think we need an area on the Wiki which provides new users with a collection of tips about common uses of some of the Tiny Core Extensions. Many potential users need help identifying which extensions to install, so a brief description of some of the more useful extensions might be helpful as well as some indication, where appropriate, of command-line usage.

Here is a set of notes that I have kept for my own purposes that might serve as a start. Of course, there are many extensions that I don't use and there are more things that could be written about the extensions that I have chosen to mention. But, of course, the nature of a wiki page is to grow by accretion. I would be happy to add to such a page if someone can set up the basic link on our main wiki.



Tiny Apps Tips

Tiny Core is an exceptionally flexible version of Linux, but it is probably fair to say that most of its users appreciate the ability to create a fast, light-weight operating system. With that philosophy in mind, here are a few tips on using some of the "tiny" extensions.


bcrypt tips

If you would like to encrypt a file of presonal information or passwords, just enter the information into a text, spreadsheet, or zipped file. Let's say you called it "passwords". Get into a terminal window in the same directory as the file and type in

Code: [Select]
bcrypt passwords <Enter>
You'll be prompted for a password. When you wish to open the file later, you will type in

Code: [Select]
bycrypt passwords.bfe <Enter>
After putting in your password, the file will be returned to its unencrypted format for use.


emelfm tips

Emelfm is a file manager with a graphical user interface that makes it very easy to use. For more information, consult the following web page:

http://www.tldp.org/LDP/LGNET/issue61/misc/evans/emelfm_readme.txt


espeak tips

Note: espeak requires alsa or oss-alsa

In a terminal window enter the following:

Code: [Select]
espeak -s 200 -v en+m5 "this is a test" <Enter>
Note: -s controls words/min; -v controls voice; en = English; +m5 is fifth male voice; there are five male, five female, whisper, and croak.

Code: [Select]
espeak --voices <Enter>
(lists all available voices and accents)

Code: [Select]
espeak -s 200 -v en+m5 -f file.txt <Enter>
(reads file.txt)

espeak can also write output to a .wav file


flwm tips

      Alt+F1 to iconize a window

      Ctrl Alt arrows moves the window
      Ctrl Alt =         grows the window (unshifted + key)
      Ctrl Alt -          shrinks the window
      Ctrl Alt PgUp   grows the window veritcally
      Ctrl Alt PgDn   shrinks the window vertically
      Ctrl Alt ,           grows the window hortizontally (unshifted < key)
      Ctrl Alt .           grows the window hortizontally (unshifted > key)
      Ctrl Alt t           taller (sames as PgUp)
      Ctrl Alt s          shorter (same as PgDn)
      Ctrl Alt m          maximize widow
      Ctrl Alt v          maximize vertical
      Ctrl Alt h          maximize hortizontal


id3v2 tips

This dandy bit of software allows you to easily change id3tags. A typical command might be--

Code: [Select]
id3v2 -a "artist-name" -A "Album-title" *.mp3 <Enter>
For every mp3 in the current directory, it would change the artist name and album title to the information provided within the quotation marks.

For other options, just enter "id3v2" and hit <Enter>.


Imagemagick tips

The text that follows is quoted with some modification from the following web page:

http://www.perturb.org/display/ImageMagick_resize_images.html

ImageMagick has some pretty cool commandline tools to manage images. Specifically, it can help you resize an image (make it smaller).

You don't need any complicated shell script to batch convert a whole directory of images - because ImageMagick's "convert" and "mogrify" commands support wildcards. (Aside: "convert" replaces existing files, "mogrify" allows you to specify an output file.)

Here's an example of a single command that will create JPEG images at no larger than 800x600, setting the quality to 75 (pretty good). Notice the "-strip" option: This takes out JPEG's EXIF header data - which even in a small JPEG file can be 20,000 bytes of data! So it's a great idea to include this for web images, if you don't need all that EXIF data (and if you're like me, you probably didn't even know it existed, so you won't miss it right?)

First, place COPIES of all the photos you want to resize in /tmp and change to that directory in a terminal shell. Then use the following command:

Code: [Select]
sudo mogrify -format jpg -quality 75 -resize "800x600>" -strip * <Enter>
The wildcard "*" at the end means: Do all the files you find in this directory.

Other ways to do the same sort of thing--

For a single image:
Code: [Select]
convert -resize 50% -quality 80 input.jpg output.jpg
For a directory, go to /tmp and "mkdir photos" as well as "mkdir output." Put copies of the images to be resized in /tmp/photos. "cd" into /tmp/photos and issue one of the following commands:
Code: [Select]
sudo find . -name "*.jpg" -exec convert -quality 75 {} /tmp/output/{} \; <Enter>
sudo find . -name "*.jpg" -exec convert -resize 50% {} /tmp/output/{} \; <Enter>
sudo find . -name "*.jpg" -exec convert -resize 800x600 {} /tmp/output/{} \; <Enter>

More extensive help in using Imagemagick is available at

http://www.imagemagick.org/Usage/


mplayer-nodeps.tcz

The information on mplayer is taken from the following web site:

http://www.linuxtutorialblog.com/post/tutorial-playing-around-with-mplayer

Tutorial: Playing around with MPlayer

rechosen | 07 February, 2007 19:15

This tutorial handles about the usage of the wonderful media player MPlayer. It explains several options, lists some useful keyboard shortcuts and handles about tips and tricks that can be used to enhance your multimedia experience.

Difficulty: Basic

Note: this tutorial assumes that you have MPlayer installed & working and that you have some basic shell knowledge.

Playing a file

The most simple way of invoking MPlayer to play a media file is this:

Code: [Select]
[rechosen@localhost ~]$ mplayer <somefile>
MPlayer will try to auto-detect what kind of file you're trying to play (it usually succeeds) and play it. If it's an audio file, it'll just start playing and show its status and possible warnings on the command-line. If it's a video file, it'll open a window to play it in and then start playing.

Seeking through a file

You can seek through a file with a set of 3 keyboard shortcut pairs. Each pair makes MPlayer seek a different amount of time, and the pair consists of a key for seeking backward and a one for seeking forward. Listed below are those key pairs, for seeking backward and forward respectively:
Left arrow and Right arrow (10 seconds)
Down arrow and Up arrow (1 minute)
Page down and Page up (10 minutes)

Knowing these will come in handy a lot of times.

Playing a DVD

MPlayer does not have DVD menu support (sadly), but it does support playing DVD's. You can play a DVD this way:

Code: [Select]
mplayer dvd://<titlenumber>
Replace <titlenumber> with a number, like 1, 2 or 3. I personally prefer xine for DVD playback, as xine does support DVD menus.

Playing with subtitles

You can play a movie with subtitles in multiple ways. When playing a movie file, you can specify a subtitle file this way:

Code: [Select]
[rechosen@localhost ~]$ mplayer -sub <somesubtitlefile> <somefile>
When playing a DVD movie, you can also use the DVD's subtitle by specifying a language code like this:

Code: [Select]
[rechosen@localhost ~]$ mplayer dvd://<titlenumber> -slang nl,en
The above command would try to use dutch subtitles first, and fall back on english ones if dutch subtitles weren't available.

Useful keyboard shortcuts

A list of useful keyboard shortcuts (sometimes called hotkeys) in MPlayer:

(note that the full list can be found in MPlayer's man page)
"f" => Toggle between full-screen and windowed mode during video playback (you can set the option -fs on the command line to make MPlayer start playing in full-screen mode immediately)
"o" => Switch OSD (OnScreen Display) mode during video playback (for viewing how much time the movie has been playing and what its total lenght is)
"p" or Space => Pause / resume playback
"q" or Esc => Quit MPlayer (Esc does not quit but only stops playback when in GUI mode)
"/" and "*" (or "9" and "0") => Decrease / increase playback volume respectively
"m" => Mute sound (toggle)
"T" (usually Shift + "t") => Toggle stay-on-top (very useful if you don't want your video window to be overlapped by an other application)
"b" and "j" => Cycle through available subtitles
"x" and "z" => Adjust subtitle delay (useful if you have a subtitle that isn't 100% synced; you can then correct the time difference on the fly)
"I" (usually Shift + "i") => Show the filename of the movie being played (useful if you want to know that without interrupting the movie)
"1" and "2" => Adjust contrast*
"3" and "4" => Adjust brightness*
"5" and "6" => Adjust hue*
"7" and "8" => Adjust saturation*

*: These do not always work; see the MPlayer man page.

Generating an index

Sometimes, video files (mainly AVI files) have a corrupted index, or no index at all. This frequently is the case with incorrectly or incompletely downloaded files. Fortunately, MPlayer can generate the index it needs to play the file correctly. By using the -idx option, you can tell MPlayer to generate an index when necessary:

Code: [Select]
[rechosen@localhost ~]$ mplayer -idx <somefile>Sometimes the file does contain an index, but a corrupted one. In those cases, you might need to force MPlayer to generate an index:

[
Code: [Select]
rechosen@localhost ~]$ mplayer -forceidx <somefile>Generating an index can take some time, depending on the size of the video file, but after that, the file should play correctly.

Correcting bad audio/video sync
Some videos (mainly flv files) are encoded in a horrible way, and MPlayer will have enormous trouble with the A/V (Audio/Video) sync. There are pretty much two possibilities in this case:
MPlayer is trying to fix it but the sync is worsening too fast
MPlayer is trying to fix something that's already right and therefore pushes the sync away unnecessarily

In the first case, you should allow MPlayer to try harder to fix the sync:

Code: [Select]
[rechosen@localhost ~]$ mplayer -autosync 30 -mc 2.0 <somefile>
In the second case, you shouldn't allow MPlayer to fix anything when it comes to the sync:

Code: [Select]
[rechosen@localhost ~]$ mplayer -autosync 0 -mc 0 <somefile>
You might wonder what those options mean. Well, setting autosync to a positive value allows MPlayer to gradually adapt its A/V correction algorithm. The higher the value, the faster MPlayer will try to correct it. The mc option specifies how many seconds MPlayer may correct every frame. Setting it to a high value (like 2.0) practically allows MPlayer to do whatever it thinks it should to correct the A/V sync. Setting it to 0 stops MPlayer from trying anything when it comes to syncing.

Using MPlayer on slow systems

As video playback is a CPU-intensive task, older and slower systems may have a hard time to play certain video files. MPlayer has a feature that will help them to keep up the playback with less CPU power: -framedrop. This will allow MPlayer not to render a frame here and there if the CPU can't handle it. On systems that are far too slow, it won't be a pleasure to "watch" the movie (the majority of the frames will just not be rendered at all), but on systems that are a bit faster, this will stop the playback from having hiccups here and there. You can use the -framedrop option like this:

Code: [Select]
[rechosen@localhost ~]$ mplayer -framedrop <somefile>


Playing Youtube or Other Flash Videos Using Mplayer-nodeps.tcz

Most of us use our computers occasionally to play youtube videos or other flash content, but if the internet connection is not fast enough those videos can pause and stutter annoyingly. Here is one way to get around that problem. Mplayer (without dependencies) allows this in the most efficient way possible.

1. Start the Youtube video in Opera and then push the pause button on the flashplayer so that the video loads in the background while you are doing something else. You can find the file wherever you have set up Opera to store its cache. (I have mine in /tmp so that is in wholly in RAM memory and avoids writing to my SSD drive.) Use your file manager (mc or emelfm) to rename the file, giving it a *.flv suffix. Now you can use mplayer to play it with no stutters or pauses. Typical command: mplayer -zoom test.flv. Note that the -zoom allows you to resize the video by clicking-and-dragging a corner. The arrow keys allow you to "jump" forward and back in the video--plus or minus 25% for up or down arrow; plus or minus one minute for left and right arrows.


mp3wrap tips

Suppose you have ripped an audio CD and you'd like to join all of the files into a single, large mp3 file. (This is especially useful for audio books.)

1. This isn't necessary, but if you have plenty of free RAM, put all the files into a tmp directory in RAM--perhaps /tmp or /dev/shm. It might speed things up and reduce writing to your hard drive.
2. Issue the following commands in a terminal window:

Code: [Select]
cd /tmp <Enter>
mp3wrap album.mp3 *.mp3 <Enter>


ossmix tips

To control volume, enter the following in a terminal window:

Code: [Select]
ossmix vmix0-outvol 20 <Enter>
Note: (20=80% vol. Range is 0 - 25)

To see what else you can control, enter

Code: [Select]
ossmix <Enter>

xmms tips

These tips are taken from--
http://memory.xmms.org/xmms_v1.2/documentation.html

When you start up XMMS, you will get a console very similar to that of
WinAmp.

- On the top is the window title bar. To the right you will see 3 buttons,
   Left button will minimize XMMS.
   Middle button will make XMMS only display the title bar.
   Right button will end the XMMS session.

- The area in the upper left part displays the following:
   - Play state: Paused, Stopped, or Playing
   - Time elapsed in the current song or if you click on it, the reversed.
   - Spectrum analyzer of the sound being played. Right mouse click will
     bring up the Visualization menu. Left mouse button will change the
     analyzer to an oscilloscope and/or none.

- To the right of the Spectrum analyzer is the title of the file being played.
  This also contains the length of the song being played, as well as its
  position in the [unsorted] playlist. Right clicking in this window will bring
  up a new menu with some more options that are self explaining.

- In the left part of the Spectrum analyzer you'll have letters (at least if
  you use the default skin) O A I D V  left mouse clicking on these will open
  up menus or perform actions.
  O : Options menu
  A : Always on top
  I : File info box
  D : Double size mode
  V : Visualization menu

- Underneath the track title are the following static informational data:
   - bit rate in KBps (usually 128 or 112)
   - Sample Rate in KHz (usually 44)
   - Stereo or Mono channel mixing

- Underneath the informational data are a few controls you can play with:
   - The first slider controls the volume
   - The second slider controls the balance between speakers
   - The button marked "EQ" loads up the graphic equalizer
   - The button marked "PL" loads up the playlist editor
   - The LARGE slide bar moves from left to right as the song plays. You can
     drag this to jump to another location in the current file.

- On the bottom of the console are the standard buttons you would see on a CD
  player: Previous track, Play, Pause, Stop, Next track, eject, shuffle
  and repeat.

   - The eject button doesn't REALLY eject, of course. :) It opens up the
     file requester. The File Requester builds a playlist for the current
     XMMS session. You can use it to load files, add files to the list, or
     load all mp3s in a directory.

   - The shuffle button randomizes the sequence of the playlist.

   - The repeat button when enabled makes the playlist loop when it reaches the
     end of the playlist.



Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Tiny Aps Tips
« Reply #1 on: April 10, 2010, 04:14:05 PM »
I agree. I think it is a good idea.

To make it work well, it is probably a good idea to have a separate page for each application.

You could have a page that lists them all in alphabetical order, with links to each page.

You could have pages that list categories, such as internet browser, file manager, sound, etc, also with links to them.

That way people could search by name or category.

It is very easy to set up pages in the wiki.
Many people see what is. Some people see what can be, and make a difference.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Tiny Aps Tips
« Reply #2 on: April 10, 2010, 05:47:11 PM »
I have added this information to the wiki.

http://wiki.tinycorelinux.com/tiki-index.php?page=Applications

It would be appreciated if users make additional contributions to this section. If you use an application which is not included here, create a new page and write something about it. If you have additional information about one which is here, add it.


OldAdamUser2: Thanks for your contribution. It would be appreciated if you can check it for mistakes, or even make improvements.
« Last Edit: April 10, 2010, 06:10:55 PM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: Tiny Aps Tips
« Reply #3 on: April 10, 2010, 06:39:20 PM »
Thanks, Guy,

That gets us up and running. Now others can add to it.

I will try to revise and edit as necessary. (I also need to figure out how to add pages to the wiki. I can revise pages that are already there, but I was stumped when trying to add new ones!)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Tiny Aps Tips
« Reply #4 on: April 10, 2010, 07:13:20 PM »
To add pages:

log in

On the left, you will see "Quick Edit a Wiki Page."

Type in the name of the new page.

Click "CREATE/EDIT."


I have named all pages without capitals. I think it is a good idea to keep it uniform. Most extension names do not have capitals.
Many people see what is. Some people see what can be, and make a difference.