Getting command line argument from a frontend

84 Views Asked by At

I am trying to see what exact command line arguments are being sent to scanimage from xsane. I tried ltrace but couldn't find "scanimage" anywhere in the log. In general, suppose you know some GUI program is a frontend of a command line pro

1

There are 1 best solutions below

0
On

If xsane call scanimage, you will find that by replacing the scanimage executable by this script temporarily :

#!/bin/bash

exec &>/tmp/trace
echo "$0" "$@"

Then,

chmod +x /usr/bin/scanimage
xsane
cat /tmp/trace