You are not logged in.
I don't know if you'll like it but I've added a manual how you can get commands like shutdown in the menulist to the wikipage.
And I've updated the part "Configuring CDM".
Good idea! Added a builtin option configurable the same way as console, with the ability to specify both shutdown and reboot commands.
I've found a bug if you start an X session the session isn't started in a login shell that causes loss of e.g. umlauts for german keyboard layout (öäüß).
As a fast solution I've changed in /usr/bin/cdmexec ck-launch-session startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null &
into
exec ck-launch-session bash --login -c startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null &
But this solution is bash dependent.
Added an option to use the login shell, it can be activated in the system settings section of cdmrc.
Offline
Works like a charm now.
I like it very much, all my systems use it now.
Website: andrwe.org
Offline
im not sure if this was thought of yet, but maybe it source a per user config that should override the global one, instead of having the special settings in /etc/cdmrc, there should be a ~/.cdm/ dir with user settings.
If you're going to have per-user settings, at least store them in $XDG_CONFIG_HOME
Offline
I've got an other idea but I don't know how to implement it.
If an user already has a session running and login again he gets two possibilities (if activated in the config file) first he can use the already running session or second he can start a new session.
I've a security question, is it possible to log a session if the tty is changed?
Website: andrwe.org
Offline
eldragon wrote:im not sure if this was thought of yet, but maybe it source a per user config that should override the global one, instead of having the special settings in /etc/cdmrc, there should be a ~/.cdm/ dir with user settings.
If you're going to have per-user settings, at least store them in $XDG_CONFIG_HOME
im talking about the following part of /etc/cdmrc:
##########################
### USER CONFIGURATION ###
##########################
# courtney() {
# Set CDM theme
# theme=lime
# List user allowed WM binary names
# wmbinlist=(openbox-session)
# List user allowed WM display names
# wmdisplist=(Openbox)
# Allow console login?
# allowconsole=no
# Set specific display for user
# display=1
# }
############################
which is a per user settings. right now, if a user wants special treatment (be it a different theme), he/she needs root privileges to edit that file.
anyway, im liking it..
one small issue. i used gdm before this and apparently it handled my suspend actions since the key combinations stopped working when i got rid of gdm. is there any way i can fix this? or should i set it manually like ive already done?
EDIT: the suspend issue is linked to polkit. so is the issue of not being able to mount pendrives and such... the problem is explained here: http://bbs.archlinux.org/viewtopic.php?id=82170&p=2
the solution is, instead of starting gnome-session, create a script with the following:
#!/bin/bash
exec ck-launch-session gnome-session
and start the session with that script instead.
Last edited by eldragon (2009-11-11 17:09:43)
Offline
the solution is, instead of starting gnome-session, create a script with the following:
#!/bin/bash exec ck-launch-session gnome-session
and start the session with that script instead.
How is coding exec ck-launch-session gnome-session into CDM different then calling a script that does the same thing? Am i missing something? I would like full gnome support in CDM, so if you can point out what I'm missing I'll be thankful
Offline
eldragon wrote:the solution is, instead of starting gnome-session, create a script with the following:
#!/bin/bash exec ck-launch-session gnome-session
and start the session with that script instead.
How is coding exec ck-launch-session gnome-session into CDM different then calling a script that does the same thing? Am i missing something? I would like full gnome support in CDM, so if you can point out what I'm missing I'll be thankful
no, im sure there is no difference, i just dont know how to pass the command with spaces
----
SNIP!! (read previous post on the issue )
EDIT
enableloginshell=yes drops the default xorg screen ( a couple of xterms and the clock thingy) instead
Last edited by eldragon (2009-11-12 01:56:49)
Offline
I just pushed a tiny update that (may) fix the gnome-session issue, mind testing it for me?
if you are refering to the locale settings, it didnt work.
same issue, loginshell=yes drops to an empty xorg
EDIT
read through your changes, and realized you were testing against gnome-session as a binary, which i had replaced for stargnome.
anyway, switching it back to gnome-session, X fails to start.
EDIT 2
added
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
to /etc/environment to fix the issue. and it does. but i guess this should be done within CDM, i dont know how to do this
Last edited by eldragon (2009-11-12 12:53:05)
Offline
What happens when you run gnome-session on a tty manually?
Website: andrwe.org
Offline
What happens when you run gnome-session on a tty manually?
gnome-session is not supposed to be run on its own, anyway, tried it and it fails to open the display.
im going to try and start x manually with gnome-session and see what happens....
EDIT
removed the environment tweaks, logged into console and ran "startx /usr/bin/gnome-session" and it worked ok.
Last edited by eldragon (2009-11-12 12:59:48)
Offline
Hi,
am I the only one having troubles getting multiple x-sessions running ? If I try to log in a second user once a first user is running X, the second (last) user to log on gets thrown back to tty1 login. Having looked around a bit it seems X tries to start on display 0 regardless of the value of ${display}.
Fatal server error:
Server is already active for display 0
EDIT:
I've tried the following after logging a second user in on tty2; with success;
> source /etc/cdmrc
> export wm_bin=/path/to/wm
> exec ck-launch-session startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null &
and by magic - a second x-session appears on ctrl-alt-F8 !
EDIT 2:
but when I try the login shell version (I run bash) i.e
exec ck-launch-session --login -c startx /usr/share/cdm/xinitrc -- :${display}
X fails with same error as above.
Hope this information is helpful.
Last edited by choubi (2009-11-12 15:21:18)
Offline
Try it now.
nope. same results as above: summarizing:
wmbinlist=(gnome-session)
loginshell=no
starts gnome but locale is set wrong in gnome-terminal
----
wmbinlist=(gnome-session)
loginshell=yes
starts X with default stuff (no gnome-session), some xterm and a clock
----
the new version takes 2 seconds longer to start X too no matter what i do
both tests have been done with /etc/environment empty
EDIT
to reply to the above post:
Hi,
am I the only one having troubles getting multiple x-sessions running ? If I try to log in a second user once a first user is running X, the second (last) user to log on gets thrown back to tty1 login. Having looked around a bit it seems X tries to start on display 0 regardless of the value of ${display}.Fatal server error: Server is already active for display 0
yes, same issue here...
Last edited by eldragon (2009-11-12 14:03:59)
Offline
I'm not a bash (nor any other scripting language) expert, but I have the feeling there is a problem with how variables are exported. That is one thing I never really got my head around - where should a user put definitions of variables like proxies, ssh-agents etc. ? Using cdm, stuff that was working with slim don't - due to missing definitions of variables I think.
Another thing I don't know is in what order /etc/profile.d/*.sh get executed. If some is not done before /etc/profile.d/cdm-profile.sh, then they will not be executed as far as I understand (and that might include the locale.sh and also more important for me x11-ssh-askpass.sh). Furthermore - if one does NOT use the login shell option I think neither ~/.bash_profile nor ~/.bashrc nor ~/.xinitrc gets read. Is this intentional ?
Offline
I'm not a bash (nor any other scripting language) expert, but I have the feeling there is a problem with how variables are exported. That is one thing I never really got my head around - where should a user put definitions of variables like proxies, ssh-agents etc. ? Using cdm, stuff that was working with slim don't - due to missing definitions of variables I think.
That may be true, CDM is very much in alpha state still, things will go wrong. I'm still researching the best way to handle things like this.
Another thing I don't know is in what order /etc/profile.d/*.sh get executed. If some is not done before /etc/profile.d/cdm-profile.sh, then they will not be executed as far as I understand (and that might include the locale.sh and also more important for me x11-ssh-askpass.sh). Furthermore - if one does NOT use the login shell option I think neither ~/.bash_profile nor ~/.bashrc nor ~/.xinitrc gets read. Is this intentional ?
I'm not using the login shell option and all .bash_profile and .bashrc both get sourced for me just fine. .xinitrc does not get read because CDM has an inbuilt xinitrc to handle launching of various DE/WMs without the need for editing user configs. Once I get a few things sorted out (incremental X displays and the issues with gnome-session primarily) I plan on adding a configuration option for setting commands to run at startup. This should handle anything outside of the actual session that you would typically put in xinitrc.
Offline
So far I've only been raising issues and problems - I'd like to make it clear that I find the idea of a console display manager absolutely brilliant.
That may be true, CDM is very much in alpha state still, things will go wrong. I'm still researching the best way to handle things like this.
...
I'm not using the login shell option and all .bash_profile and .bashrc both get sourced for me just fine.
Regarding the first point - I think the problem lies in when the cdm scripts are run. As one would want them to be independent on the user and his/her options/local variables/and so forth there are only two possibilities: either run them as early as possible, that is from inittab or very early in /etc/profile and then source the rest of the login scripts from cdm (I do not know if this is possible), OR run them as late as possible, i.e AFTER ~/.bashrc, /etc/profile.d and friends (not a very clean way of doing it). As stated somewhere above - I'm not very good with scripting - I merely try to find a way where you avoid interfering with the rest of the login scripts. Right now it runs in the middle (depending on the order (alphabetical ?) the scripts in /etc/profile.d/ are run) and starts X before having finished with the rest of the login scripts.
Regarding the second point - yes you're right - I must have messed up something when I tried to figure out why SSH_ASKPASS wasn't set and exported as before.
Offline
Maybe you could use the lock files in /tmp/.X11-unix/ ? There seems to be one for each display - called X0, X1 etc
Offline
Isn't CDM more of a session manager than a display manager?
I would imagine most people use a display manager to have pretty/useful login facility, but CDM doesn't start until after the login.
Are there any plans to add the ability to login from CDM itself?
Offline
I'm still having issues with incremental X sessions, if anyone has any ideas or wants to take a crack at it, please feel free.
I'm using this script for my needs, maybe you can use something, or get an idea:
#!/bin/bash
#------------------------------
# A script for a starting Xorg, by moljac024
#------------------------------
# Configuration:
# X starts on tty number:
X_TTY=7
#------------------------------
# Check arguments
if [[ "$#" -lt "1" ]]; then
display=0
else
display="$1"
fi
if `echo "$1" | grep [^0-9] &>/dev/null`; then
#echo "Specified argument is not a number, defaulting to display :0"
display=0
fi
# Check if X is already running on that display
xdpyinfo -display :$display.0 &> /dev/null && \
echo $? &> /dev/null
# Start X or switch to it if it is already running
if [[ `echo $?` == "1" ]]; then
echo "Starting X..."
exec ck-launch-session startx -- :$display &> /dev/null &
else
echo "Switching to X..."
let tty=$display+$X_TTY
sudo chvt $tty
fi
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Offline
This isn't nice but it works to get the highest used screen number:
find /tmp/ -maxdepth 1 -name .X*-lock | tail -n 1 | sed 's/.*\([0-9]\).*/\1/g'
Website: andrwe.org
Offline
Wouldn't something as simple as this work:
# Get the first empty display
display=0
while true; do
xdpyinfo -display :$display.0 &> /dev/null && \
echo $? &> /dev/null
if [[ "$?" == "0" ]]; then
let display=$display+1
else
break
fi
done
echo "Starting X at display $display.."
exec ck-launch-session startx -- :$display &> /dev/null &
I just tried it and it works fine, it starts X at the first empty display...is that what you wanted?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline