debian

Install LibreOffice in Debian GNU/Linux

According to Wikipedia:

LibreOffice is a free office suite compatible with Microsoft Windows, Mac and GNU/Linux. It has a text processor (Writer), a spreadsheet (Calc), a presentations creator (Impress), a databases manager (Base), a vector graphics editor (Draw) , and an editor of mathematical formulas (Math).

To the previous definition, I would add that it is also compatible with BSD OS (FreeBSD, OpenBSD, NetBSD).

LibreOffice covers a wide range of office needs and therefore can replace proprietary suites such as: Microsoft Office.

Install LibreOffice in Debian GNU/Linux Read More »

Change the state of package from automatic to manual

Debian GNU/Linux
I have installed the basic packages of the XFCE desktop, by typing:

$ sudo apt-get install xfce4

The above command installs some packages that I do not use as: Orage so I typed:

$ sudo apt-get purge orage
 ...
 The following packages will be REMOVED:
  orage* xfce4*
 ...
 Do you want to continue[Y/n]? y

P. Now every time I try to install an application apt-get show a message that there are packages that were installed automatically, and which are not required but they are essential packages to keep my desktop running correctly. How to resolve this?

R. You must change the state of those packages from automatic installation to manual installation by typing:

$ sudo apt-mark manual paquete1 paquete2  ...
Further reading

– man apt-mark

Change the state of package from automatic to manual Read More »

How to pretty print XML on GNU/Linux

GNU/Linux
The obfuscated XML files are difficult to read because the content of the file occupies a single line. Today LibreByte offers 3 tools that allow you to format an XML file.

Tool 1: web browser, examples: Mozilla firefox, Google Chrome. The disadvantage of using a browser is that you can not edit the XML file, only useful if you if you want to view it and nothing more.

Tool 2: use xml_pp, xml_pp is part of the XML-Twig suite, to install it on Debian GNU/Linux type:

$ sudo apt-get install xml-twig-tools

You can then format the XML file by typing:

$ xml_pp -i mifichero.xml

If you want to save the formatted content in another file, type:

$ xml_pp mifichero.xml > mifichero_pp.xml 

If you want to edit the formatted file, you can use any text editor.

Tool 3: Use Geany editor and prettyprinter plugin, to install it on Debian GNU/Linux type:

$ sudo apt-get install geany geany-plugin-prettyprinter

After running the above command, you must perform the following steps to activate the plugin

1. Run Geany
XFCE:

Menu-> Development-> Geany

From the console, you can also type:

$ geany &

2. Find the Menu

Tools -> Plugin Manager

3. Activate the plugin XML PrettyPrinter

Once the plugin is activated, the option to format XML appears in the Menu:

Tools-> PrettyPtrinter XML

Further reading

– man xml_pp
Geany Project
XML-Twig
Geany un IDE ligero

How to pretty print XML on GNU/Linux Read More »

MediaInfo – detailed information of an audio or video file

MediaInfo_90x90

MediaInfo is an utility that allows you to:

  • Read various audio and video formats
  • Show information in several formats: text, html, spreadsheet, hierarchical,…
  • Customize the previous views
  • Exporting information as text, csv, html…

The following is the information dumped by MediaInfo:

  • General: title, author, director, album, size, …
  • Video: codec, aspect, frame per second (fps), bitrate, width, height, …
  • Audio: codec, channels, language, bitrate, …
  • Text: subtitle language

MediaInfo supports following formats:

  • Video: mkv, ogm, avi, divx, quicktime, mpeg-1, mpeg-2, mpeg-4, …
  • Audio: ogg, mp3, wav, acc, m4a, …
  • Subtitles: srt, ssa, ass, sami, …

MediaInfo can be used through its graphical interface, command line interface or integrated into an application using the API.

To install MediaInfo (cli) in Debian GNU/Linux type:
$ sudo apt-get install mediainfo
In order to obtain information from a file type:
$ mediainfo buffers_listed_and_hidden.ogv
General
ID                                       : 280403682 (0x10B69EE2)
Complete name                            : buffers_listed_and_hidden.ogv
Format                                   : OGG
File size                                : 4.61 MiB
Duration                                 : 3mn 28s
Overall bit rate mode                    : Variable
Overall bit rate                         : 186 Kbps
Writing application                      : ffmpeg2theora-0.25
SOURCE_OSHASH                            : 3fd514e6b64347ca

Video
ID                                       : 889190165 (0x34FFF715)
Format                                   : Theora
Duration                                 : 3mn 28s
Bit rate                                 : 89.5 Kbps
Nominal bit rate                         : 297 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 fps
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.010
Stream size                              : 2.22 MiB (48%)
Writing library                          : Xiph.Org libtheora 1.1 20090822 (Thusnelda)

Audio
ID                                       : 1236641633 (0x49B5A761)
Format                                   : Vorbis
Format settings, Floor                   : 1
Duration                                 : 3mn 28s
Bit rate mode                            : Variable
Bit rate                                 : 80.0 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 1.99 MiB (43%)
Writing library                          : libVorbis 20090709 (UTC 2009-07-09)

Further reading

– man mediainfo
MediaInfo project

MediaInfo – detailed information of an audio or video file Read More »