LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2013, 04:57 AM   #16
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled

This is the guide slacker_ was following:
http://docs.slackware.com/howtos:sla...kernelbuilding

Never tried it myself.

Last edited by brianL; 09-06-2013 at 04:59 AM.
 
Old 09-06-2013, 05:02 AM   #17
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by slacker_ View Post
Well ok then, thanks! I'll have to remember not to follow along to guides word for word then.
Merging can work... but you have to know what it does. In the original, it was to allow two separate X server configurations to communicate with a users client application. This means that each X authority file has two X server keys--- host1:0, host2:0, or host1:0, host1:1. Merging here works because neither key is wiped out.

IT DOESN'T work when you have X authority files with "host1:0", "host1:0" keys. ONE of these has been deleted as the server can only have one key. If the key value (the part following the MIT-MAGIC-COOKIE) is already the same, then again, no merger is needed. If they are different... the merge doesn't know which one is valid. If the valid one is deleted, then suddenly no new clients can be opened.

Normally, the ownership of the X authority file lies with the user that logs in... And the access modes is 600 (owner rw, group and world none), so if the owner is root, but the user is not... again, it will not work as the user applications have been cut off.

One situation where merging is used is with X forwarding with ssh. If the user is logged in locally.. and then makes a login via ssh (maybe from an alternate source, like a tablet). The ssh login to forward X merges a key - localhost:10 (by default the first forwarded display). This works because "localhost:10" is not "host/unix:0". A second ssh login (by anyone) will get "localhost:11"... and again, a separate X authority file.

For the purpose described, merging is the LAST thing to ever do - it isn't necessary.

1. the user that logged in just does "xauth", this will provide the "Using authority file xxxx" and prompt for commands (just control D as you aren't going to use any). You can also USUALLY get the file name by "echo $XAUTHORITY" but that depends on the distribution.

2. log in as root, and do "export XAUTHORTITY=xxxx" (assuming bash). This gives any application started by root access to the users X authorization, though you might have either define the DISPLAY environment variable (identified by the user login by "echo $DISPLAY") or specify the display on the command line.

Normally this should NOT be done - it opens root up to some nasty security issues (like sending X events from a user application to a root privileged application).
 
Old 09-06-2013, 05:14 PM   #18
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by jpollard View Post
Merging can work... but you have to know what it does. In the original, it was to allow two separate X server configurations to communicate with a users client application. This means that each X authority file has two X server keys--- host1:0, host2:0, or host1:0, host1:1. Merging here works because neither key is wiped out.

IT DOESN'T work when you have X authority files with "host1:0", "host1:0" keys. ONE of these has been deleted as the server can only have one key. If the key value (the part following the MIT-MAGIC-COOKIE) is already the same, then again, no merger is needed. If they are different... the merge doesn't know which one is valid. If the valid one is deleted, then suddenly no new clients can be opened.

Normally, the ownership of the X authority file lies with the user that logs in... And the access modes is 600 (owner rw, group and world none), so if the owner is root, but the user is not... again, it will not work as the user applications have been cut off.

One situation where merging is used is with X forwarding with ssh. If the user is logged in locally.. and then makes a login via ssh (maybe from an alternate source, like a tablet). The ssh login to forward X merges a key - localhost:10 (by default the first forwarded display). This works because "localhost:10" is not "host/unix:0". A second ssh login (by anyone) will get "localhost:11"... and again, a separate X authority file.

For the purpose described, merging is the LAST thing to ever do - it isn't necessary.

1. the user that logged in just does "xauth", this will provide the "Using authority file xxxx" and prompt for commands (just control D as you aren't going to use any). You can also USUALLY get the file name by "echo $XAUTHORITY" but that depends on the distribution.

2. log in as root, and do "export XAUTHORTITY=xxxx" (assuming bash). This gives any application started by root access to the users X authorization, though you might have either define the DISPLAY environment variable (identified by the user login by "echo $DISPLAY") or specify the display on the command line.

Normally this should NOT be done - it opens root up to some nasty security issues (like sending X events from a user application to a root privileged application).
Thank you for this excellent explanation. I'll go about fixing everything with this tonight!
 
  


Reply

Tags
slackware 14, startx, xauthority


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
How use this command /root/.bashrc: export XAUTHORITHY=/home/<user>/.Xauthority linuxer2013 Linux - Newbie 8 01-08-2013 10:06 AM
Root and all user accounts disabled mht17 Linux - Newbie 3 05-10-2011 07:23 PM
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 05:27 PM
Limiting the number of root user accounts barleykorn Linux - General 2 03-25-2005 11:51 AM
can i view user accounts with root? guggenheim Linux - General 2 03-17-2004 06:35 PM


All times are GMT -5. The time now is 12:35 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