SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: debian,freebsd,slackware, and ubuntu
xterm error display not set
I am running slackware 12.0 and when I run some scripts I get the following error:
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
2) The reason you cannot connect to X server as root is that no user can use another users X server, not even root, without giving them permission.
To do that you need run 'xhost +local:' as the user whos X server it is, then set the DISPLAY variable for the user who wants to use X (in this case root).
Easiest way to do this is put the xhost comand in a startup file. For kde put it in ~/.kde/Autostart/startup. Then set the DISPLAY variable in roots ~/.bashrc or similar: 'export DISPLAY=:0.0'
Btw I am logging in as root and starting X as root...
Well then, that voids (xhost and DISPLAY that I had posted) since I'd assumed you were a user who su to root and then as root was trying to use x server but that the only x server running would be the user's x server -- IOW a case of root trying to use the user's (not root's) x server.
You'll likely need to provide more detail in order to get help. ie, what program, is it supposed to be suid or did it somehow get modified into suid. Specific steps of what you're doing (including how you logon as who and who's x server is running, leading up to and including the error.
How about your x configuration is anything been configured to non-standard here?
Distribution: debian,freebsd,slackware, and ubuntu
I am running "airoscript.sh" a script for running the aircrack suite.
I have a basic Slackware 12.0 install with kde as the desktop.
is it supposed to be suid or did it somehow get modified into suid
I dont really know what it really means for a program to be suid.
I boot the computer, logon as root, startx, open a terminal window and run the script "./airoscript.sh"
the scan option and when it gets to the point that it is to open an xterm window and run the airodump-ng program. It does not run the airodump-ng and gives the error and returns to beginning of the script menu.
I dont know if it supposed to be run suid but it does run on the many different live pentest security cds. Ie backtrack,whoppix, whax and auditor
Last edited by fordwrench; 09-10-2007 at 06:22 PM.
If you want to preserve the things in the environment that let you spawn apps to the X display as root, you need to change to root using `su` and not `su -`. The dash basically makes it flush the things you need from the environment.
Since at least one of your that you mentioned apps/script has the s bit set on it (suid) then perhaps what you need to do is to find out who the owner of the suid script/app is.
My guess that what I just said is so is because url above tells me that an suid "runs as the owner of this suid, **NOT** as who executed this suid (unless these two [owner/executor] accidentally happen to match)"
**All** of the above leaves it open to "as the root user, you are trying to use a user's (not root's) X server (if perchance the suid bit file/app/script **is OWNED by a user**
All of which -- ie it's root that's trying to use a user's x server. but nonetheless it is the same issue that I shared earlier which is that the use of X is dis allowed except for the user that started x
Why must you run it as root?
Probably you need to run it as a user. If (heaven forbid) you must run it as root then you may need to either remove the s (suid) bit or do as per my former (but in reverse) and once you find **who owns the suid file** given if it is a user
And if you must run it as root then you'll need to get it so that root can use a user's x server (but instead, I'd just remove the suid or s bit).
I got the same error as one of the first posts. I read a tutorial on how to set it up. It said to set the X Display Location = :0.0 - I thought it meant just '0.0'; however, that is incorrect. You should actually put ':0.0' [i.e. include the colon]
to the OP:
did you ever resolve this? I'm using backtrack5 and trying to run airoscript-ng and I'm also getting: Warning: This program is an suid-root program or is being run by the root user etc etc. I can't find a solution to this anywhere. There's no help on this at the backtrack forum or the ubuntu forum. If you resolved it could you share the solution?
In your .profile file located in your home directory, please add "xhost +local:". This will give local users access to X Windows. This is not enough to start gui programs from cron or as background processes without a shell. If you are able to launch your program from a shell as a background process and does not work as cron, then make sure that you have a small program to launch your program via system/shell command. This program can then be configured in cron or other background processes that dont use shell.