Executing a command in every x-session

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












How can I execute an arbitrary command for every x-session (belonging to any
user)?
(At any time, not just on login.)







share|improve this question


















  • 1




    My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
    – arcsin
    Mar 25 at 15:37










  • @arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
    – Centimane
    Mar 25 at 15:46










  • @arcsin, sorry, I meant at any time, not just on login.
    – Toothrot
    Mar 25 at 15:49














up vote
0
down vote

favorite












How can I execute an arbitrary command for every x-session (belonging to any
user)?
(At any time, not just on login.)







share|improve this question


















  • 1




    My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
    – arcsin
    Mar 25 at 15:37










  • @arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
    – Centimane
    Mar 25 at 15:46










  • @arcsin, sorry, I meant at any time, not just on login.
    – Toothrot
    Mar 25 at 15:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











How can I execute an arbitrary command for every x-session (belonging to any
user)?
(At any time, not just on login.)







share|improve this question














How can I execute an arbitrary command for every x-session (belonging to any
user)?
(At any time, not just on login.)









share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 15:49

























asked Mar 25 at 15:26









Toothrot

749416




749416







  • 1




    My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
    – arcsin
    Mar 25 at 15:37










  • @arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
    – Centimane
    Mar 25 at 15:46










  • @arcsin, sorry, I meant at any time, not just on login.
    – Toothrot
    Mar 25 at 15:49












  • 1




    My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
    – arcsin
    Mar 25 at 15:37










  • @arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
    – Centimane
    Mar 25 at 15:46










  • @arcsin, sorry, I meant at any time, not just on login.
    – Toothrot
    Mar 25 at 15:49







1




1




My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
– arcsin
Mar 25 at 15:37




My guess would be a script in /etc/X11/xinit/xinitrc.d/ but I'm not 100% on this.
– arcsin
Mar 25 at 15:37












@arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
– Centimane
Mar 25 at 15:46




@arcsin You are correct! If you want to throw that in an answer you'd have my upvote. Scripts in xinitrc.d get run when an xsession is started. It's a perfect way to add xhost rules as an example (and is how the logged in user gets xhost rules allowing them to use their xsession normally).
– Centimane
Mar 25 at 15:46












@arcsin, sorry, I meant at any time, not just on login.
– Toothrot
Mar 25 at 15:49




@arcsin, sorry, I meant at any time, not just on login.
– Toothrot
Mar 25 at 15:49















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433434%2fexecuting-a-command-in-every-x-session%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433434%2fexecuting-a-command-in-every-x-session%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)