Wednesday, September 9, 2015

How to run cowsay in GUI mode Lubuntu


In previous article i wrote about cowsay, a fun program for outputing strings, unfortunately cowsay is console based which means only work from the command line.

What if i want to output strings in graphical (GUI) mode?? well you can't do it with cowsay obviously, but there is a graphical version of cowsay called xcowsay.

To install xcowsay, simply type apt-get install xcowsay from the command line, with root permission of course, like this:

sudo apt-get install xcowsay

You will see something like this:
kernelpanic@kernelpanic:~$ xcowsay
The program 'xcowsay' is currently not installed. You can install it by typing:
sudo apt-get install xcowsay
kernelpanic@kernelpanic:~$ clear
 [3;J
kernelpanic@kernelpanic:~$ sudo apt-get install xcowsay
[sudo] password for kernelpanic: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  xcowsay
0 upgraded, 1 newly installed, 0 to remove and 160 not upgraded.
Need to get 70,0 kB of archives.
After this operation, 165 kB of additional disk space will be used.
Get:1 http://id.archive.ubuntu.com/ubuntu/ vivid/universe xcowsay i386 1.3-1 [70,0 kB]
Fetched 70,0 kB in 1s (46,3 kB/s)  
Selecting previously unselected package xcowsay.
(Reading database ... 116118 files and directories currently installed.)
Preparing to unpack .../xcowsay_1.3-1_i386.deb ...
Unpacking xcowsay (1.3-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up xcowsay (1.3-1) ...

To use xcowsay, simply type the command xcowsay followed by string you want to show, like this:

xcowsay "i love you too..."


Unlike cowsay, xcowsay does not have many parameters and have less customization option. Here's what i see from the manual of xcowsay:

Usage: xcowsay [OPTION]... [MESSAGE]...
Display a cow on your desktop with MESSAGE or standard input.

Options:
 -h, --help                 Display this message and exit.
 -v, --version         Print version information.
 -t, --time=SECONDS Number of seconds to display message for
 -r, --reading-speed=N Number of milliseconds to delay per word.
 -f, --font=FONT         Set message font (Pango format).
 -d, --dream=FILE         Display an image instead of text.
 -l, --left                 Make the bubble appear to the left of cow.
     --think                 Display a thought bubble rather than a speech bubble.
     --daemon         Run xcowsay in daemon mode.
     --cow-size=SIZE         Size of the cow (small, med, large).
     --image=FILE         Use a different image instead of the cow.
     --monitor=N         Display cow on monitor N.
     --at=X,Y         Force the cow to appear at screen location (X,Y).
     --bubble-at=X,Y         Change relative position of bubble.
     --no-wrap         Disable wrapping if text cannot fit on screen.
     --config=FILE         Specify alternative config file.
     --debug         Keep daemon attached to terminal.

Default values for these options can be specified in the xcowsay config
file.  See the man page for more information.

If the display_time option is not set the display time will be calcuated
from the reading_speed parameter multiplied by the word count.  Set the
display time to zero to display the cow until it is clicked on.

No comments:

Post a Comment