You are not logged in.

#1 2016-07-19 16:54:14

Yeallow
Member
Registered: 2016-07-19
Posts: 4

[SOLVED] X server crashes on start with non-root user

Every time i run terminal after startx command with non-roor user i get this message:

/usr/lib/xorg-server/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console

Creating /etc/X11/Xwrapper.config file with
allowed_users = anybody and needs_root_rights = no or needs_root_rights = yes
does not solve the problem, instead causes complete xorg service shutdown.

Last edited by Yeallow (2016-07-20 18:12:20)

Offline

#2 2016-07-19 20:19:36

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] X server crashes on start with non-root user

So, you run startx and then once you're in the X session you run startx again from a terminal?  That's what it sounds like you're doing.  It would certainly produce an error.

What exactly are you trying to accomplish?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2016-07-19 21:22:57

Yeallow
Member
Registered: 2016-07-19
Posts: 4

Re: [SOLVED] X server crashes on start with non-root user

@loafer No. I run startx once. Then i get this message every time i open a terminal in i3.

Offline

#4 2016-07-19 21:24:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] X server crashes on start with non-root user

What is in your shell initialisation files?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-07-19 22:27:42

Yeallow
Member
Registered: 2016-07-19
Posts: 4

Re: [SOLVED] X server crashes on start with non-root user

/etc/profile:

 
umask 022
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH
if test -d /etc/profile.d/; then
          for profile in /etc/profile.d/*.sh; do
                    test -r "$profile" && ."$profile"
          done
          unset profile
fi
if test "$PS1" && test "BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
          . /etc/bash.bashrc
fi
unset TERMCAP
unset MANPATH

in /.bash.profile

[[ -f ~/.bashrc ]] && . ~/.bashrc

in /etc/bash.bashrc

[[ $- != *i* ]] return
PS1='[\u@\h \W] \$ '
PS2='>'
PS3='>'
PS4='+'

case $ {term} in
    xterm*|rxvt*|Eterm|aterm|kterm|kterm|gnome*)
          PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND;} printf "\033]0;%s@%s:%s\007"  "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}" '
     ;;
    screen)
          PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND;} printf "\033]0;%s@%s:%s\033\\"  "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}" '
esac

[ -r /usr/share/bash-completion/bash_completion    ] && . /usr/share/bash-completion/bash_completion

in ~/.bashrc

[[  $- != *i* ]] && return

alias ls= 'ls --color=auto'
PS1='[\u@\h \W]\$ '
startx

Offline

#6 2016-07-19 22:50:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] X server crashes on start with non-root user

Yeallow wrote:

in ~/.bashrc

[[  $- != *i* ]] && return

alias ls= 'ls --color=auto'
PS1='[\u@\h \W]\$ '
startx

There you go... I don't know where you got that idea, but starting X every time you open a shell is not a good idea.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2016-07-19 23:28:44

Yeallow
Member
Registered: 2016-07-19
Posts: 4

Re: [SOLVED] X server crashes on start with non-root user

Stupid me. Solved. Thank you for your help!

Last edited by Yeallow (2016-07-19 23:29:24)

Offline

#8 2016-07-20 01:14:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] X server crashes on start with non-root user

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB