Almost excuse sailor, a pantomime hero (3,4)
I believe the answer is:
'pantomime hero' is the definition.
(I've seen this before)
'almost excuse sailor a' is the wordplay.
'almost' means to remove the last letter (most of the word but not all of it).
'excuse' becomes 'alibi' (I've seen this before).
'sailor' becomes 'ab' (abbreviation for able seaman).
'alibi' with its last letter taken away is 'alib'.
(Other definitions for ali baba that I've seen before include "Pantomime hero at odds with 40 thieves" , "associate of thieves" , "fabulous character" , "Chopper" , "Pantomine hero opposed to 40 Thieves" .)