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 04-02-2020, 01:51 PM   #1
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Rep: Reputation: Disabled
Startxfce4 unable to load failsafe session as non-root user


I'm working on a (B)LFS build, and I'm two weeks in. I installed XFCE4 and was able to start it as root after much trouble (completely unrelated issue). However, I was unable to start it as a normal user. I have spent an entire day (or two) looking for solutions online, but these attempts have not been fruitful. Running startxfce4 results in a blank screen with a popup saying "Unable to load failsafe session". I have tried examining the messages sent to STDERR, but the messages present there are also found when running as root. I don't know what could be the issue.

Thanks in advance!

Last edited by hello.world; 04-02-2020 at 05:07 PM.
 
Old 04-03-2020, 12:47 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
Have you checked the X logs /var/log/Xorg.0.log?
The other regular one is permissions: /usr/bin/X & /usr/bin/Xorg (or whatever server) must be permissions 4755

I use less on Xorg.0.log, hit / and enter EE which finds errors only. They're the show stoppers.
 
1 members found this post helpful.
Old 04-03-2020, 01:00 PM   #3
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Original Poster
Rep: Reputation: Disabled
Hi, business_kid, thanks for the reply. I checked Xorg.0.log, and there was nothing out of the ordinary. There wasn't a single line indicating an error, so I don't think there's anything wrong with my Xorg configuration. In fact, I'm almost positive that Xorg is set up correctly, as I was able to get TWM up and running as both users.

As far as permissions go, I'm not sure which files/directories to check. The DM I'm trying to use is XFCE, so the command I issue to try and start it is "startxfce4". For now the commands "startx" and "startxfce4" produce the exact same results (though I'm not sure if they log the same information).

Thanks!
 
Old 04-04-2020, 04:28 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
Code:
ls -l /usr/bin/X
Whatever that's pointed at, set that as 4755. I think we may be mixing servers and DEs
 
Old 04-04-2020, 02:26 PM   #5
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Original Poster
Rep: Reputation: Disabled
The output of the command showed that /usr/bin/X points to /usr/bin/Xorg. I tried chmod-ing both /usr/bin/X and /usr/bin/Xorg to 4755, but that didn't change anything. Again, I don't think there is a problem with the Xorg server, as I was able to get TWM running by issuing "startx".

Thanks.
 
Old 04-05-2020, 04:21 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
The logs, then. Whatever is stopping it must be there. Programs don't bale out for no reason, and that is logged.
 
Old 04-05-2020, 05:12 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by hello.world View Post
Running startxfce4 results in a blank screen with a popup saying "Unable to load failsafe session".
This sounds like Xorg itself starts OK, only XFCE doesn't. Possibly it (startxfce4) has its own log files somewhere?
 
Old 04-05-2020, 01:09 PM   #8
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Original Poster
Rep: Reputation: Disabled
Yes, I knew that the next logical step would be to look at XFCE's logs. I wasn't exactly sure where these were located, so I looked at what was being written to STDERR, with the following command:
Code:
startxfce4 &> ~/.x-session-errors
The BLFS book actually reccomended trying this in the event of failure. I'll post the output of running these logs as both users. As a reminder, I am able to start xfce as root.

Thanks for your help thus far.
 
Old 04-06-2020, 03:29 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
/var/log/Xorg.0.log is a usual place. You can also try
Code:
startx >~/x.err 2&>1
, and that gets the whole screen output, which is pretty much the same thing.
 
1 members found this post helpful.
Old 04-08-2020, 12:38 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ the '2&>1' could be crucial there. And, I don't know, I'd put the ampersand at the end of that line I think:
Code:
startxfce4 > ~/.x-session-errors 2&>1 &
But businesskid is right, getting ALL of Xorg's output might help more:
Code:
startx > ~/.x-session-errors 2&>1 &
I'd still look out for XFCE's own log files.
 
1 members found this post helpful.
Old 04-09-2020, 11:03 AM   #11
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Original Poster
Rep: Reputation: Disabled
OK, it looks like I'm getting somewhere. I ran the command without the ampersand at the end. Here is what I got:
Code:
xauth:  file /home/vr/.serverauth.1269 does not exist


X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
Build Operating System: Linux 5.5.3 x86_64 
Current Operating System: Linux VR-LFS 5.5.3 #1 SMP Fri Mar 27 17:37:39 CDT 2020 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sda9
Build Date: 26 March 2020  11:17:19AM
 
Current version of pixman: 0.38.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Apr  9 10:54:39 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) AMDGPU(0): [KMS] Kernel modesetting enabled.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
/usr/bin/startxfce4: X server already running on display :0
/usr/bin/iceauth:  creating new authority file /run/user/1000/ICEauthority
xfce4-session: No GPG agent found
xfce4-session: No SSH authentication agent found

(xfce4-session:1312): xfce4-session-WARNING **: 10:54:39.773: xfsm_manager_load_session: Something wrong with /home/vr/.cache/sessions/xfce4-session-VR-LFS:0, Does it exist? Permissions issue?
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
It says that there may be a problem with ~/.cache/sessions/xfce-session . I'm not sure if this is supposed to be a file or directory, but it doesn't exist regardless. EDIT:This message is not found when running as root, and XFCE runs successfully as root.

An interesting side note is that the command I ran actually left .x-session-errors blank, but it created a file called ~/1 which contained this output.

Sorry for the delay in my post. Online school started this week, and as a result I have less time on my hands. Thank you for your patience.

Last edited by hello.world; 04-09-2020 at 11:06 AM. Reason: Adding more information
 
Old 04-10-2020, 04:39 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
I had a bit of hassle recently with xfce4 not starting as luser. There's a bit on the GPG & SSH thing online
Quote:
SSH and GPG Agents

By default xfce4-session tries to start the gpg- or ssh-agent. To disable this run the following commands:

xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
I have xfce4 subdirectories in ~/.local & ~/.config, and I found it useful to clean them out of any stale sessions.
 
1 members found this post helpful.
Old 04-10-2020, 04:59 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Please show us the commands exactly as entered.

FWIW, I see another problem:
Code:
/usr/bin/startxfce4: X server already running on display :0
Is there a GUI already up and running when you startxfce?
FWIW, I believe you need to use either startx or startxfce4, not one after the other (I believe the latter is just a thin wrapper around startx or xinit).

Also, don't run the Xorg server as root.
It might create additional permission problems when later starting as normal user again - as pointed out in the log, too.
 
1 members found this post helpful.
Old 04-11-2020, 11:55 PM   #14
hello.world
LQ Newbie
 
Registered: Apr 2020
Location: USA
Distribution: LFS
Posts: 22

Original Poster
Rep: Reputation: Disabled
business_kid: I ran both of those commands, but I got an error (a d-bus error, something to do with no $DISPLAYs running or something like that)

ondoho: The reason it says that X is already running is that I ran startx multiple times. As soon as I was presented with the "unable to load failsafe session" popup, I would exit the X session. As for the commands, I ran the last command in your post, without the final ampersand. At first, the .x-session-errors file was blank, I ran it multiple times, occasionally trying startxfce4 instead of startx. I finally figured out that the output was being written to a file called "1". I also ran the commands as both root and as the normal user. However, I will stop running Xorg as root, as you pointed out.
 
Old 04-12-2020, 02:06 PM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by hello.world View Post
I finally figured out that the output was being written to a file called "1".
That measn you didn't enter the commands exactly as I typed them.
Probably one space too many somewhere.
 
  


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
Unable to launch "cinnamon-session-cinnamon" X session "cinnamon-session-cinnamon" -found; Falling back to default "session." xxxindigo Linux Mint 22 09-01-2019 09:21 AM
xfce4-panel theme not applied unless startxfce4 alexruedi Linux - Newbie 1 05-29-2018 01:35 PM
startx failed, startxfce4 didn't! (As user, not root. Xfce is default DE, Slackware64-14.2) EasySlacker Slackware 3 10-23-2016 06:45 AM
Blank screen after startxfce4 wilku Linux - Desktop 2 03-03-2009 03:48 PM
Xfce 4.2 on Vector hangs after "startxfce4" pdt677 Linux - Software 3 04-04-2005 08:18 PM

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

All times are GMT -5. The time now is 01:50 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