Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need help from someone. actually i am trying to run multiple "gnome-terminal" using bash script on Fedora. it works properly when i run by ./filename. but when i use "sudo crontab" its give me message "TERM environment variable not set".
TERM environment variable not set.
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
xterm: DISPLAY is not set
Well, like I said, you have a script that doesn't make sense. You basically wrote a script to just launch gnome-terminal. If you want the variables TERM and COLORTERM set in the new gnome-terminal session, you need to run these within that terminal. The simple thing to do is to put these environment variables in your users .bashrc or .bash_profile, etc.
Once my GUI interface appear i want to run gnome-terminal after specific time period. my requirment is just want to run gnome-terminal using shell script and this script run automatically by "sudo crontab" like
"????? /file/folder"
if i try to run like (./filename) its working properly. but i want to run this script through "sudo crontab". whenever i tried through "sudo crontab" it gives me error.
I also have been tried .bashrc and .bash_profile. they are not fullfill my requirments.
i really appreciate you if you help me out. thanks
It's just not going to work like that. Crond is a daemon, in order to start an application under your own session, it won't have permissions and or it's not designed to do such things.
What you might be looking for is the at command, but then again, I don't think that's going to work either.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.