LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Startxfce4 unable to load failsafe session as non-root user (https://www.linuxquestions.org/questions/linux-desktop-74/startxfce4-unable-to-load-failsafe-session-as-non-root-user-4175672430/)

hello.world 04-02-2020 01:51 PM

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!

business_kid 04-03-2020 12:47 PM

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.

hello.world 04-03-2020 01:00 PM

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!

business_kid 04-04-2020 04:28 AM

Code:

ls -l /usr/bin/X
Whatever that's pointed at, set that as 4755. I think we may be mixing servers and DEs

hello.world 04-04-2020 02:26 PM

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.

business_kid 04-05-2020 04:21 AM

The logs, then. Whatever is stopping it must be there. Programs don't bale out for no reason, and that is logged.

ondoho 04-05-2020 05:12 AM

Quote:

Originally Posted by hello.world (Post 6107118)
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?

hello.world 04-05-2020 01:09 PM

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.

business_kid 04-06-2020 03:29 AM

/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.

ondoho 04-08-2020 12:38 AM

^ 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.

hello.world 04-09-2020 11:03 AM

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.

business_kid 04-10-2020 04:39 AM

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.

ondoho 04-10-2020 04:59 AM

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.

hello.world 04-11-2020 11:55 PM

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.

ondoho 04-12-2020 02:06 PM

Quote:

Originally Posted by hello.world (Post 6110573)
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.


All times are GMT -5. The time now is 07:50 PM.