Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] I have trouble when I use slim with xfce
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Sun Aug 19, 2012 2:49 am    Post subject: [Solved] I have trouble when I use slim with xfce Reply with quote

Slim works because I can see the graph login and even I can change the theme.
But whatever I change the configuration based on manual, I cannot launch the xfce4 from slim. Indeed, I can launch xfce by "starts" or "startxfce4".
It seems that slim can only launch "X" with a black screen and a "x" shape mouse pointer.
So who can tell me why? I have already worked on this a whole day.
Thanks.


Last edited by bluephoenix on Mon Aug 20, 2012 3:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Odward
n00b
n00b


Joined: 21 Mar 2012
Posts: 65

PostPosted: Sun Aug 19, 2012 7:12 am    Post subject: Reply with quote

If you haven't already, I believe F1 at the Slim login screen will allow you to be sure it isn't defaulting to a basic X session.
You may have to manually choose xfce.

I think in the slim.conf you would need to uncomment / create just 1
Code:
login_cmd exec /bin/bash -login ~/.xinitrc %startxfce4


If neither of those helps, can you post the contents of /etc/slim.conf and your /home/username/.xinitrc
Surely the answer lies within.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Sun Aug 19, 2012 7:42 am    Post subject: Here is the latest slim.conf document Reply with quote

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path /bin:/usr/bin:/usr/local/bin
default_xserver /usr/bin/X
xserver_arguments -nolisten tcp -br -deferglyphs 16

# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd /usr/sbin/suspend

# Full path to the xauth binary
xauth_path /usr/bin/xauth

# Xauth file for server
authfile /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
numlock on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd exec /bin/sh - ~/.xinitrc %session
# login_cmd exec /bin/bash -login ~/.xinitrc %session
# login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session
login_cmd exec /bin/bash -login ~/.xinitrc %startxfce4

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd some command
# sessionstop_cmd some command
# sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user
# sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
daemon yes

# Available sessions:
# The current chosen session name replaces %session in the login_cmd
# above, so your login command can handle different sessions.
# If no session is chosen (via F1), %session will be an empty string.
# see the xinitrc.sample file shipped with slim sources
sessions xfce4,
# Alternatively, read available sessions from a directory:
sessiondir /etc/X11/Sessions

# Executed when pressing F11 (requires media-gfx/imagemagick for import)
# Alternative is media-gfx/scrot. See Gentoo bug 252241 for more info.
screenshot_cmd import -window root /slim.png
#screenshot_cmd scrot /root/slim.png

# welcome message. Available variables: %host, %domain
welcome_msg Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg Session:

# shutdown / reboot messages
shutdown_msg The system is halting...
reboot_msg The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user simone

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login no


# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme lake

# Lock file, /etc/init.d/xdm expects slim.pid
lockfile /var/run/slim.pid

# Log file
logfile /var/log/slim.log
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Sun Aug 19, 2012 7:44 am    Post subject: .xinitrc Reply with quote

exec startxfce4
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Sun Aug 19, 2012 7:51 am    Post subject: Additional background Reply with quote

I can use F1 to switch different sessions, such as Xfce, Xfce4 and Xsession. But even after I choose one of them, like Xfce4. Slim cannot load Xfce4 accordingly. Still a black screen and a black cross (x) in the middle of the window. When you move the mouse, the cross will move accordingly.

So I think it is just the X window. I guess I have something wrong with my X window because the laptop will really hang up when I input "X" in the command line. While I can startxfce4 successfully. I really don't understand why the X fails but xfce can run.

Thank you very much for your answer!
Back to top
View user's profile Send private message
Odward
n00b
n00b


Joined: 21 Mar 2012
Posts: 65

PostPosted: Sun Aug 19, 2012 8:22 am    Post subject: Reply with quote

I didn't do a good job of proofreading my first post =) Just in case, I meant
Code:
login_cmd exec /bin/bash -login ~/.xinitrc

I shouldn't have appended the %startxfce4

Also in my slim.conf - although I'm not sure of the significance offhand I have the following two lines uncommented
Code:
sessionstart_cmd      /usr/bin/sessreg -a -l :0.0 %user
sessionstop_cmd     /usr/bin/sessreg -d -l :0.0 %user



May need to look into /var/log/slim.log

Are you familiar with pastebin? Since that file will probably be too much for a reasonable forum post

Otherwise you could 'emerge wgetpaste' and then
Code:
cat /var/log/slim.log | wgetpaste

You will be given a url you can post here so people can look for the answer without a huge post on this page.


Last edited by Odward on Sun Aug 19, 2012 9:49 am; edited 2 times in total
Back to top
View user's profile Send private message
Odward
n00b
n00b


Joined: 21 Mar 2012
Posts: 65

PostPosted: Sun Aug 19, 2012 8:31 am    Post subject: Re: Here is the latest slim.conf document Reply with quote

One minor thing you might also want to delete that trailing ',' in your /etc/slim.conf sessions.

You posted
Quote:
# Available sessions:
# The current chosen session name replaces %session in the login_cmd
# above, so your login command can handle different sessions.
# If no session is chosen (via F1), %session will be an empty string.
# see the xinitrc.sample file shipped with slim sources
sessions xfce4,
# Alternatively, read available sessions from a directory:
sessiondir /etc/X11/Sessions


Change to
Code:
sessions xfce4

with no trailing ,

*Edit
For what it's worth I'm not using xfce, I have lxde on the laptop using slim, and I don't have any sessions listed in that section.
I left them commented. Basically the login_cmd launches my desktop because I wasn't concerned with choosing anything else.

As I read this again it seems the purpose of that variable is to replace %session in login_cmd but since the method I suggested
doesn't use a variable - but instead specifically uses .xinitrc you can probably comment sessions xfce4. At least for now.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Mon Aug 20, 2012 3:33 pm    Post subject: After add the dbus to the rc-update default, slim can launch Reply with quote

I just type:
#rc-update add dbus default

and then everything get work!

So done!

Thank Odward's help! And other's concern!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum