Re: [gentoo-user] start X at startup without a login manager

2009-03-25 Thread Mick
On Friday 20 March 2009, Paul Hartman wrote:
 On Fri, Mar 20, 2009 at 10:09 AM, fei huang daniel.huang...@gmail.com 
wrote:
  I don't have any xdm, gdm stuff but would like to start my windows
  manager directly at startup, cause I'm the only one that use it.

 I agree with Sebastian, you should try slim

 http://en.gentoo-wiki.com/wiki/SLiM

What is the benefit of SLiM compared to vanilla xdm + Fluxbox?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] start X at startup without a login manager

2009-03-25 Thread Sebastian Günther
* Mick (michaelkintz...@gmail.com) [25.03.09 21:04]:
 On Friday 20 March 2009, Paul Hartman wrote:
  On Fri, Mar 20, 2009 at 10:09 AM, fei huang daniel.huang...@gmail.com 
 wrote:
   I don't have any xdm, gdm stuff but would like to start my windows
   manager directly at startup, cause I'm the only one that use it.
 
  I agree with Sebastian, you should try slim
 
  http://en.gentoo-wiki.com/wiki/SLiM
 
 What is the benefit of SLiM compared to vanilla xdm + Fluxbox?

autologin, shutdown and reboot

Sebastian


-- 
  Religion ist das Opium des Volkes.   Karl Marx

 s...@sti@N GÜNTHER mailto:sam...@guenther-roetgen.de


pgp2XqqqRBi43.pgp
Description: PGP signature


Re: [gentoo-user] start X at startup without a login manager

2009-03-25 Thread Paul Hartman
On Wed, Mar 25, 2009 at 3:03 PM, Mick michaelkintz...@gmail.com wrote:
 On Friday 20 March 2009, Paul Hartman wrote:
 On Fri, Mar 20, 2009 at 10:09 AM, fei huang daniel.huang...@gmail.com
 wrote:
  I don't have any xdm, gdm stuff but would like to start my windows
  manager directly at startup, cause I'm the only one that use it.

 I agree with Sebastian, you should try slim

 http://en.gentoo-wiki.com/wiki/SLiM

 What is the benefit of SLiM compared to vanilla xdm + Fluxbox?

The original poster apparently did not want to use XDM. SLiM is
simplistic (no remote access, etc), and supposedly more secure (does
not need to run as root).



Re: [gentoo-user] start X at startup without a login manager

2009-03-22 Thread gibboris
I was thinking about the proper way to set-up the autologin some time
ago.
Some hints which came to my mind :
1) should be started as a service so restart/start/stop may be used and
doesn't leave an open root shell
2) should be restarted with ctrl+alt+backspace without losing the
keyboard focus (may be a problem when not using telinit)
3) try to avoid the numerous wrappers of login managers in /etc/X11
4) should be able to come back to login manager by modifying only one
conf.d file (or env.d ?)
--- so below is the way I have set it up for the moment :
I did a kind of merge of the xdm and startUS.sh (script found on the
gentoo forums) so I don't have x11-apps/xdm but I have a xdm init script 
(which should have another name but it's just a modified version of the
original xdm script)
[xdm patch attached]
To avoid the unresponsive keyboard : I always use telinit so :
x:a:once:/etc/X11/startDM.sh
is appended in my /etc/inittab.

In startDM.sh a modification is done to make start-stop-daemon drop its
privs and set the minimum env needed by startx then xinit.
[startDM.sh patch attached]

Notice two facts : env X=y start-stop-daemon is used because I was not
able to use several --env options.
My user's .xinitrc sources its .bash_profile (which source /etc/profile)
to initialize the other variables.
(I would like to export the bash completion to my whole X session, but it's
another problem...)

An alternative is the make start-stop-daemon launch 'su -- -l'
but it's dirty because of the need to store the pid.

So the first problem is that the xdm script doesn't know the pid of xinit
because even without 'su', start-stop-daemon knows about startx, not
xinit.
The second one is that ctrl+alt+backspace isn't trapped correctly.
Should 'xinit restart' be the direct work of the daemon in the autologin
case ?
In the autologin case which imho implies the user has a .xinitrc, startx
is only useful for the 2 or 3 lines around mcookie.
Should startx be directly in /etc/init.d .
(as said in the header it's a old sample of this script) and the deep
meaning of runlevel (multiuser / graphic) should be think from the
beginning to understand the right way to organise the X11 launch stuff.
What about putting startx's $defaultserverarg and $enable_xauth in a
/etc/conf.d/xdm (or better : /etc/conf.d/xinit) ?

(the local.start is a hacky but short and understandable way to do
though :), a quick heavier case is there : 
http://www.gentoo-wiki.info/TIP_Passwordless_Login)
Anyway, I'm still a bit lost in the quest of the cleanest way
from system init to ~/xinitrc.
So any comment, advice, whatever ... would be greatly appreciated.

Raph

On Fri, Mar 20, 2009 at 11:09:56PM +0800, fei huang wrote:
 I don't have any xdm, gdm stuff but would like to start my windows
 manager directly at startup, cause I'm the only one that use it.
 
 here is my solution:
 I use runlevel 3 as default, and add a line of code in
 /etc/conf.d/local.start:
 
 su - myname -c startx
 
 this works just fine except my scim panel would not shown as before, but if
 I login in normally with my user name, and type startx manually,
 everything works perfect. I'm wondering what is the difference with those
 two steps that cause the problem,
 ps shows the scim processes  are just running normally, for reference, I
 pasted my xinitrc here:
 
 export XMODIFIERS='@im=SCIM'
 export GTK_IM_MODULE=scim
 scim -d
 
 xrdb -merge ~/.Xresources
 urxvtd -q -f -o
 
 conky -q 
 
 exec awesome
 
 
 any ideas?
 
 thanks
 
 fei
--- xdm.old 2009-02-06 12:11:29.0 +0100
+++ xdm 2009-02-06 12:15:53.0 +0100
@@ -85,6 +85,12 @@
EXE=/usr/bin/wdm
PIDFILE=
;;
+   none)
+   test -n $(id -u ${XUSER} 2/dev/null)  \
+   EXE=/usr/bin/startx \
+   PIDFILE=/var/run/x.pid \
+   NAME=startx
+   ;;
*)
EXE=
# Fix #65586, where MY_XDM is empty so EXE=somedir
@@ -140,6 +146,7 @@
save_options service ${EXE}
save_options name${NAME}
save_options pidfile ${PIDFILE}
+   save_options xuser${XUSER}
 
if [ -n ${CHECKVT-y} ] ; then
if vtstatic ${CHECKVT:-7} ; then
@@ -154,7 +161,11 @@
fi
fi

-   /etc/X11/startDM.sh
+   if [ -n ${XUSER} ]  [ -x /sbin/telinit ]; then
+   telinit a /dev/null 21
+   else
+   /etc/X11/startDM.sh
+   fi
eend 0
 }
 
--- startDM.sh.old  2009-03-22 00:33:04.0 +0100
+++ startDM.sh  2009-03-22 00:34:32.0 +0100
@@ -14,17 +14,27 @@
[ -r ${svclib}/sh/rc-services.sh ]  . ${svclib}/sh/rc-services.sh
 fi
 
-# Great new Gnome2 feature, AA
-# We enable this by default
-export GDK_USE_XFT=1
 export SVCNAME=xdm
 
 EXEC=$(get_options service)
 NAME=$(get_options name)
 

Re: [gentoo-user] start X at startup without a login manager

2009-03-22 Thread fei huang
I think we've got too far for it, the startx in local.start does have some
drawbacks, the system will become nonresponsive if I switch back to the
console, and the X seems running on VT2 instead of VT7, I studied the xdm
script and found I've missed lots of important steps, for stability, I tried
a login manager slim that they recommended, it worked perfect for me,
everything are back to normal now!

thanks again guys.

fei


Re: [gentoo-user] start X at startup without a login manager

2009-03-21 Thread Florian Philipp
Sebastian Günther schrieb:
 * Florian Philipp (li...@f_philipp.fastmail.net) [20.03.09 19:09]:
 fei huang schrieb:
 I don't have any xdm, gdm stuff but would like to start my windows
 manager directly at startup, cause I'm the only one that use it.

  You know that this is a possible security thread? Anyone who has access
 to your computer can simply press Ctrl+Alt+F1 and enter the console
 session you used to start x-server.
 Locking your X-session won't help against that.

 You did read, that he wants to start it via the local service, and from 
 the commandline?
 
 Propably not, since then your advice is pointless.
 

Err, right. Sorry for the noise.



signature.asc
Description: OpenPGP digital signature


[gentoo-user] start X at startup without a login manager

2009-03-20 Thread fei huang
I don't have any xdm, gdm stuff but would like to start my windows
manager directly at startup, cause I'm the only one that use it.

here is my solution:
I use runlevel 3 as default, and add a line of code in
/etc/conf.d/local.start:

su - myname -c startx

this works just fine except my scim panel would not shown as before, but if
I login in normally with my user name, and type startx manually,
everything works perfect. I'm wondering what is the difference with those
two steps that cause the problem,
ps shows the scim processes  are just running normally, for reference, I
pasted my xinitrc here:

export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE=scim
scim -d

xrdb -merge ~/.Xresources
urxvtd -q -f -o

conky -q 

exec awesome


any ideas?

thanks

fei


Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread Florian Philipp
fei huang schrieb:
 I don't have any xdm, gdm stuff but would like to start my windows
 manager directly at startup, cause I'm the only one that use it.
 
 You know that this is a possible security thread? Anyone who has access
to your computer can simply press Ctrl+Alt+F1 and enter the console
session you used to start x-server.
Locking your X-session won't help against that.



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread Joshua D Doll
Florian Philipp wrote:
 fei huang schrieb:
   
 I don't have any xdm, gdm stuff but would like to start my windows
 manager directly at startup, cause I'm the only one that use it.

 
  You know that this is a possible security thread? Anyone who has access
 to your computer can simply press Ctrl+Alt+F1 and enter the console
 session you used to start x-server.
 Locking your X-session won't help against that.

   
You can disable vt switching with:

Option DontVTSwitch boolean  in the server section of the xorg.conf

--Joshua Doll



Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread James Ausmus
On Fri, Mar 20, 2009 at 11:09 AM, Florian Philipp 
li...@f_philipp.fastmail.net wrote:

 fei huang schrieb:
  I don't have any xdm, gdm stuff but would like to start my windows
  manager directly at startup, cause I'm the only one that use it.
 
  You know that this is a possible security thread? Anyone who has access
 to your computer can simply press Ctrl+Alt+F1 and enter the console
 session you used to start x-server.
 Locking your X-session won't help against that.


I don't think so - with the local.start method that he's talking about, the
Virtual Console isn't logged in - X is started in the initscripts, not from
a logged in console...

Fei - try checking the value of the HOME and other environment variable
with the local.start method - I think that, since the initscripts are not
running in an interactive login prompt, some necessary env vars are not
being populated correctly. Maybe if you changed your su command to su
myuser -c source /etc/profile  startx ?

HTH-

-James


Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread Sebastian Günther
* Florian Philipp (li...@f_philipp.fastmail.net) [20.03.09 19:09]:
 fei huang schrieb:
  I don't have any xdm, gdm stuff but would like to start my windows
  manager directly at startup, cause I'm the only one that use it.
  
  You know that this is a possible security thread? Anyone who has access
 to your computer can simply press Ctrl+Alt+F1 and enter the console
 session you used to start x-server.
 Locking your X-session won't help against that.
 
You did read, that he wants to start it via the local service, and from 
the commandline?

Propably not, since then your advice is pointless.

-- 
  Religion ist das Opium des Volkes.   Karl Marx

 s...@sti@N GÜNTHER mailto:sam...@guenther-roetgen.de


pgprHiZIEt9He.pgp
Description: PGP signature


Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread Sebastian Günther
* fei huang (daniel.huang...@gmail.com) [20.03.09 16:12]:

 su - myname -c startx
 
 any ideas?

RTFM:

-, -l, --login
   Provide an environment similar to what the user would expect had the 
user
   logged in directly.

! When - is used, it must be specified as the last su option. 

   The other forms (-l and --login) do not have this restriction.

 
 thanks
 
 fei

HTH
Sebastian

-- 
  Religion ist das Opium des Volkes.   Karl Marx

 s...@sti@N GÜNTHER mailto:sam...@guenther-roetgen.de


pgp96oxnjcG16.pgp
Description: PGP signature


Re: [gentoo-user] start X at startup without a login manager

2009-03-20 Thread Paul Hartman
On Fri, Mar 20, 2009 at 10:09 AM, fei huang daniel.huang...@gmail.com wrote:
 I don't have any xdm, gdm stuff but would like to start my windows
 manager directly at startup, cause I'm the only one that use it.

I agree with Sebastian, you should try slim

http://en.gentoo-wiki.com/wiki/SLiM