You are not logged in.
Pages: 1
Hello, First time posting so don't punish me for any mistakes
Here is the problem:
After removing gnome and installing xfce Arch doesn't go into GUI mode automatically.
I am stuck at the command line.
From there I can type startxfce4 and it work but I want it do to start automatically.
This is my .xinitrc file
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice
and this is my .bash_profile
# ~/.bash_profile
#
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Any inputs are highly appreciated!!
Last edited by Ace (2014-01-21 18:55:13)
Offline
Should work. Is bash your login shell?
Offline
I believe yes , but noob here
how do I check?
Offline
Does
pgrep -f -- -bash
return anything?
Offline
Yes. 269
Offline
That's the PID of the bash login process - you're using bash as your login shell.
What's the output of
echo $XDG_VTNR
?
Offline
Nothing
Just blank...
echo $DISPLAY returns :0.0
Last edited by Ace (2014-01-21 21:13:52)
Offline
Interesting.
Change the line saying
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
to
[[ -z $DISPLAY ]] && exec startx
and reboot to see if it works now.
Offline
No still stuck in terminal log in.
I need to type startxfce4 manually
Offline
echo $DISPLAY returns :0.0
Whats interesting is that you're getting a $DISPLAY value when you're not logged into an X session. AFAIK, this value only gets set when you get an X session. Are you running this command from the console before startx? Is X running on another virtual terminal?
What's the output of
echo $XDG_VTNR
?
Nothing
Just blank...
Also, not getting a value for $XDG_VTNR is odd. As per https://bbs.archlinux.org/viewtopic.php?pid=1214794, are you running systemd and is your pam environment setup properly?
Offline
Sorry I posted the value after i startx and already in xfce
before in the terminal login DISPLAY value is blank and
$XDG_VTNR is 1
if I understoo correctly yes
systemd is running and I dont know if it helps but graphical.target is also running and active
as for pam enviroment I don't know how to check what you want do know...
Offline
Put a bit of debugging info in your script, to remove some uncertainty. E.g.:
echo "Checking whether to run xorg"
First run this, to be on safe side:
chmod 700 ~/.bash_profile
Here's how I do it, in my ~/.bash_profile
# My ~/.bashrc does everything - convenient, but slightly un-optimized
. $HOME/.bashrc
hour=$(date +%k | sed "s:^ ::")
if [[ $hour -ge 8 ]] && [[ $hour -le 9 ]] ; then
if [[ `tty` == "/dev/tty1" ]] && [[ -z `pgrep ^X$` ]] ; then
if lsmod | grep -qw ^nvidia ; then
echo "Starting xorg"
# https://bbs.archlinux.org/viewtopic.php?id=150539
setsid /usr/bin/startx -- -nolisten tcp &> ~/.xorg.log & logout
fi
fi
fi
Edit: Oops, got a bit confused, ignore this last line
Last edited by brebs (2014-01-22 20:07:52)
Offline
You had "!/bin/sh" at the top of your ~/.bash_profile - which is weird, so remove it.
Do you mean his ~/.xinitrc? I have it too.
Offline
!/bin/sh is not in my bash profile is on .xinitrc and is commented so there is no problem.
I put the echo in bash_profile and nothing came out.
Offline
!/bin/sh is not in my bash profile is on .xinitrc and is commented so there is no problem.
This is a special kind of comment https://en.wikipedia.org/wiki/Shebang_(Unix)
Offline
Oops, I got the 2 files confused there. It's not a problem. I don't thave that line, I don't believe it makes any difference.
Offline
Thumbs up for the reading. karol
Learned a new thing.
Offline
Has anyone any input on how to start the xfce automatically ?
It is a pain to start it manually
Offline
Read what I wrote.
At least add an echo command or two to your script, to see if it's running.
Offline
I added an echo command but nothing came out.
I wrote above.
As for your script I didn't copy past to my bash_profile it if thats what you mean.
if lsmod | grep -qw ^nvidia
I dont have nvidia drivers.
Offline
Pages: 1