Wales' first international in Swansea for 17 years ended in an encouraging draw at the New Stadium.
Hartson (left) was his usual combative self up front for Wales
The hosts were hit by a host of withdrawals ahead of the game but more than held their own.
John Hartson, captaining his country for the first time in his career, saw his header from Carl Robinson's corner cleared off the line in the first half.
Slovenia's best effort was an Andrej Komac header in the second half but Wales held on for a creditable draw.
Slovenia are still hopeful of qualifying for next year's World Cup, but they struggled against a spirited Welsh side, who face England in their next qualifier on 3 September.
Carl Fletcher and Carl Robinson were impressive in midfield while Danny Gabbidon was outstanding in defence.
And there were first caps for Craig Davies, Richard Duffy and Gavin Williams as manager John Toshack looked to the future.
Playing in his home town, Hartson led out Wales for the first time - although he was greeted by a half-empty stadium.
And the biggest cheer from those fans came when news filtered through of England's 4-1 thrashing at the hands of Denmark.
With Craig Bellamy injured, Hartson was partnered up front by Rob Earnshaw and the pair combined impressively.
On 18 minutes, Hartson headed Robert Page's long ball into his strike partner's path but Earnshaw's dipping shot flew just over.
After Hartson's header was cleared off the line by Komac, Earnshaw turned provider for the Celtic striker but he was beaten to the cross by the keeper.
Slovenia were causing problems of their own in attack, with Nastja Ceh and former Tottenham midfielder Milenko Acimovic finding plenty of space.
Ceh was allowed time to cross from the left for Klemen Lavric but the striker got the ball stuck under his feet and Wales recovered.
Slovenia made three changes at the break while John Toshack kept faith with the same players and Wales continued to threaten.
Three minutes into the second half, Crewe midfielder David Vaughan made space for himself before shooting straight at the keeper.
Hartson again soared above the Slovenia defence but his header across goal was behind Earnshaw and the West Brom forward put a tricky overhead kick over the bar.
Wales lost their impetus as the second half progressed and they were fortunate to see Komac's header fly inches over.
Keeper Danny Coyne, at fault in the 1-0 defeat to Austria in March, again appeared far from confident and one embarrassing fumble might have gifted Slovenia a late winner but Wales held on.
Wales: Coyne, Duffy (Edwards 73), Page, Gabbidon, Partridge (Roberts 89), Ricketts, Fletcher, Robinson (Davies 85), Vaughan (Parry 68), Hartson, Earnshaw (Williams 62).
Subs Not Used: Margetson, Mark Jones.
Slovenia: Borut Mavric (Handanovic 63), Cesar, Filekovic, Matej Mavric (Sukalo 46), Knavs, Acimovic (Cimirotic 46), Zlogar, Ceh, Pokorn (Ilic 56), Lavric (Rodic 46), Komac (Pecnik 87).
Subs Not Used: Brecko.
Booked: Matej Mavric.
Ref: Ian Stokes (Dublin).