Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: mangotree on 05 July 2018, 01:24:03

Title: Tmux error when started.
Post by: mangotree on 05 July 2018, 01:24:03
I installed Artix and stared i3 in the `startx` when I log in

Now when I run tmux I get the following error message:

Code: [Select]
    81 \[    20.241\] (WW) xf86OpenConsole: VT\_ACTIVATE failed: Operation not permitted                                                                                      
    82 \[    20.241\] (EE)
    83 Fatal server error:
    84 \[    20.241\] (EE) xf86OpenConsole: Switching VT failed
    85 \[    20.241\] (EE)
    86 \[    20.241\] (EE)
    87 Please consult the The [X.Org](https://X.Org) Foundation support
    88      at [http://wiki.x.org](http://wiki.x.org)
    89  for help.
    90 \[    20.241\] (EE) Please also check the log file at "/home/<user>/.local/share/xorg/Xorg.1.log" for additional information.
    91 \[    20.241\] (EE)
    92 \[    20.242\] (WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
    93 \[    20.242\] (WW) xf86CloseConsole: VT\_SETMODE failed: Operation not permitted
    94 \[    20.242\] (WW) xf86CloseConsole: VT\_ACTIVATE failed: Operation not permitted
    95 \[    20.242\] (EE) Server terminated with error (1). Closing log file.

I already tried to add the line `allowed_users=anybody` to the file `~/etc/X11/Xwrapper.config` but tmux does not start. How do I solve this issue


Update/Solution

Please check Chris's answer for the solution

here (https://forum.artixlinux.org/index.php/topic,598.msg4744.html#msg4744)
Title: Re: Tmux error when started.
Post by: physkets on 06 July 2018, 07:04:48
What does that Xorg log file say?
Title: Re: Tmux error when started.
Post by: mangotree on 08 July 2018, 22:01:19
I have added it to a paste bin here

https://ptpb.pw/TT86

I assume there is something of with the permission but I am not sure where this can be changed.
Title: Re: Tmux error when started.
Post by: Chris Cromer on 09 July 2018, 06:26:45
Is your user part of the "video" group?
Title: Re: Tmux error when started.
Post by: mangotree on 09 July 2018, 09:05:19
Jep I have added the user to the video group. But Tmux show the same error message
Title: Re: Tmux error when started.
Post by: Chris Cromer on 09 July 2018, 14:25:38
Can you show us your .xinitrc file?
Title: Re: Tmux error when started.
Post by: Chris Cromer on 09 July 2018, 14:30:34
Looking over you xorg log, it says the intel module could notbe found. Have you installed your intel graphics card driver?
Title: Re: Tmux error when started.
Post by: mangotree on 10 July 2018, 08:55:44
I have installed the driver
Code: [Select]
 xf86-video-intel 
. Do I have to initiate it in the openRC, too?

and here is my
Code: [Select]
.xinitfile 
 
Here (https://ptpb.pw/eWZU)

I might be wrong but I would say that I just start i3
Title: Re: Tmux error when started.
Post by: Chris Cromer on 10 July 2018, 16:56:21
I have installed the driver
Code: [Select]
 xf86-video-intel 
. Do I have to initiate it in the openRC, too?

and here is my
Code: [Select]
.xinitfile 
 
Here (https://ptpb.pw/eWZU)

I might be wrong but I would say that I just start i3
Do you use the command startx or xinit?

Please try with xinit if you have not been.
Title: Re: Tmux error when started.
Post by: mangotree on 10 July 2018, 19:10:56
I use the `bash_profile` file and call startx when I replace it with xinit I get an other permission denied message

the main error message is

parse_vt_settings: cannot open /dev/tty0 (permission denied)

my bash profile looks as follows

Code: [Select]
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
exec startx
exec nm-applet
Title: Re: Tmux error when started.
Post by: Chris Cromer on 10 July 2018, 19:21:42
Can you remove that from your .bash_profile? Try running xinit manually from the console after login. It is easier to find if the problem is with tmux and xorg rather than a problem with autostarting xorg.
Title: Re: Tmux error when started.
Post by: mangotree on 10 July 2018, 23:34:40
I removed the `startx` line out of the file and ran `xinit` then I get the following error message


psatebin (https://ptpb.pw/iSZT)
Title: Re: Tmux error when started.
Post by: Chris Cromer on 11 July 2018, 00:08:34
Add this:
Code: [Select]
needs_root_rights=yes
to /etc/X11/Xwrapper.config

If that file already exists, show me the content please.
Title: Re: Tmux error when started.
Post by: mangotree on 11 July 2018, 00:11:22
The file contains

`allowed_users=anybody`

 $ sudo cat /etc/X11/Xwrapper.config
allowed_users=anybody
Title: Re: Tmux error when started.
Post by: Chris Cromer on 11 July 2018, 00:13:38
The file contains

`allowed_users=anybody`

 $ sudo cat /etc/X11/Xwrapper.config
allowed_users=anybody

That is fine, add the line I posted.
Title: Re: Tmux error when started.
Post by: mangotree on 11 July 2018, 00:20:50
Hey Chris,

so I have added the line to the file and logged in and was able to run xinit without an issue. then I could also run tmux.

But when I add

exec xinit
 
to my bash_profile. and then run tmux I get an error that there is already an xorg session  
Title: Re: Tmux error when started.
Post by: mangotree on 11 July 2018, 00:29:26
Sorry my bad I just needed to add to the `bash_profile` the lines


if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx
fi

then everything worked
Title: Re: Tmux error when started.
Post by: nous on 13 July 2018, 13:28:58
Good to see you figured it out (and reporting the solution). Please, mark this thread as [SOLVED] by editing the first message.
Title: Re: Tmux error when started.
Post by: jyf007 on 14 October 2019, 10:12:45
I found tmux issue that can't hold session for non-root user,root can hold tmux session when exit login shell  only.
Title: Re: Tmux error when started.
Post by: phoenix_king_rus on 14 October 2019, 11:42:17
I found tmux issue that can't hold session for non-root user,root can hold tmux session when exit login shell  only.
(e)logind can close tmux sessions on user logout. You should set "KillUserProcesses=no" in [Login] section of /etc/elogind/logind.conf
Title: Re: Tmux error when started.
Post by: jyf007 on 21 October 2019, 13:45:25
(e)logind can close tmux sessions on user logout. You should set "KillUserProcesses=no" in [Login] section of /etc/elogind/logind.conf
thanks ,you are right