LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-29-2003, 03:37 PM   #1
kiley_rodgers
Member
 
Registered: May 2003
Location: Chicago
Distribution: Slackware 9
Posts: 34

Rep: Reputation: 15
Question X server question on Slackware 9


Quick new Noob question,

I just swithed to Slackware 9 from previous experiences with Redhat and SuSe (huess I wanted to learn Linux from the school of hard knocks, Fun though) Anyway, when I log in as a regular user (myself) I can launch GUI based apps from the command line (terminal). However, if I su to another user, including root, I get "Unable to open display". I have found that if I use the "xhost +" command and the original logged on user and then su to the next user, then.... use the "export DISPLAY=:0.0" cmd, it works fine. Needless to say, I would appreciate help in making this automatic so I can reduce my risk of Carpal Tunnel Syndrome from all the typing.


Thanks.....



Kiley
 
Old 05-29-2003, 03:41 PM   #2
phishman3579
Member
 
Registered: May 2003
Posts: 161

Rep: Reputation: 32
Just throw those commands into your .tcshrc or .bashrc file (or even .login), whichever you use. It will be run whenever a user logs in.
 
Old 05-30-2003, 04:01 PM   #3
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
This is a "security" feature. Why do you want to allow other
users to launch things onto your display? It would be easier
to give first user permissions for second users app, no? Or,
read the details of xhost to allow only trusted users or
machines to launch onto your display. And then do what
phishman3579 suggests.

-bbeers
 
Old 05-30-2003, 09:21 PM   #4
_666
LQ Newbie
 
Registered: May 2003
Distribution: slackware 8.1
Posts: 4

Rep: Reputation: 0
ok so i am in a similar situation.. i've installed the system ok.. i've got kde3 with everything working.. but i've done this all as root.. i've added a user through kuser, with a home directory and a valid shell.. however my xserver will only startup if i start it from root.. i only want to be in root when i'm authorising stuff.. it moans about a Xauthority file and then says it can't access my home directory when i try to start the xserver up as another user than root..

- how do i remedy this..
- assuming i was wrong.. what is the way to add a full user with full priviledges to the system

thanks slackers,
andy
 
Old 06-02-2003, 09:00 AM   #5
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Well, this is really a new issue, not xhost related anymore.

What command do you use to start X? What is the exact
error message?

I usually do adduser from a command line to add users, it works great. (Never tried kuser) But you should check
the permissions/owner of your user (not root) directory.

If you start kdm (as root), do you see your new user as a login option? Once you can get into X as non-root, you can always su to root as necessary.

Need more info about what you have done, and what happens!

-bbeers
 
Old 06-02-2003, 02:35 PM   #6
kiley_rodgers
Member
 
Registered: May 2003
Location: Chicago
Distribution: Slackware 9
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for the reply..... I appreicate the fact that xhost is a security feature and use it when running apps on different systems and want to redirect the display back to my local station. However the problem is, if I log in as myself and simply want to install an app(on my local machine) that requires root privledges, I have to go through all the xhosts cmds and changing the root env parms. Never had a problem with other distro before, just wondering if I misconfigured something along the way since I am newbie to the Slack version. Also, I could not find the files mention above for the root account. Thanks for the help...... Any other ideas?????
 
Old 06-02-2003, 03:22 PM   #7
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
I have always installed Slackware from a CD, just followed the bouncing ball ...
But I usually create users before I even try X.
As root from the command prompt, type "adduser". It should be located at /usr/sbin/adduser.
Then switch to another console (Alt+F2) and see if you can login.
Then you can try /usr/X11R6/bin/startx as the new user, or /opt/kde/bin/kdm as root. I used to have to tweak /etc/X11/XF86Config, but 8.1 and 9.0 have worked right away for me.
Usually when installing an app, I do every step as me, until make install, which must be done as root. Sometimes, each user requires his own ~/.something.

Slackware does require that you know a little bit about what is really going on "under the hood".

Also, this little hint about su might help you out:
su -
will source root's profile ($PATH, etc.)
su
will just change you to root user with your previous profile.

HTH,
-bbeers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bootloader question and a Slackware question Mr. Hill Linux - Newbie 6 02-15-2005 12:11 AM
VPN Question Win98->internet->Router->Linux VPN Server->Win2k Server patrickrea Linux - Networking 1 08-10-2004 03:09 AM
IBM Server / Slackware Question Streams Slackware 1 09-15-2003 04:09 AM
Moving from Server to Server Question Amaris4GOW Linux - General 8 07-20-2003 10:18 AM
name server in Slackware. Configuration question zyrtech Slackware 4 05-16-2003 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:29 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration