You are not logged in.

#26 2019-11-03 22:12:17

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

Yes it does. Should I create this file? What should it contain?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#27 2019-11-03 22:30:48

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

No xauth failing to create the file is the issue.  What are the permissions on that users home directory?

stat ~

Offline

#28 2019-11-03 22:52:36

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

It seems you are right

  Plik: /home/zbyszek
  rozmiar: 4096      	bloków: 8          bloki I/O: 4096   katalog
Urządzenie: 804h/2052d	inody: 6160386     dowiązań: 2
Dostęp: (0000/d---------)  Uid: (    0/    root)   Gid: (    0/    root)
Dostęp:      2019-11-04 00:49:28.633728443 +0100
Modyfikacja: 2019-11-04 00:46:47.020386654 +0100
Zmiana:      2019-11-04 00:49:28.633728443 +0100
Utworzenie:  2019-11-02 23:02:39.729436836 +0100

"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#29 2019-11-03 22:55:43

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

https://wiki.archlinux.org/index.php/Co … s_and_code

code of conduct wrote:

For non-English locale users: Please prepend LC_ALL=C to posted commands so that the output will be in English.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#30 2019-11-03 23:06:59

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

The following should find anything not owned by the uid and gid in the users home directory:

find ~ -\! -uid `id -u` -o -\! -gid `id -g`

In general everything in a users home directory should be owned by that user and you could recursively chown everything to the users uid and gid.

Offline

#31 2019-11-03 23:11:05

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

2ManyDogs wrote:

https://wiki.archlinux.org/index.php/Co … s_and_code

code of conduct wrote:

For non-English locale users: Please prepend LC_ALL=C to posted commands so that the output will be in English.

I'll remember that.

loqs wrote:

The following should find anything not owned by the uid and gid in the users home directory:

find ~ -\! -uid `id -u` -o -\! -gid `id -g`

In general everything in a users home directory should be owned by that user and you could recursively chown everything to the users uid and gid.

I created my regular user with the command useradd and didn't change any rights to the /home folder afterwards. Correct me if I'm wrong, but shouldn't be created with the proper ownership and rights with this command?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#32 2019-11-03 23:24:08

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

As root have you copied or moved any files into that users home directory or executed any commands in that users home directory?
If you create another user using the same command apart from the username what permissions are that users home directory created with?
What filesystem type is /home using?

Offline

#33 2019-11-04 09:03:12

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

When I execute as regular user

find ~ -\! -uid `id -u` -o -\! -gid `id -g`

I got "permission denied". When I run with sudo

/home/zbyszek
/home/zbyszek/.xinitrc
/home/zbyszek/.bash_profile
loqs wrote:

As root have you copied or moved any files into that users home directory or executed any commands in that users home directory?
If you create another user using the same command apart from the username what permissions are that users home directory created with?
What filesystem type is /home using?

Yes, I did copy some configuration files. The filesystem is ext4 for the whole Linux partition.

Last edited by Zibi1981 (2019-11-04 09:03:40)


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#34 2019-11-04 14:43:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

You should've done the copying as your normal user... As mentioned chown these to your user and group and ensure that their owner/user flags are correct:

sudo chmod 700 /home/zbysek
sudo chmod 644 /home/zbysek/.xinitrc
sudo chmod 644 /home/zbyszek/.bash_profile

Because you did mention it in your previous post, adjust the .xinitrc so that the

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

block is not removed/commented, it's important and should remain in the file, the part with twm and the clock can be left out. Try to start xorg.

Offline

#35 2019-11-04 22:15:57

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: [SOLVED] $DISPLAY is not set or cannot connect to X server

Well, much easier was deleting my regular user and creating a new account with the same name. This time X11 and plasma seem to be starting correctly. Now the next task would be to make it login directly to graphic login manager, not console, but that's another topic.

Than you all for the effort.

SOLVED.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

Board footer

Powered by FluxBB