LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-09-2023, 04:35 AM   #1
luna80
LQ Newbie
 
Registered: Feb 2023
Posts: 5

Rep: Reputation: 0
problem startx with non root users


I have a problem with startx and non root users,
every reboot, before be able to startx from users, I have to startx with root...after that I can startx with others users too without problems.
what can be?

I'm on gentoo linux, xfce, my .xinitrc

Code:
luna80@gentoo ~ $ more .xinitrc
exec startxfce4
thanks in advance
 
Old 02-09-2023, 11:00 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Something in the long chain needs permissions 4755, or 4711. I forget which permissions, and what exactly, but an elementary bit of searching should akkow you to sort yourself out. I learned that on LQ. You can too, by searching the forums.
 
Old 02-09-2023, 12:46 PM   #3
maw_walker
Member
 
Registered: Jul 2021
Posts: 119

Rep: Reputation: Disabled
There should be a
Code:
.Xauthority
file in the user's /home directory. It should not have been copied from another user's directory and should be created the first time X is run as that user, not root.
 
Old 02-10-2023, 01:00 AM   #4
luna80
LQ Newbie
 
Registered: Feb 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by maw_walker View Post
There should be a
Code:
.Xauthority
file in the user's /home directory. It should not have been copied from another user's directory and should be created the first time X is run as that user, not root.
thanks but I already tried to delete it but still doesn't works
 
Old 02-10-2023, 04:57 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,637
Blog Entries: 19

Rep: Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469
Quote:
Originally Posted by luna80 View Post
thanks but I already tried to delete it but still doesn't works
If you do a long listing on that file, I bet you'll find that it belongs to root and not to you. Use sudo to delete it. Then try to log in again as yourself.
 
1 members found this post helpful.
Old 02-10-2023, 12:53 PM   #6
luna80
LQ Newbie
 
Registered: Feb 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hazel View Post
If you do a long listing on that file, I bet you'll find that it belongs to root and not to you. Use sudo to delete it. Then try to log in again as yourself.
No, it belong to me, not root.

Maybe I didn't explain me well, but I can startx with my user but only once doing a startx with root.

I have to
1. Boot the computer
2. Startx with root (and exit)
3. Startx with my user

So it works, not if I skip 2.

The error if I skip 2. is that device is found but there is no configuration available (tomorrow I can quote the exapt error)
 
Old 02-20-2023, 08:21 PM   #7
1nuxg33k
Member
 
Registered: Feb 2019
Location: PNW
Distribution: Debian, LFS
Posts: 87

Rep: Reputation: 33
Quote:
Originally Posted by luna80 View Post
I have a problem with startx and non root users,
every reboot, before be able to startx from users, I have to startx with root...after that I can startx with others users too without problems.
what can be?

I'm on gentoo linux, xfce, my .xinitrc

Code:
luna80@gentoo ~ $ more .xinitrc
exec startxfce4
thanks in advance
If that is your .xinitrc file it is wrong. .xinitrc is a shell script and should have have the shebang
Code:
  #!/bin/bash
at the top, No spaces. ( for some reason even with the code tags its not coming out right).

Another idea to look at is logind. Based on your description it doesn't sound like you're using it.
From https://wiki.gentoo.org/wiki/Xorg/Guide#Configuration"
Note
By default the suid USE flag is disabled, which is fine when, as per recommendation, X runs under a logind provider like elogind, or systemd. The suid USE flag should however be enabled in /etc/portage/package.use/xorg-server in case no logind provider is used and X is run under a normal user account, e.g. started with startx. Please see also this repository news article. Setting suid would then prevent permission errors on /dev/tty0, or on virtual console 7.
 
1 members found this post helpful.
Old 02-20-2023, 10:34 PM   #8
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,804

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by luna80 View Post
No, it belong to me, not root.

Maybe I didn't explain me well, but I can startx with my user but only once doing a startx with root.

I have to
1. Boot the computer
2. Startx with root (and exit)
3. Startx with my user

So it works, not if I skip 2.

The error if I skip 2. is that device is found but there is no configuration available (tomorrow I can quote the exapt error)
That's odd. What do you get when issuing the command:
Code:
 $ groups
 
Old 04-03-2023, 12:15 PM   #9
xahodo
Member
 
Registered: Oct 2009
Distribution: Gentoo Linux
Posts: 39

Rep: Reputation: 22
Over here there's some information about rootless xorg. Have you tried what's listed here?
 
Old 04-08-2023, 12:51 PM   #10
luna80
LQ Newbie
 
Registered: Feb 2023
Posts: 5

Original Poster
Rep: Reputation: 0
I found the problem. I wrong put the flag "user" in /etc/fstab on the root partition.
Very bad mistake

Thanks to all
 
Old 04-08-2023, 05:27 PM   #11
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by luna80 View Post
I found the problem. I wrong put the flag "user" in /etc/fstab on the root partition.
And this was causing the root partition to be unmounted somehow? Am I understanding that right? Sorry, just seeking clarification for future reference.
 
Old 04-09-2023, 12:55 AM   #12
luna80
LQ Newbie
 
Registered: Feb 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rkelsen View Post
And this was causing the root partition to be unmounted somehow? Am I understanding that right? Sorry, just seeking clarification for future reference.
I cannot su with the "user" flag on the root and for some reason I cannot startx too, solved the su problem X is starting corrrectly
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
On NFS, non-root users can move/rename files belonging to root. Stuart Morrow Linux - Server 2 11-05-2007 11:12 AM
Monitoring traffic tool/web based(non-cgi?)/non-SNMP/low CPU usage/non-real time pe2338 Linux - Networking 3 05-04-2006 01:00 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 08:32 AM
Different video drivers are loaded for root and non-root users triet Linux - Software 1 12-31-2004 02:20 PM
mounting hardrive via non-root and using it via non-root Paridoth Mandriva 1 11-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:23 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
Open Source Consulting | Domain Registration