FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-03-2012, 10:31 PM
Frank McCormick
 
Default replacing GDM with a script

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 501C5131.4020902@videotron.ca">http://lists.debian.org/501C5131.4020902@videotron.ca
 
Old 08-06-2012, 03:22 PM
Tom H
 
Default replacing GDM with a script

On Fri, Aug 3, 2012 at 6:31 PM, Frank McCormick <debianlist@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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAOdo=Sxio0LkX9Wu92KcNSSrm+fjjtaYRQGOwnja0pbT5YWdX Q@mail.gmail.com
 
Old 08-08-2012, 06:51 PM
Frank McCormick
 
Default replacing GDM with a script

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5022B514.6010400@videotron.ca">http://lists.debian.org/5022B514.6010400@videotron.ca
 
Old 08-08-2012, 07:01 PM
Andrei POPESCU
 
Default replacing GDM with a script

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
 
Old 08-08-2012, 07:43 PM
Chris Davies
 
Default replacing GDM with a script

Frank McCormick <debianlist@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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: b4saf9x5q8.ln2@news.roaima.co.uk">http://lists.debian.org/b4saf9x5q8.ln2@news.roaima.co.uk
 
Old 08-08-2012, 08:06 PM
Siard
 
Default replacing GDM with a script

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120808220657.28a8175e.shiems146@kpnplanet.nl">ht tp://lists.debian.org/20120808220657.28a8175e.shiems146@kpnplanet.nl
 
Old 08-08-2012, 09:17 PM
Keith McKenzie
 
Default replacing GDM with a script

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

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAL36VG=Lw0VPP4QF7xXaa7RKQpmcYkNAQZWqhac9OpQHwEEAA A@mail.gmail.com
 
Old 08-08-2012, 10:05 PM
Frank McCormick
 
Default replacing GDM with a script

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5022E2A4.7080402@videotron.ca">http://lists.debian.org/5022E2A4.7080402@videotron.ca
 
Old 08-09-2012, 08:10 AM
Keith McKenzie
 
Default replacing GDM with a script

On 8 August 2012 23:05, Frank McCormick <debianlist@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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAL36VGkHOcQR5ZdGEdOgQTXCA70BnTnSYbF4dV1MHggEvpaVz g@mail.gmail.com">http://lists.debian.org/CAL36VGkHOcQR5ZdGEdOgQTXCA70BnTnSYbF4dV1MHggEvpaVz g@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 10:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org