Posts Tagged ‘resolve’

Play Audio Music CDs in Linux console / terminal in the 21 Century mission hard but possible

Tuesday, July 30th, 2024


Compact discs (CD's)
ain't dead yet but there easy straigh use on free operating systems Linux / FreeBSD / OpenBSD is starting to deteriorate. That is quite normal I guess, as CDs are no longer officially produced or sold for few years in America and there is no Audio CD bookstores, neither in europe and perhaps there are just few in europe, perhaps CD are used somewhere in Africa and Asia, but most modern world has officially buried them.

However as I love old stuff and I had the opportunity, I bought an old Audio CD (fake copy one 🙂 of Judas Priest Screaming for Vengence and the famous Jimi Hendrix  (Best Complilation) Experience an improvised shelf-book store selling books by a half deaf aging guy who sells books for years in Dobrich in the center.
And to remember the young years of Rock Roll wanted to play it on my very old but still kicking Lenovo Thinkpad R61 notebook (that is now 16 years old but thanksfully it still works and kicks ass with a Debian GNU / Linux 10 Buster.)

The task is very easy and as I have a Window Maker (Wmaker) on it in order to save myself an extra loading of this a kind of "archaic machine" and tried to play my CDs with everything at hand thus I tried first to play the CD in console with the good old but gold cdplay with which I have played a dozens of Audio CDs back in the days … 

# cdplay

just to find out the CD got red and started to roll but I get no sound via the Sound Card 🙁

Next thing, i assumed was the problem might be the pulseaudio process blocking the sound card to be used, preventing cdplay to be able to properly channel the sound to the sound card, that used to be quite of classical problem, if you remember, thus I tried to run the cdplay via the aoss (Wrapper script to facilitate use of alsa oss compatibility library.)

Before using oss of course i've loaded the snd-pcm-oss kernel module, to make the sound blaster be able to use the old obsolete Open Sound System.

# modprobe snd-pcm-oss

# aoss cdplay

Though that aoss trick worked for some programs that used old Open Sound System scheme to output sound, it doesn't unfortunately, at that case.
 

Strange enough my sound card is properly identified by the Debian Linux and I can play MP3 songs, as well browse videos in youtube and other Internet resources in Firefox and even the pulseaudio process that is running in the background is spitting sounds out of the Notebook Speakers.

The laptop doesn't seem to have any sound driver or Sound Card issues, as I can normally play my old .XM and .MOD  sound extension files with the good old mikmod

 

# mikmod

as well as I can even normally play MIDI audio files by using the timidity tool as well as with playmidi

# timidity HitTheLights.mid

# playmidi HitTheLights.mid


Just to proove the MIDIs can be played normally via the Sound Blaster (for a more on the topic check my previous article talking in depth about Linux and MIDI – Play Midis on Linux / Make Linux MIDI Ready for the Future – Enable embedded MIDI music to play in a Browser, Play MIDIs with VLC and howto enjoy Midis in Text Console.

Next logically to make sure, something is not wrong with audio drivers, I tried to play some music normally with, the standard console players I have played with for years on Linux mpg123 / mpg321 for reference check my Listening music in text mode in Linux console but this was no luck again …

I tried even to install the opencubicplayer ( Linux port) music player and tried to open the CD, but even though the CD can be heard to be rolling in the CD drive no sound was outputed out of the laptop speakers.

 

open-cubic-player-screenshot-on-linux

Thus to resolve tried everything at power starting from increasing any missing volumes via the aumix command, as often in the past I remember the problem in such situations is the sound volume is decreased to zero percentage or completely muted.

# aumix


aumix-with-linux-htop-screenshot-animated-gif

as well as with 

# alsamixer


Alsamixer-control-sound-volume-linux-screenshot

Nevertheless, every possible volume up volume was raised and everything looked cool as I could play normally music on machine or in a browser, the AUDIO CD Music refused to play out of the Speakers.
 

Playing the Audio CD via success with mplayer

The work around to make it play was up to a one liner with mplayer

# mplayer -cdrom-device /dev/cdrom cdda://

To easify the play of CDs I've created for my self a tiny one liner script to run it.

 

#!/bin/bash
mplayer -cdrom-device /dev/cdrom cdda://

I've called the script playcd.sh, made it executable and placed it under /usr/local/bin

# vim /usr/local/bin/playcd.sh
#!/bin/bash
mplayer -cdrom-device /dev/cdrom cdda://


# chmod +x /usr/local/bin/playcd.sh

 

Playing Audio CDs with VLC (VideoLAN Media Player)

I've vlc client installed on my Linux box, if you don't have it, do:

# apt install –yes vlc

Then roll on the CD with vlc with passing it the location to the CD, usually one of the down two pointers should work:

# vlc vcd:///dev/sr0

# vlc vcd:///dev/cdrom

If you want to loop the Tracks to play forever

# vlc –loop vcd:///dev/cdrom

By the way vlc can do much more than you think as you can even play youtube with it, for example you can try it with the Axel Folly classics Mod file, by running it like this.

# vlc https://www.youtube.com/watch?v=SlyK_elUmIw


Cheers and Enjoy CD audio on Linux  ! 🙂

How to resolve network issues with Java 6 JRE on Debian / Java proxy spawn on Debian sid not working by default – A Small tip on running WebScarab and Paros local Proxy on Debian’s Java

Wednesday, April 28th, 2010

In an attempt to use Paros Proxy and WebScarab on Debian I faced a shitty issues with Java’s Networking.

Neither of the forementioned Security Applications’s Local Proxy to be spawned by the Java server won’t work.

I assured my self there is nothing running on the ports 8080 on which the two Java applications attempted to run their local proxy server.
Being sure that nothing is listening on the 8080 port. I suspected that there is something wrong with Debian’s Java networking.
A quick search in Google pointed me to the Debian.Net’s forums where the issue was described as serious proxy error after updates .

The error that was returned by the ParosProxy Server on my Desktop Debian can be reviewed below:

hipo@noah:~/paros$ /usr/lib/jvm/java-6-sun-1.6.0.17/jre/bin/java -jar paros.jar
file:/home/hipo/paros/paros.jar
file:/home/hipo/paros/paros.jar
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.parosproxy.paros.core.proxy.ProxyServer.createServerSocket(Unknown Source)
at org.parosproxy.paros.core.proxy.ProxyServer.startServer(Unknown Source)
at org.parosproxy.paros.control.Proxy.startServer(Unknown Source)
at org.parosproxy.paros.control.Control.init(Unknown Source)
at org.parosproxy.paros.control.Control.<init>(Unknown Source)
at org.parosproxy.paros.control.Control.initSingletonWithView(Unknown Source)
at org.parosproxy.paros.Paros.runGUI(Unknown Source)
at org.parosproxy.paros.Paros.run(Unknown Source)
at org.parosproxy.paros.Paros.main(Unknown Source)

All a man can grasp from the Error is that there is something wrong with running the Paros Proxy server.
So far so good since the last release of Paros Proxy originates back to the year 2006 and it’s not really supported this days at first I thought this could be causing the error.
By the way the paros proxy is available via the debian packaging system. So I use the packaged version of paros to install the Debian packaged version of Paros Proxy issue the cmd:

root@noah:~# apt-get install paros

In that manner of thoughts I decided to try out the newer more modern HTTP and HTTPS Security Analysing Application WebScarab

I followed the start up instructions on WebScarab’s Website in order to run the application.
It was really simple. All I had to do is download the webscarab-current.zip which of the time of writting this post is webscarab-20100414-0036 and then launch the Java Debian Virtual machine.

However though my hopes that WebScarab’s local Proxy server will be running fine I was unpleasently suprised by the error which shown below:

hipo@noah:~/webscarab-20100414-0036$ java -jar webscarab.jar
Help set not found
11:43:36 main(Proxy.parseListenerConfig): No proxies configured!?
11:43:39 Proxy(Proxy.run): Unable to start listener 127.0.0.1:8008

Ain’t pretty heh?! … Even nasty !

However I was lucky to find the solution in some 20 minutes, so hopefully it took you less to find this post.

The solution to the above Proxy Spawn Error with Paros and Webscarab on Debian Lenny’s Java 6 Sun Server is really simple and it comes to this:

1. edit /etc/sysctl.d/bindv6only.conf and change the value

net.ipv6.bindv6only = 1
# to
net.ipv6.bindv6only = 0

2. Restart procps

root@noah:/home/hipo/webscarab-20100414-0036# invoke-rc.d procps restart

Now launch once again either Paros Proxy or Webscarab, the Local Proxy Server by each of them will bind to either port 8008 (WebScarab) or port 8008 (Paros Proxy).

How to configure equivalent of Linux /etc/resolv.conf search domain.com in MS Windows – DNS Suffix

Thursday, June 26th, 2014

windows-append-dns-suffixes-on-windows-equivalent-of-linux-search-in-resolv-conf-screenshot

Linux's default file that defines what DNS servers will be used /etc/resolv.conf typically contains directives with the default search domain or domains; used for FQDN (Fully Qualified Domain Name) completion when no domain suffix is supplied as part of the  DNS query. Lets say sub-domains under domain.com  has to be accessed (in /etc/resolv.conf) there is:

search domain.com

That is very handy whether you have to ssh or open in web browser (sites) or multiple servers each residing under a single main domain name (for example:
server1.domain.com, server2.domain.com, server3.domain.com etc.) by typing in browser or SSH by only passing the sub-domain name i.e.:
 

http://server1
http://server2

or

ssh user@server1
ssh user@server2


Here is /etc/resolv.conf from www.pc-freak.net

# cat /etc/resolv.conf

domain www.pc-freak.net
search www.pc-freak.net bergon.net

 

Here is example of what I mean, ascii-games is a sub-domain of www.pc-freak.net (ascii-games.www.pc-freak.net) and is resolved with no need to type full FQDN

 

# host ascii-games
ascii-games.www.pc-freak.net has address 83.228.93.76


The DNS server knows that all failed to resolve queries by set DNS should be searched (resolved) under the defined search domain, i.e. each DNS query for server2, serverX (would try to be resolved as a subdomain of domain.com).

Therefore, a very good question is what is Microsoft Windows (2000, 2003, 8) OS equivalent way to define search domain.com into /etc/resolv.conf?

In Windows the same /etc/resolv.conf hosts search is done using the so called "DNS Suffixes".

DNS Suffixes are used for resolv of (domain name strings with no dots).

Adding a new DNS Suffix in Windows is done from

windows-control-panel-network-connections-screeshot-add-dns-suffix-equivalent-to-linux-resolv-conf-search

 

Control Panel -> Network and Sharing Center -> Change Adapter Settings

 

Here select LAN card Adapter used to bring Internet to Win host,be it Local Area Connection or

Wireless Network Connection

 and choose:

Properties


windows-append-dns-suffixes-on-windows-equivalent-of-linux-search-in-resolv-conf-screenshot

 

 

From

Network Connection Properties

dialog select

Internet Protocol Version 4 (TCP/IPv4)

and again click on

Properties

 


network-properties-internet-protocol-version4_tcp_ipv4-windows-settings-screenshot-advanced-tab-add-dns-suffix

On next dialog click on

 

Advanced (button) -> DNS (tab)

windows-append-dns-suffixes-on-windows-equivalent-of-linux-search-in-resolv-conf-screenshot


In field
 

DNS Suffix for this connection

fill in host which you would like to resolve with no need for FQDN and press the

Add


(exactly like adding search www.pc-freak.net in  /etc/resolv.conf on Linux host). Add multiple hosts DNS Suffix, if you want to access subdomains naming from multiple base domain.

Joomla 1.5 fix news css problem partial text (article text not completely showing in Joomla – Category Blog Layout problem)

Monday, October 20th, 2014

joomla-fix-weird-news-blog-article-text-incompletely-shown-category-blog-website-layout-problem

I’m still administrating some old archaic Joomla website built on top of Joomla 1.5. Recently there were some security issues with the website so I first tried using jupgrade (Upgrade Joomla 1.5 to Joomla 2.5) plugin to try to resolve the issues. As there were issues with the upgrade, because of used template was not available for Joomla 2.5, I decided to continue using Joomla 1.5 and applied the Joomla 1.5 Security Patch. I also had to disable a couple of unused joomla components and the contact form in order to prevent spammers of randomly spamming through the joomla … the Joomla Security Scanner was mostly useful in order to fix the Joomla security holes ..

So far so good this Joomla solved security but just recently I was asked to add a new article the Joomla News section – (the news section is configure to serve as a mini site blog as there are only few articles added every few months). For my surprise all of a sudden the new joomla article text started displaying text and pictures partially. The weirdly looking newly added news looked very much like some kind of template or css problem. I tried debugging the html code but unfortunately my knowledge in CSS is not so much, so as a next step I tried to temper some settings from Joomla Administrator in hope that this would resolve the text which was appearing from article used to be cut even though the text I’ve placed in artcle seemed correctly formatted. I finally pissed off trying to solve the news section layout problem so looked online too see if anyone else didn’t stick out to same error and I stumbled on Joomla’s forum explaining the Category Blog Layout Problem

The solution to the Joomla incomplete text showing in article is – To go to Joomla administrator menus:

1. Menus -> Main Menu -> (Click on Menu Item(s) – Edit Menu Item(s)) button
2. Click on News (section)
In Parameters section (on the botton right) of screen you will see #Leading set to some low number for example it will be something like 8 or 9. The whole issue in my case was that I was trying to add more than 8 articles and I had a Leading set to 8 and in order to add more articles and keep proper leading I had to raise it to more. To prevent recent leading errors, I’ve raised the Leading to 100 like shown in below screenshot
joomla-blog-layout-basic-parameters-screenshot-fix-joomla-news-cut-text-problem-screenshot

After raising to some high number click Apply and you’re done your problem is solved 🙂
For those curious what the above settings from screenshot mean:

# Leading Articles -> This refers to the number of articles that are to be shown to the full width
# Intro Articles -> This refers to the number of articles that are not to be shown to full width
# Columns -> This refers to the number of columns in which the articles will be shown that are identified as #Intro. If #Intro is zero this setting has no effect
# Links -> Number of articles that are to be shown as links. The number of articles should exceed #leading + #Intro

N.B. Solving this issue took me quite a long time and it caused me a lot of attempts to resolve it. I tried creating the article from scratch, making copy from an old article etc. I even messed few of the news articles one time so badly that I had to recreate them from scratch, before doing any changes to obsolete joomlas always make database and file content backup otherwise you will end up like me in situation loosing 10 hours of your time ..

The bitter experiences once again with Joomla convinced me when I have time I have to migrate this Joomla CMS to WordPress. My so far experience with Joomla prooved to me just for one time the time and nerves spend to learn joomla and built a multi-lingual website with it as well as to administer it with joomla obscure and hard to cryptic interfaces and multiple security issues., makes this CMS completely unworthy to study or use, its hardness to upgrade from release to release, besides its much slow and its less plugins if compared to WordPress makes wordpress much better (and easier to build use platform than Joomla).
So if you happen to be in doubt where to use Joomla or a WordPress to build a new company / community website or a blog my humbe advise is – choose WordPress!

How to fix Pulseaudio and Skype crappy sound glitches, choppy sound and crackling on Debian GNU / Linux

Tuesday, January 10th, 2012

I've experienced plenty of problems with Pulseaudio and Skype output sound hell crappy. This stupid proprietary program Skype is a total crap … Anyways again thanks to ArchLinux's wiki, I've used the two mentioned steps to fix all this Skype in / out problems …

1. Fix problems with Glitches, voice skips and crackling In file /etc/pulse/default.pa its necessery to substitute the line;

load-module module-udev-detect

with

load-module module-udev-detect tsched=0

2. Resolve Choppy sound in (Pulseaudio) -> Skype

In /etc/pulse/daemon.conf two lines has to be also substituted:

; default-sample-rate = 44100

Should become;

default-sample-rate = 48000

3. Change /etc/default/pulseaudio to allow dynamic module loading

It is a good idea to the default settings from DISALLOW_MODULE_LOADING=1 to DISALLOW_MODULE_LOADING=0 .This step is not required and I'm not sure if it has some influence on solving sound in / out problems with Skype but I believe it can be helpful in some cases..

So in /etc/default/pulseaudio Substitute:

DISALLOW_MODULE_LOADING=1

to;

DISALLOW_MODULE_LOADING=0

4. Restart PulseAudio server

After the line is changed and substituted a restart of PulseAudio is required. For PulseAudio server restart a gnome session logout is necessery. Just LogOff logged Gnome user and issue cmd:

debian:~# pkill pulseaudio

This will kill any left pulseaudio server previous instances.
 

Howto resolve issues with “Call to undefined function xslt_create()” and my QmailAlizer bitter experience / IsoqLog a good alternative to QmailAlizer

Wednesday, March 31st, 2010

Today I got the intention to install some software that would report Statistics for Qmail in a Web Interface.
In other words I wanted to have Web qmail statistics that would report information about the sent and received emails per domain name from the Vpopmail.
Some time ago I used a project called qmailalizer . I modified it a bit back then because all it’s interface was in German and the install was a hell so I added up a little install.sh script that simplifies the installation project with qmailalizer.
Therefore I decided to install and test the software on debian 2.6.26-2-amd64 (64 bit) platform. The build failed ofcourse and thereforeI needed to install some packages which included the required header files by the qmailalizer source code. This are:

debian:~# apt-get install libgd2-xpm-dev libxml2-dev libxslt1-dev php5-xsl libxslt1-dev libxml2-dev
sablotron libsablot0

Hopefully afterwards your build won’t fail, but whenever you install the software you’re about to face another unsavoury,error caused by the old PHP code which was dedicated to run on top of PHP4 and this days most of us uses PHP5 on our Debians.So whenever I tried to access qmailalizer I received the ugly php error:

Call to undefined function xslt_create()

In order to fix that error I used a code from a nice article by Alexandre Alapetite titled XSL transition from PHP4 xslt to PHP5 xsl . All that is necessery to be done to weed out the erroris:

Copy paste the following code:

if ((PHP_VERSION>='5')&&extension_loaded('xsl'))
require_once('xslt-php4-to-php5.php');

inside the php that breaks with the error “Call to undefined function xslt_create()”

And then download xslt-php4-to-php5.php and save the file with a php extension.
That’s it now your “Call to undefined function xslt_create()” shouldn’t bug you any more.

Now back to the qmaializer, though I was able to succesfully compile the qmaializer. I couldn’t make the qmaializer binary work. Whenever I execute the qmaializer binary it crashes with Segmentation Fault like that:

debian:~# qmailalizer
Qmailalizer version 0.32, Copyright (C) 2001 Wolfgang Pichler
I/O warning : failed to load external entity "/var/www/qmailalizer/results.xml"
Parsing file ....
Parsing file: @400000004bb33dfc09e78f84.s
Segmentation fault

I tried using debugging what exactly procudes the segmnentation fault with Qmaializer using strace .All I can found out was that it has something to do with /etc/localtime.
A bit of googling revealed that Debian has some issue with the rrdtool binary package compiled for 64 bit architectures that dates back from the year 2007.
The exact thread concerning rrdtool and a 64 bit architecture can be red here .
This bug report advices that rrdtool is recompiled with a change in CFLAGS in debian/rules from the debian rrdtool source package whether the change should be like follows:

Change CFLAGS from debian/rules from
CFLAGS := -O2
to
CFLAGS := -g3 -ggdb3

I experimented changing the CFLAGS compile time options in the source of qmaializer but that didn’t do any good.

I’ve decided to drop qmailalizer for the moment and use it’s substitute called isoqlog .The main motive to choose drop out with qmaializer though I really like this piece of archaic soft, is that it no longer supported since the ’2004.
Luckily isoqlog is a supported piece of software and is capable of producing most of the reports produced by qmailalizer if not all of them.
So in case if you’re looking for good alternatives to QmailAlizer you should definitely check isoqlog.
Some other possibilities to Calculate and Report from your qmail logfiles is awstast, I’ve found the following article called Calculate Statistics From your Qmail logfiles an interesting reading and a good learning point.
Hope it’s gonna be helpful for you too. Maybe I’m gonna try a bit more to fix up the broken isoqlog but it depends if I’ll have enough time.
If I eventually succeed and fix it. I’ll share the working copy of qmailalizer with the world.

Howto resolve issues with gmplayer errors “[AO_ALSA] Unable to find simple control ‘PCM’,0”

Tuesday, March 30th, 2010

It’s really easy to solve, all you need to do is open gmplayer.
Go to gmplayer’s Prefences -> Audio there you should tick the
Enable Software Mixer. That’s it you shouldn’t experience the problemany longer 🙂