Re: replacing GDM with a script

2012-08-09 Thread Keith McKenzie
On 8 August 2012 23:05, Frank McCormick debianl...@videotron.ca wrote:
 On 08/08/12 05:17 PM, Keith McKenzie wrote:

 I just came across my old script for starting different WMs from the C/L.


Aah..I remember that know...ran Slack years ago.

Good, thanks for digging that up.

Siard, in another reply shows the scripts he uses...similar and
 accomplishes  the same thing


 Thanks

 --
 Cheers
 Frank

You're welcome, (I think I may have forgotten the 'dots' in the script).

-- 
Sent from FOSS (Free Open Source Software)
Debian GNU/Linux


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cal36vgkhocqr5zdgedogqtxca70bntnsybf4dv1mhggevpa...@mail.gmail.com



Re: replacing GDM with a script

2012-08-08 Thread Frank McCormick

On 08/08/12 02:34 AM, Andrei POPESCU wrote:



On Vi, 03 aug 12, 10:24:03, Frank McCormick wrote:


At this point it's just plain curiousity :)  Seems to me GDM,
while it does a good job  takes up a lot of memory (I only have a
gig) to just pick a window manager. Although at this point I guess
GDM does more than that, allowing different users to log-in,
handling security etc. But i am the only user of this machine, so a
lot of those areas are of little or no concern to me.


1. Install nodm
2. Change window manager/Desktop Environment with

# update-alternatives --config x-session-manager



At this point I am running SLIM...although I am told now it is 
unmaintained. How can that be if it's still in the repositories ?


Anyway it requires a fair amount of config-ing...and much info necessary 
to get it running properly is not in the manual or even on the home website.


I'll see how it goes..and will try nodm later, although if I have to 
update-alternatives every time I change wm...that would soon become a 
PITA :)




--
Cheers
Frank


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/5022b514.6010...@videotron.ca



Re: replacing GDM with a script

2012-08-08 Thread Andrei POPESCU
On Mi, 08 aug 12, 14:51:00, Frank McCormick wrote:
 
 At this point I am running SLIM...although I am told now it is
 unmaintained. How can that be if it's still in the repositories ?

Probably because it doesn't have any RC bugs.

 Anyway it requires a fair amount of config-ing...and much info
 necessary to get it running properly is not in the manual or even on
 the home website.
 
 I'll see how it goes..and will try nodm later, although if I have to
 update-alternatives every time I change wm...that would soon become
 a PITA :)

On stable I dropped gdm for plain startx. On unstable, so far, lightdm 
did not get in the way enough to drop it as well, but my needs (and 
those of the people running computers administered by me) are simple ;)

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: replacing GDM with a script

2012-08-08 Thread Siard
Frank McCormick:
 Andrei POPESCU:
  Frank McCormick:
   At this point it's just plain curiousity :)  Seems to me GDM,
   while it does a good job  takes up a lot of memory (I only have a
   gig) to just pick a window manager. Although at this point I guess
   GDM does more than that, allowing different users to log-in,
   handling security etc. But i am the only user of this machine, so
   a lot of those areas are of little or no concern to me.
 
  1. Install nodm
  2. Change window manager/Desktop Environment with
 
  # update-alternatives --config x-session-manager
 
  At this point I am running SLIM...although I am told now it is 
 unmaintained. How can that be if it's still in the repositories ?
 
 Anyway it requires a fair amount of config-ing...and much info
 necessary to get it running properly is not in the manual or even on
 the home website.
 
 I'll see how it goes..and will try nodm later, although if I have to 
 update-alternatives every time I change wm...that would soon become a 
 PITA :)

Yet it could be simpler than that. As an example, I'll show how I start
either Fluxbox or KDE.

The easiest way to disable GDM that I know of, is using sysv-rc-conf.
Uncheck gdm for all runlevels.

/usr/local/fluxbox-session has this startup script:

#! /bin/sh
/usr/bin/unclutter -idle 2 
other stuff to start 
exec /usr/bin/fluxbox

/usr/local/kde-session has this startup script:

#! /bin/sh
other arbitrary stuff to start 
exec /usr/bin/startkde

/usr/local/bin/fb contains:

#! /bin/sh
startx /usr/local/fluxbox-session -- -dpi 96

/usr/local/bin/kde contains:

#! /bin/sh
startx /usr/local/kde-session -- -dpi 96

Of course, make all these files executable.

Now from the console, I start Fluxbox with the command 'fb'
or KDE with the command 'kde'.

You could write more scripts, each one starting its own set of programs
or commands.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120808220657.28a8175e.shiems...@kpnplanet.nl



Re: replacing GDM with a script

2012-08-08 Thread Chris Davies
Frank McCormick debianl...@videotron.ca wrote:
 I am running 3 Linux distros with Sid as my main one. I am curious to 
 know if it's possible to replace GDM with a BASH script.

It depends on what you want to do. It's possible, since bash provides
a Turing Complete language, but whether it's realistic is another matter.

Chris


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/b4saf9x5q8@news.roaima.co.uk



Re: replacing GDM with a script

2012-08-08 Thread Frank McCormick

On 08/08/12 05:17 PM, Keith McKenzie wrote:

I just came across my old script for starting different WMs from the C/L.

#! /bin/sh
clear;echo;echo Menu Items
echo;echo 1  TWM
echo 2  Blackbox
echo 3  Ratpoison
echo;echo Choice:  $reply; read reply
case $reply in
   1) cp initrc-twm initrc; startx
   ;;
   2) cp initrc-blackbox initrc; startx
   ;;
   3) cp initrc-ratpoison initrc; startx
   ;;
   *) echo Not an option
   ;;
esac
exit 0

HTH



   Aah..I remember that know...ran Slack years ago.

   Good, thanks for digging that up.

   Siard, in another reply shows the scripts he uses...similar and 
accomplishes  the same thing



Thanks

--
Cheers
Frank


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/5022e2a4.7080...@videotron.ca



Re: replacing GDM with a script

2012-08-06 Thread Tom H
On Fri, Aug 3, 2012 at 6:31 PM, Frank McCormick debianl...@videotron.ca wrote:
 On 03/08/12 01:15 PM, Tom H wrote:

 Interesting stuff. You can have 3-4-5 X sessions each with a different
 window manager. It works when run from a TTY but I can't get it working
 from
 a terminal in an existing session, despite what the author claims. What's
 more interesting is it doesn't seem to any much of an additional load on
 the
 CPU. I am sure there is one but the effect is minimal. However still far
 away from my original idea of replacing GDM with a BASH script(s). But a
 lot closer than I was this morning :)

 I must've misunderstood you. I thought that you wanted to run your
 three WMs simultaneously.

 If you just want a script to launch one of your WMs, something like
 this should do:

 $ cat wm.sh

 case $1 in
 wm1)
 /usr/bin/startx /path/to/wm1/executable
 ;;
 wm2)
 /usr/bin/startx /path/to/wm2/executable
 ;;
 wm3)
 /usr/bin/startx /path/to/wm3/executable
 ;;
 *)
 /usr/bin/startx /path/to/wmX/executable
 ;;
 esac

 That works ! I guess it's pretty simple BASH scripting...but not
 something I could do :) Can you tell me how I can get this script to run
 automatically on boot ? rc.local ? Yeah I know...you've helped enough
 already :)

I'm glad that it works but I don't understand your rc.local request.
If you add this script to rc.local, you won't be able to choose a WM,
unless you want rc.local to pause and wait for you to type in the WM
that you want to start.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=sxio0lkx9wu92kcnssrm+fjjtayrqgownja0pbt5yw...@mail.gmail.com



Re: replacing GDM with a script

2012-08-03 Thread Keith McKenzie
On 2 August 2012 17:22, Frank McCormick debianl...@videotron.ca wrote:

   I am running 3 Linux distros with Sid as my main one. I am curious to know
 if it's possible to replace GDM with a BASH script. The issue is complicated
 because I run 3 window managers with Sid and a similar situation with the
 other 2 distros. Googling the problem hasn't turned up much of interest. I
 am in Sid most of the time, so the script could only apply here. Does anyone
 have any suggestions?


 --
 Cheers
 Frank

Slackware used to have a script that called different .xinitrc startup
scripts to load whichever Window Manager was required at X starting.

Just needed .xinitrc.fluxbox, .xinitrc.icewm, etc in your /home.

HTH



-- 
Sent from FOSS (Free Open Source Software)
Debian GNU/Linux


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAL36VGkVVJ+snfTYyZ3_p=9BY=0_VqPj9MM8NNQ=vy361pz...@mail.gmail.com



Re: replacing GDM with a script

2012-08-03 Thread Tom H
On Thu, Aug 2, 2012 at 9:57 PM, Frank McCormick debianl...@videotron.ca wrote:
 On 02/08/12 04:19 PM, Tom H wrote:
 On Thu, Aug 2, 2012 at 12:22 PM, Frank McCormick
 debianl...@videotron.ca wrote:

 I am running 3 Linux distros with Sid as my main one. I am curious to
 know
 if it's possible to replace GDM with a BASH script. The issue is
 complicated
 because I run 3 window managers with Sid and a similar situation with the
 other 2 distros. Googling the problem hasn't turned up much of interest.
 I
 am in Sid most of the time, so the script could only apply here. Does
 anyone
 have any suggestions?

 http://ubuntuforums.org/showthread.php?t=271674

 Interesting stuff. You can have 3-4-5 X sessions each with a different
 window manager. It works when run from a TTY but I can't get it working from
 a terminal in an existing session, despite what the author claims. What's
 more interesting is it doesn't seem to any much of an additional load on the
 CPU. I am sure there is one but the effect is minimal. However still far
 away from my original idea of replacing GDM with a BASH script(s). But a lot
 closer than I was this morning :)

I must've misunderstood you. I thought that you wanted to run your
three WMs simultaneously.

If you just want a script to launch one of your WMs, something like
this should do:

$ cat wm.sh

case $1 in
wm1)
/usr/bin/startx /path/to/wm1/executable
;;
wm2)
/usr/bin/startx /path/to/wm2/executable
;;
wm3)
/usr/bin/startx /path/to/wm3/executable
;;
*)
/usr/bin/startx /path/to/wmX/executable
;;
esac


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=szdpek+ztrxfvpqsdolgpibl3byiworywzjnsw8+hq...@mail.gmail.com



Re: replacing GDM with a script

2012-08-03 Thread Frank McCormick

On 03/08/12 01:15 PM, Tom H wrote:


Interesting stuff. You can have 3-4-5 X sessions each with a different
window manager. It works when run from a TTY but I can't get it working from
a terminal in an existing session, despite what the author claims. What's
more interesting is it doesn't seem to any much of an additional load on the
CPU. I am sure there is one but the effect is minimal. However still far
away from my original idea of replacing GDM with a BASH script(s). But a lot
closer than I was this morning :)


I must've misunderstood you. I thought that you wanted to run your
three WMs simultaneously.

If you just want a script to launch one of your WMs, something like
this should do:

$ cat wm.sh

case $1 in
wm1)
/usr/bin/startx /path/to/wm1/executable
;;
wm2)
/usr/bin/startx /path/to/wm2/executable
;;
wm3)
/usr/bin/startx /path/to/wm3/executable
;;
*)
/usr/bin/startx /path/to/wmX/executable
;;
esac



   That works ! I guess it's pretty simple BASH scripting...but not 
something I could do :) Can you tell me how I can get this script to run 
automatically on boot ? rc.local ? Yeah I know...you've helped enough 
already :)





--
Cheers
Frank


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/501c5131.4020...@videotron.ca



Re: replacing GDM with a script

2012-08-02 Thread Darac Marjal
On Thu, Aug 02, 2012 at 12:22:27PM -0400, Frank McCormick wrote:
 
   I am running 3 Linux distros with Sid as my main one. I am curious
 to know if it's possible to replace GDM with a BASH script. The
 issue is complicated because I run 3 window managers with Sid and a
 similar situation with the other 2 distros. Googling the problem
 hasn't turned up much of interest. I am in Sid most of the time, so
 the script could only apply here. Does anyone have any suggestions?

With all the same functionality? Unlikely.

As a simple mystartx session? Probably. Try looking at how the
simpler display-managers work (lightdm, slim, nodm etc).



signature.asc
Description: Digital signature


Re: replacing GDM with a script

2012-08-02 Thread Dan Ritter
On Thu, Aug 02, 2012 at 12:22:27PM -0400, Frank McCormick wrote:
 
   I am running 3 Linux distros with Sid as my main one. I am curious
 to know if it's possible to replace GDM with a BASH script. The
 issue is complicated because I run 3 window managers with Sid and a
 similar situation with the other 2 distros. Googling the problem
 hasn't turned up much of interest. I am in Sid most of the time, so
 the script could only apply here. Does anyone have any suggestions?
 

I'm not entirely sure what you're asking, but let me outline
some possibilities:

- you don't have to run GDM at all. Disable it with update-rc.d
  and shut it down (/etc/init.d/gdm stop). Then you can start X 
  per user with startx. You can script that. 

- Perhaps you want to have custom GDM sessions? Look at the
  config files. You can select a desktop environment at GDM
  login time.


-dsr-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120802163433.gj8...@randomstring.org



Re: replacing GDM with a script

2012-08-02 Thread cortman
Or you can add a command to start x and your window manager to init.d.

Regards,
Cortman


On Thu, Aug 2, 2012 at 11:34 AM, Dan Ritter d...@randomstring.org wrote:
 On Thu, Aug 02, 2012 at 12:22:27PM -0400, Frank McCormick wrote:

   I am running 3 Linux distros with Sid as my main one. I am curious
 to know if it's possible to replace GDM with a BASH script. The
 issue is complicated because I run 3 window managers with Sid and a
 similar situation with the other 2 distros. Googling the problem
 hasn't turned up much of interest. I am in Sid most of the time, so
 the script could only apply here. Does anyone have any suggestions?


 I'm not entirely sure what you're asking, but let me outline
 some possibilities:

 - you don't have to run GDM at all. Disable it with update-rc.d
   and shut it down (/etc/init.d/gdm stop). Then you can start X
   per user with startx. You can script that.

 - Perhaps you want to have custom GDM sessions? Look at the
   config files. You can select a desktop environment at GDM
   login time.


 -dsr-


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/20120802163433.gj8...@randomstring.org



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cadfaa3lsh+rp3ywtyrv37qe_zimx_p3rqgiwikcg3c-nu9r...@mail.gmail.com



Re: replacing GDM with a script

2012-08-02 Thread Wayne Topa

On 08/02/2012 12:33 PM, Darac Marjal wrote:

On Thu, Aug 02, 2012 at 12:22:27PM -0400, Frank McCormick wrote:


   I am running 3 Linux distros with Sid as my main one. I am curious
to know if it's possible to replace GDM with a BASH script. The
issue is complicated because I run 3 window managers with Sid and a
similar situation with the other 2 distros. Googling the problem
hasn't turned up much of interest. I am in Sid most of the time, so
the script could only apply here. Does anyone have any suggestions?


With all the same functionality? Unlikely.

As a simple mystartxsession? Probably. Try looking at how the
simpler display-managers work (lightdm, slim, nodm etc).



I have been using this in my .bashrc file for years.  Maybe it could 
help you?  I have never used GDM.


x()
{
depth=${1:-24}
for i in `seq 0 4`; do  if [ ! -f /tmp/.X${i}-lock ]; then D=$i; 
break; fi; done

if [ -z $D ]; then
echo No free virtual terminal
else
/usr/bin/startx -- :${D} -depth 24 -dpi 96 2 ~/.X.err  
~/.X.out  

fi
}


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/501ace49.3070...@gmail.com



Re: replacing GDM with a script

2012-08-02 Thread Tom H
On Thu, Aug 2, 2012 at 12:22 PM, Frank McCormick
debianl...@videotron.ca wrote:

 I am running 3 Linux distros with Sid as my main one. I am curious to know
 if it's possible to replace GDM with a BASH script. The issue is complicated
 because I run 3 window managers with Sid and a similar situation with the
 other 2 distros. Googling the problem hasn't turned up much of interest. I
 am in Sid most of the time, so the script could only apply here. Does anyone
 have any suggestions?

http://ubuntuforums.org/showthread.php?t=271674


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=SxFso5kxrKhbEuVhJkO8bkykjOKnAqzzzh=u_ionno...@mail.gmail.com



Re: replacing GDM with a script

2012-08-02 Thread Wayne Topa

On 08/02/2012 03:59 PM, Frank McCormick wrote:

On 02/08/12 03:00 PM, Wayne Topa wrote:

On 08/02/2012 12:33 PM, Darac Marjal wrote:

On Thu, Aug 02, 2012 at 12:22:27PM -0400, Frank McCormick wrote:


I am running 3 Linux distros with Sid as my main one. I am curious
to know if it's possible to replace GDM with a BASH script. The
issue is complicated because I run 3 window managers with Sid and a
similar situation with the other 2 distros. Googling the problem
hasn't turned up much of interest. I am in Sid most of the time, so
the script could only apply here. Does anyone have any suggestions?


With all the same functionality? Unlikely.

As a simple mystartxsession? Probably. Try looking at how the
simpler display-managers work (lightdm, slim, nodm etc).



I have been using this in my .bashrc file for years. Maybe it could
help you? I have never used GDM.

x()
{
depth=${1:-24}
for i in `seq 0 4`; do if [ ! -f /tmp/.X${i}-lock ]; then D=$i;
break; fi; done
if [ -z $D ]; then
echo No free virtual terminal
else
/usr/bin/startx -- :${D} -depth 24 -dpi 96 2 ~/.X.err 
~/.X.out 
fi
}



I assume I'd have to disable (or remove) GDM. How do you use it ?


I don't see why , but remember I have never used gdm and don't have it 
installed.


1.  Add the above to .bashrc
2.  run . .bashrc to reread the .bashrc file
3.  to run it just type an x to go to X.

HTH




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/501aef1e.7040...@gmail.com



Re: replacing GDM with a script

2012-08-02 Thread Frank McCormick

On 02/08/12 04:19 PM, Tom H wrote:

On Thu, Aug 2, 2012 at 12:22 PM, Frank McCormick
debianl...@videotron.ca wrote:


I am running 3 Linux distros with Sid as my main one. I am curious to know
if it's possible to replace GDM with a BASH script. The issue is complicated
because I run 3 window managers with Sid and a similar situation with the
other 2 distros. Googling the problem hasn't turned up much of interest. I
am in Sid most of the time, so the script could only apply here. Does anyone
have any suggestions?


http://ubuntuforums.org/showthread.php?t=271674




  Interesting stuff. You can have 3-4-5 X sessions each with a 
different window manager. It works when run from a TTY but I can't get 
it working from a terminal in an existing session, despite what the 
author claims. What's more interesting is it doesn't seem to any much of 
an additional load on the CPU. I am sure there is one but the effect is 
minimal. However still far away from my original idea of replacing GDM 
with a BASH script(s). But a lot closer than I was this morning :)




--
Cheers
Frank


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/501b2fee.2010...@videotron.ca



Re: replacing GDM with a script

2012-08-02 Thread Andrei POPESCU
On Jo, 02 aug 12, 12:22:27, Frank McCormick wrote:
 
   I am running 3 Linux distros with Sid as my main one. I am curious
 to know if it's possible to replace GDM with a BASH script. The
 issue is complicated because I run 3 window managers with Sid and a
 similar situation with the other 2 distros. Googling the problem
 hasn't turned up much of interest. I am in Sid most of the time, so
 the script could only apply here. Does anyone have any suggestions?

It's unclear to me what you want to achieve by replacing gdm with bash 
scripts. Could you elaborate?

http://mywiki.wooledge.org/XyProblem

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature