[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: starting Idesk automatically in IceWM on Lenny



On Fri, Oct 16, 2009 at 11:33:17AM +1100, Tim Clewlow wrote:
> > On Wednesday 14 October 2009 00:34:57 Tim Clewlow wrote:
> >> > On Tuesday 13 October 2009 10:43:21 Tim Clewlow wrote:
> >> >> You can rearrange the order in which things are started in
> your
> >> >> .xsession file, ie you dont have to start the window manager
> >> last.
> >> > [snip]
> >> >> Basically, when the script finishes, X will close - so dont
> let
> >> >> the
> >> >> script finish - thats what the long sleeping loop at the end
> is
> >> >> for.
> >> >> I'm guessing your .xsession should look something like:
> >> >> #!/bin/sh
> >> >> xrdb -merge ~/.Xdefaults &
> >> >> icewm &
> >> >> sleep 1
> >> >> <other apps> &
> >> >> idesk &
> >> >> while [ 1 ] ; do
> >> >> sleep 1000d
> >> >> done
> >> >> The line 'sleep 1' is intended to be a little delay to give
> >> icewm
> >> >> time to start up before attempting to run idesk. It may not
> >> >> actually
> >> >> be necessary, or it may be too small a delay, it all depends
> on
> >> >> how
> >> >> idesk determines if icewm is running, ie it may look for a
> lock
> >> >> file
> >> >> created really quickly by icewm, or it may look for a process
> >> that
> >> >> may take some time to appear.
> > [snip]
> >> > I am beginning to think that either it is simply not doable, or
> >> it
> >> > is doable -
> >> > but not by me. :-(
> >> I installed icewm and idesk, created a directory ~/.idesktop and
> then started X with .xsession containing the following:
> >> #!/bin/sh
> >> xrdb -merge ~/.Xdefaults &
> >> icewm &
> >> idesk &
> >> while [ 1 ] ; do
> >> sleep 1000d
> >> done
> >> Idesk seems to start up fine, ie I had icewm running and an icon at
> >> the top left that looks kind of like a house with the text
> 'Idesk'
> >> written underneath.
> > Thank you very much for trying this out.
> > Yes - if you have not created any other icons, that is what you
> > should see.
> > I, however, still don't. :-(  There is obviously something else
> > either running
> > or not running as it ought to do.
> > Before trying this one, I did "rm .bash_profile" so that that
> would
> > not be
> > muddying the waters.  I then did exactly as you had done.  X
> failed
> > to start.
> > So I added startx to your script.  Not surprisingly, that made no
> difference.
> > So I recreated .bash_profile and put startx in it.
> > That gave me a functional system - but no desktop.  Just a nasty
> hashed
> > greying out grid.  Etc.  I have spent quite some time googling,
> and
> > trying
> > things out on my test system, including via the configuration
> files.
> >  We know
> > that this works for you, and that it works for me if I start idesk
> manually.
> > About the only thing I can think of to try is starting X
> > differently.  But
> > how?
> > You have done so much already, but I would be very grateful if you
> could tell
> > me how you start X on your system.
> > Lisi
> 
> It sounds like your system is not using the xsession method of
> managing an X session, which means it is using the native xinit
> method.

Is it?

Let's look at /etc/X11/Xsession

$ grep HOME /etc/X11/Xsession
USRRESOURCES=$HOME/.Xresources
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors

$ grep USERXSESSION /etc/X11/Xsession /etc/X11/Xsession.d/*
/etc/X11/Xsession:USERXSESSION=$HOME/.xsession
/etc/X11/Xsession:USERXSESSIONRC=$HOME/.xsessionrc
/etc/X11/Xsession:ALTUSERXSESSION=$HOME/.Xsession
/etc/X11/Xsession.d/40x11-common_xsessionrc:if [ -r "$USERXSESSIONRC" ]; then
/etc/X11/Xsession.d/40x11-common_xsessionrc:  . "$USERXSESSIONRC"
/etc/X11/Xsession.d/50x11-common_determine-startup:    for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"; do
/etc/X11/Xsession.d/50x11-common_determine-startup:    ERRMSG="$ERRMSG no \"$USERXSESSION\" file, no \"$ALTUSERXSESSION\" file,"

> That's ok, and just as easy to work with. First check if you
> have a file called .xinitrc in your home directory, if it exists,
> rename it to .xinitrc.sav to move it out the way for a bit (so you
> can always rename it back later if you want) with:
> 
>     mv ~/.xinitrc ~/.xinitrc.sav
> 
> Now create a brand new .xinitrc file in your home directory, it will
> be exactly the same as the .xsession file you made earlier, so if
> you still have the .xsession file just do:
> 
>     cp ~/.xsession ~/.xinitrc
> 
> Or if you need to create, or want to check, the new .xinitrc file
> then it should contain:
> 
> #!/bin/sh
> xrdb -merge ~/.Xdefaults &
> icewm &
> idesk &
> while [ 1 ] ; do
> sleep 1000d
> done

And if the session lasts longer?

Seriously, though, why not use the standard:

  idesk &
  icewm

?

> 
> As long as no-one has modified the X startup scripts (which is very
> unlikely for most systems), this should work, well, hopefully :-)
> 
> Also, I think there is a better way to start X than using a bashrc
> file - but we'll get to that later, 

Right. Start a new X session for each new console login. For each ssh
login. For each screen session. Have fun.

BTW: users of Squeeze / Sid might want to take a look at the package
nodm.

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


Reply to: