A few of my scripts (keymap changing, public key adding) need to act differently when in a virtual console vs. in an xterm. What's the real code for
#!/bin/ksh
if [[ in_a_virtual_console ]]; then
...
else
...
fi
command lineshellterminalxterm
A few of my scripts (keymap changing, public key adding) need to act differently when in a virtual console vs. in an xterm. What's the real code for
#!/bin/ksh
if [[ in_a_virtual_console ]]; then
...
else
...
fi
Best Answer
It sounds to me like you want to check whether or not there is a X server to connect to.
Something like: