Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6928885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:14:50+00:00 2026-05-27T11:14:50+00:00

In a Linux environment (in my case XUbuntu), is there a way to find

  • 0

In a Linux environment (in my case XUbuntu), is there a way to find out which environment variables are accessed by a command which is run from the console?

It must be possible to find out about these variables, as someone has to provide the values to the program. But is there some default method to do this?

The program in question here is xprintidle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:14:50+00:00Added an answer on May 27, 2026 at 11:14 am

    Assuming you want the variables actually used by some process running a command, you could use ltrace and look for calls to getenv:

    $ ltrace -e getenv ./your_program
    

    Of course, the argument to getenv can be computed (so you cannot really predict it).

    However, some (old or strange) applications might use the environ global, or the third optional argument to main; and some applications even change their environment using putenv, setenv or unsetenv (all 3 being the libc functions, not the shell builtin).

    but xprintidle is mostly interacting with the Xorg server. I’m surprised you are expecting it to use many environment variables (except DISPLAY).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy/clean way to do this in Linux/ a Linux-like environment? Purpose
We work in a mixed case sensitive/insensitive environment (cywgin/linux), and today someone created a
Where Linux/Unix environment variables are kept? How can I add my own environment variable
I would like to create a program in a linux/unix environment that runs from
We are using base clear case with dynamic views on Linux. In our environment
There is site http://abc.com (made in PHP, MySQL, Apache, Linux environment). Currently, MySQL on
Is there a way to force SVN to be case insensitive? We have an
While writing BASH scripts, I generally use the which command of a Linux machine
Hi I'm working in a Linux environment and I'm trying to write a command
PostgreSQL seems to have an environment file that allows settings environment variables. On Linux

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.