You are not logged in.

#1 2011-11-11 15:36:18

eamnomadic
Member
Registered: 2008-01-23
Posts: 11

[SOLVED] arch / xfce - auto-boot and shutdown issues

Hi
I've started using Arch to develop my knowledge of Linux. I installed arch/gnome (64bit) but then decided to remove gnome and go with xfce. I'm using ntfs-3g to access my windows partitions. I have sound and video working etc. I've found Arch wiki excellent.
I have two minor issues currently.
first issue:
- I cannot boot into xfce automatically. It boots into a console, I log in and then have to issue startxfce4. As far as I can see I am following the arch wiki for xfce (using /.xinitrc as follows

   #!/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 ck-launch-session startxfce4
   # exec gnome-session
   # exec startkde
   # exec startxfce4
   # ...or the Window Manager of your choice

Daemons from /etc/rc.conf as follows

    DAEMONS=(syslog-ng dbus !network wicd crond @alsa)

second issue
- I cannot shut down. Issueing "shutdown now" starts shutting down, then I get a message to use control+d for maintenance or continue. The former starts loading arch again, the latter puts me into single-user mode with no processes running but wont shut down. I have to physically switch off.

I've been using wiki (and it is excellent), looked thru the forum and did some googling but cant seem to solve these two issues.
Any help would be appreciated.

eddie

Last edited by eamnomadic (2011-11-14 09:19:49)

Offline

#2 2011-11-11 19:52:12

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

You seem to have some things messed up there tongue

Think of what you are trying to accomplish as two seperate things:

1. Login
2. Start xfce.

Let's go over these in reverse order.

First, 2.
The type of thing you have added to your .xinitrc -

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

should instead be added to your ~/.bash_profile (this is what gets read when your log in that user). FWIW, this is what I have in my .bash_profile, essentially it does what you're trying to achieve (start xfce automatically):

if [[ ! $DISPLAY && $(tty) = /dev/tty1 ]]; then
exec startx
fi

And secondly, 1. This is where you log in as a user automatically after booting. There's a wiki page to show you how to do this, here -

https://wiki.archlinux.org/index.php/Au … al_console

So to sum up: Your system boots, then logs in automatically to a user of your choosing [1.], reads the .bash_profile in that users home directory, and then executes [2.] the action you've specified there (which in this case is to execute xinit according to the parameters you have specified in .xinitrc)

Hope that helps smile For more information regarding your shutting down problem, this wiki entry should help: https://wiki.archlinux.org/index.php/ConsoleKit

edit: Another tip: When you're pasting output (or the contents of files) in the forums, use code tags. Just place what ever you are pasting between

[code] and [/code] 

It seperates and formats it so that it is easier to read  smile

Last edited by b4data (2011-11-11 20:30:19)

Offline

#3 2011-11-11 22:07:49

eamnomadic
Member
Registered: 2008-01-23
Posts: 11

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

b4data
thanks for such a comprehensive response.
I cant get back to it until sometime tomorrow and I will then act on what you said.
Thanks again.
eddie

Offline

#4 2011-11-11 22:17:11

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

You're welcome.

You can edit your first post (by clicking the 'Edit' link at the bottom of your post) to add code tags (so newcomers to this thread can easily read what you have posted), and you can do the same to add [SOLVED] to your thread title if you manage to fix your problem (this helps others in the community to find solutions to problems similar to what you're experiencing.)

Offline

#5 2011-11-12 16:23:09

eamnomadic
Member
Registered: 2008-01-23
Posts: 11

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

b4data
adding a startxfce4 command to the ~/.bash_profile has fixed it. System now boots into terminal and when I log in xfce starts automatically.
If I wanted the system to boot directly into xfce and then for me to log in under xfce ????????

I'm stuck on the second issue - the shutdown.
To clarify, when I click logout in xfce, the logout panel has 3 options - logout, restart and shutdown. However, the shutdown and restart options are greyed out (not available). Logout logs me out and leaves me at the terminal.
Shutting down then with sudo (or switching to root and shutting down) gives me the option of maintenance or control+D. COntrol+D starts loading again.
SUdo shutdown again gets to stage where it says no processes are running but then sits there. I have to physically switch off or sudo powerdown.
The consolekit link - if I understand it, suggests I need a ~/.xstart file - not clear to me what I need in it to allow shutdown?

Thanks again

eddie

Offline

#6 2011-11-12 21:01:23

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

eamnomadic wrote:

If I wanted the system to boot directly into xfce and then for me to log in under xfce ????????

XFCE does not have it's own login window: for this you will want a Display Manager (DM) : https://wiki.archlinux.org/index.php/DM

Your problem with Reboot/Shutdown being greyed out in the XFCE Logout dialog probably has something to do with this:

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

One of the files that get sourced here starts dbus-launch, but this should not really happen until AFTER ck-launch-session is run. See the notes in the colored parts here: https://wiki.archlinux.org/index.php/Xfce#Manually

Hope this helps smile

Offline

#7 2011-11-12 22:52:41

eamnomadic
Member
Registered: 2008-01-23
Posts: 11

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

mariusmeyer
thanks for the response.
I spent some time on the archwiki/xfce link you provided without much success - and I did not even TRY to decipher the bash script!.
I decided to implement a DM - xdm. Followed the wiki carefully but  the modprobe .xstart command failed - no such file!
Having read up again on DMs, I removed xdm and installed Slim, again as per wiki.
Now system boots directly into Slim.
It has also taken care of the shutdown problem!!!! clicking the Slim logout button gives the options of logout, restart, shutdown etc. and they work.
I dont know why.

In case it is of interest, the contents of the main files follow:

Daemons from /etc/rc.conf

DAEMONS=(syslog-ng dbus !network wicd crond @alsa slim)

~/.xinitrc

#!/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 ck-launch-session $HOME/.xstart

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

~/.bash_profile

# ~/.bash_profile
#

#[[ -f ~/.bashrc ]] && . ~/.bashrc

if [[ ! $DISPLAY && $(tty) = /dev/tty1 ]]; then
exec startxfce4
fi

Perhaps I should mark this solved, but since I dont know why it is.......

eddie

Offline

#8 2011-11-12 23:06:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

I don't know what are you trying to do with this .xstart and 'modprobe .xstart' certainly won't work.
Do you have such file? Can you post it?

Offline

#9 2011-11-13 09:36:57

eamnomadic
Member
Registered: 2008-01-23
Posts: 11

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

karol
must have been tired when i posted; I got a couple of things wrong in the post re the xdm problem.
here the extract from the xdm wiki (which I followed carefully when installing xdm)

Installation

Install XDM:
# pacman -S xorg-xdm xorg-xconsole

Make .xsession executable:
$ chmod 744 .xsession

Optionally, install the Arch Linux theme for XDM:
# pacman -S xdm-archlinux xorg-xbutton

the chmod failed because .xsession did not exist. (pacman also said xorg-xbutton did not exist)

I tried it anyway (put xdm in /etc/rc.conf DAEMONS and rebooted) but it did not load, so I uninstalled it and went with Slim instead.

sorry for the post error - hope that clarifies?
meantime I'm happy enough that the two issues I had are ok.
I'll wait a day or two before marking this closed - just in case there are any other comments.
eddie

Offline

#10 2011-11-13 18:53:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] arch / xfce - auto-boot and shutdown issues

Thanks for explaining :-)
xorg-xbutton package seems to be gone, so I've removed it from the wiki.

Offline

Board footer

Powered by FluxBB