UiAutotmatorViewer in Ubuntu

Hi,
I want to get xpath of my android views. for the same i am using uiautomatorviewer. it shows me the correct path but to have xpath, i need to copy path of each parent till i reach intended child path.
I saw online some example of uiautomator in mac . they are provide gr8 way to simple copy and paste feature for xpath. but in ubuntu i need to manually copy the parent to reach intented child path.
any advice for the same???