LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 02-12-2015, 11:41 AM   #16
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled

The ~.xsession error for user is cannot connect to brltty at :0
I've tried export DIsplay= with various formulas

Yes I have the /etc/X11/xinit/xinitrc file
Which has . /etc/X11/xsession

The major error is that normal user cannot open display
Couldn't get a file descriptor referring to the console?

Last edited by Bchopra; 02-12-2015 at 01:25 PM.
 
Old 02-12-2015, 11:58 AM   #17
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by Bchopra View Post
The ~.xsession error for user is cannot connect to brltty at :0
I've tried export DIsplay= with various formulas

Yes I have the /etc/X11/xinit/xinitrc file
Which has . /etc/X11/xsession

The error is timeout in locking authority file
Things to try:
  1. Remove, or rename your .Xauthority file
  2. Use sudo X -configure - you may have to enter single user/CLI only mode to do this
 
Old 02-13-2015, 01:54 PM   #18
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I've tried this thanks but same situation
I've been at this for a month now! I think the primary problem is the error message can't open display

Last edited by Bchopra; 02-13-2015 at 01:56 PM.
 
Old 02-15-2015, 03:40 AM   #19
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
no, that is not the primary problem. I'm afraid we still do not really know what did you try exactly. The default installation usually works, you only need to start (by root) xdm/gdm/lightdm or another display manager, and a user can log in. Or a user will log in on a console and run startx. But I cannot find the reason. It looks like a permission issue, but .....
 
Old 02-15-2015, 01:03 PM   #20
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Hi Pan I tried to explain all the factors I've investigated I detailed them in a earlier post I'm not sure what further info you require ... ?


(I can't start xorg as a normal user only root.
I can login into tty and gdm accepted my user password but doesn't start the session

I have deleted created a new user with add user added to video and sudo group
Made sure all permissions for the files under ~/user belong to the user
Deleted the contents of tmp file including .(dot) files
Delete .Xauthority .ICEauthority
Removed /tmp/X.org
Tried startx --:1
Reinstalled gdm and xorg
Reconfigured Gdm
Checked that I'm level 5
Checked that anyone can start xorg
When I try to su to user logged in as root in the gnome session,and use gui programs I get the error can't open display.

I can startx from tty (alt+1) as ROOT ONLY.
Not with normal user.
I used tty login so I can grasp the error messages when I try starting xorg as normal user I can't!

If I try to login using gdm as an alternative I can again as root not user however the users password is recognised but I can't progress to the desktop ie to my system I a blank screen. Therefore I used tty login to see the error that's it
I have a /etc/X11/xinit/xinitrc?
I also tried making another new user using add user
And adding this account to sudoers and video I checked the ownership of the user belongs to user in home directory and there is a configured .xinitrc file for this user too but no luck. Only root can start xorg using either forms of login tty or gdm a " normal" user.

I have etc/xinit/xinitrc file

The reason I thought it's s permission problem is that a normal user with gnome session created by root can't start any gui applications the error is can't open display

Last edited by Bchopra; 02-15-2015 at 01:46 PM.
 
Old 02-15-2015, 01:52 PM   #21
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I've tried logging as root starting /etc/init.d/gdm3 start the su to user and startx I get the same Error which is Xauthority timeout in locking authority file then a blank screen
 
Old 02-15-2015, 05:43 PM   #22
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I've managed to finally logon in gnome by playing with the options for the interface the user in gdm3 can login only using gnome on way land not classic or system default or cario dock
 
Old 02-16-2015, 01:24 AM   #23
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I know, I understand that you cannot start X, but your explanation is not enough to find the reason. Furthermore (for example) the command start -- :1 should contain 2 spaces, not only one, I do not know which one did you try. I still do not know if X --configure was checked. Also you can try a simple Xorg or X command to start gui (that will not display a usable screen, but you will see if X itself could be started).
So you should write exactly what have you tried and what was the response not only just a few words about that....
 
Old 02-16-2015, 07:13 AM   #24
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Good things to "vet" and post are:
  1. The startup script which runs your XServer
  2. The xinitrc file
  3. /var/log/Xorg.0.log
But when I say VET I mean the verb "to vet" meaning examine and alter the contents to remove private or protected information for instance, I have different logins per project or client and those names are discernible in that if I post a log someone can look and see those names, so when I post files or logs I check them and alter the names to be different.

Seeing these scripts and logs will assist us in helping you further.

Unsure if you feel you've solved this versus not, so if you do feel it was solved, perhaps list these options you modified to accomplish your goal.
 
Old 02-17-2015, 12:46 PM   #25
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks pan for your reply.. command start -- :1 sorry my mistake, I did try with two spaces.

As I said in a earlier post I checked X -configure (1 hypen) (logged on as root in tty1 console) Error was EE server is already active for display 0.
Trying simple Xorg or X command to start gui produced the same error as above "server is already active for display 0".
I also Removed all my .Xauthority file same error
startx xinit /etc/init.d/gdm3 start is ok. (Returns me back to the login screen of tty as user)

sudo etc/init.d/gdm3 start (starting gdm3 (via systemcl) ok takes me to the gdm login screen here I can't use the windows manager options for system default, GNOME, however I can get to gui only using the window manager option of GNOME classic, Flashback & Wayland.

The main problem is that when I'm using root login in that xsession I su to user the user can't use any gui applications the error message is can't open display (I have tried export DISPLAY=:0 export DISPLAY=:0.0,

export DISPLAY=:10.0 export DISPLAY=localhost 0:0 etc (also using 127.0.0.1) checked my /etc/hosts file which is correct.

The file ~/.xsession-errors, return this message repeatly "cannot connect to br1tty at :0"

The file /etc/X11/xinit/xinitrc for the user (excluding all the commented out script) is . /etc/X11/Xsession


Therefore the primary problem isn't solved as still can't startx as user but I can get to a gui using different window managers such as wayland and flashback.

My main problem is that user can't open gui in a x-session logged into as root (can't open display ...
This is the main problem I've tried opening display using gksu etc.
Thank you for all your help

Last edited by Bchopra; 02-17-2015 at 12:55 PM.
 
Old 02-18-2015, 01:00 AM   #26
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
so actually X works, because you have already started a session. That is quite important. That means do not run X -configure any more.
You should know: the first graphical environment uses the display :0, the second one uses :1 and so on.
You need to allow access to the display, in general only the user logged in (started that X session) is allowed to use that.

the command startx xinit /etc/init.d/gdm3 start must not be executed, as you told it simply returns and does nothing ans is logically incorrect.
do not start X session as root, but as normal user. If :0 is already in use, you can try :1, :2 or whatever you want (the first free one). su will replace user (either from root or to root) and the new user is not allowed to connect to that display by default. If you want to change it do the following:
1. echo $DISPLAY will tell you the current display.
2. execute xhost+ to switch off access control.
3. execute su
4. set DISPLAY to the specified value (from the first point)
5. you will be able to use X as the new user too.
 
1 members found this post helpful.
Old 02-18-2015, 08:13 AM   #27
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes X works, as I've been saying root can start xorg by startx etc...
the first graphical environment logged in as user can only start the x sessions with the window manager I stated above. Flashback wayland & classic only!

Trying to startx from user using 1, :2 etc.. Still gives me the same error I mentioned above

In a xsession started as root then su to user I tried this previously ,

1. echo $DISPLAY will tell you the current display. 0.0
2. execute xhost+ to switch off access control.
3. execute su
4. set DISPLAY to the specified value (from the first point)
5. you will be able to use X as the new user too.

Then I get the dbus error which I try solve which returns be to a error timeout in locking authority no d bus running or manager already started its nightmare! I've tried with gksu as well


Am I wasting my time will user never be able to start gnome default session I use for root?

Last edited by Bchopra; 02-18-2015 at 08:23 AM.
 
Old 02-18-2015, 08:35 AM   #28
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
ok, so first shut down any X session as root. You can do it by /etc/init.d/gdm3 stop, and check if any X, startx, xinit processes were still running.
Do you know which runlevel was booted? (just execute the command runlevel)
login as regular user.
in this case there will be only a single console opened. Delete ~/.xsession-errors. Now you can execute startx. please check/post the content of that file and also /var/log/Xorg.0.log
 
Old 02-19-2015, 06:18 AM   #29
Bchopra
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I shut down any X session as root. Powered off the system then logged into tty console as user excuted Sudo /etc/init.d/gdm3 stop,
The runlevel is 5
login as regular user.
Delete ~/.xsession-errors.
Same error messages in .xsession-errors open connection connect no such file or directory cannot connect to br1tty at :0 even by using startx -- :1 :2 etc..

Im wondering whether the profiles gnome and gnome default are owned by root that's why ?
The hassle is su to user in root xsession dbus is opened by root there apps don't work anyhow

Last edited by Bchopra; 02-19-2015 at 06:36 AM.
 
Old 02-19-2015, 06:33 AM   #30
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
so please show us exactly what did you enter, what was executed. like: as user executed sudo /etc/init.d/gdm3 stop
just copy and paste your screen and the content of the log files (~/.xsession-errors and /var/log/Xorg.0.log)
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NetworkManager isn't behaving properly in normal user, but works well in root user. MarkZar Linux - Networking 1 02-16-2013 11:32 PM
Only root can use X, while normal users can't (FreeBSD 6.2 with Xorg-7.2). Seph64 *BSD 1 06-23-2007 12:01 PM
FC4 xorg issue - 1280x1024 works for root, but not normal user account peitz11 Linux - Software 2 09-29-2005 08:40 AM
startx does not load when logged in as a normal user? xunzi Linux - Newbie 0 06-29-2004 08:37 AM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:30 AM.

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
Open Source Consulting | Domain Registration