Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run specific command in X11 session automatically, as soon as I take the session.

e.g. If I do

Xephyr :2 -once -query <ip_address>

then post successful authentication, a command e.g. export ABCD=small need to get executed automatically.

share|improve this question
I don't understand the question. Your line of code starts an X server, not an X session (which consists of a bunch of X clients). Furthermore, export ABCD=small is not a command, but a shell snippet, which only has effect in the shell that runs it and the subprocesses that this shell starts. What are you trying to do? – Gilles Jul 10 '12 at 22:41
Though it is a shell snippet, but that was given for example. – SHW Jul 11 '12 at 7:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.