LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-05-2015, 08:18 AM   #1
kaya
LQ Newbie
 
Registered: Sep 2014
Posts: 23

Rep: Reputation: Disabled
How run programs outside X to take effect inside X?


From the command line (what is not on X) how can i run a program to make effect on the X? Example set keyboard layout, or make the colors of the screen reddish, for the script what automatically runs after suspend.

The problem it want to be run from the X because otherwise there is no effect on that and maybe it will need to be run with the user account, but i can do that. That script doesnt run in the graphical user environment, that is the problem.
 
Old 01-05-2015, 09:04 AM   #2
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
The program must be run from the same user who is logged in in X. You must set the $DISPLAY environment variable. The value is usually ":0", if there is only one local X session. You can find the correct value by opening a graphical console program in X, and typing

Code:
echo $DISPLAY
On the out-of-X session:

Code:
export DISPLAY=":0"
myprogram
 
Old 01-05-2015, 10:48 PM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
There are some command line programs for setting the behaviour of X programs. See man Xorg for start.

Or you can edit relevant configuration files of X programs to set them up. You would need some research.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Howto run bash-built-in programs from inside a Ada-Program ? Mario Blunk Programming 7 10-15-2012 05:08 AM
Interpreting $variables inside programs run from a shell script TheBigH Programming 6 06-10-2011 08:36 AM
LXer: The Butterfly Effect Part II: Inside the Chinese Firewall LXer Syndicated Linux News 0 01-09-2006 11:01 AM
how to print my CGI programs output inside an HTML zaveko Programming 9 10-11-2005 05:37 PM
Desktop effect on programs? spoody_goon Programming 4 04-12-2004 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration