Posts: 1,308
BitJam
Joined: 31 Aug 2009
#1
I'm working on a console based desktop manager to replace SLiM.

I want to add features I've been missing such as letting users select a different window manager from the window manager menu. When they make their selection, X will restart with the new window manager. The list of window managers will be updated automatically as wm's are installed and removed so there will be no need to manually run update-default-desktop.

If this works, maybe I can use the same technology to spiff up the cli installer and perhaps other things.

Mock screen shot:

Code: Select all

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               Console Desktop Manager

   User:[demo]                         Icons:[SpaceFM]

          dwm           IceWM     XBMC
          e16           [jwm]
          Fluxbox       Razor
      
              [Configure]   [Help]
   
       Arrow keys:  select window manager
   Tab, Shift-tab:  select active area
        space-bar:  select, launch
Hot-keys: (U)ser (I)cons (W)indow-manager (C)onfigure (H)elp    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thoughts? Ideas? Suggestions?
Posts: 765
rust collector
Joined: 27 Dec 2011
#2
well, i don't know, but doesn't the login manager do something when you hibernate, and stuff?
will this allow that?

Not that I care, just wondering.

I like it, it is a little like qingy, isn't it?

Oh, will it add wm's that does not make its own... uh .desktop file, iIrc? __{{emoticon}}__
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#3
rust collector wrote:well, i don't know, but doesn't the login manager do something when you hibernate, and stuff?
will this allow that?
I don't know. I didn't know that dm's needed to do something special when you hibernate. ISTM there is not much a dm can do if a window-manager is already running.
I like it, it is a little like qingy, isn't it?
Yes!
Oh, will it add wm's that does not make its own... uh .desktop file, iIrc? __{{emoticon}}__
No. I plan to use the .desktop files found in /usr/share/xsessions/. AFAIK, that's the standard way it's done. See:


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.maketecheasier.com/customize-the-gdm-sessions-list/2010/08/08"
linktext was:"How to Customize the GDM Sessions List"
====================================



========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://askubuntu.com/questions/77191/how-can-i-use-lightdm-for-user-defined-sessions"
linktext was:"How can I use LightDM for user-defined sessions?"
====================================


If there is a better way PLMK.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#4
I have thought about text based display manager several times. I like the idea because you can fork to X. This means if there is a problem with X you still have Console to fall back on, without needing to know the"add a 3 to the end" or"press control alt f*". It would be especially cool if you could link smxi /sgfxi/inxi/cli-installer/etc scripts to run with a limited amount input needed. For example, just choose"Update Graphics" and away it goes.

As RC notes there is qingy, I like its screen handling. In particular, how it uses directfb to make a user interface similar to a X based display manager. This is nice for being"pretty".
There is also CDM, it is all bash based. It is nice because it cleanly works.
Here is the source for CDM
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/ghost1227/cdm"
linktext was:"https://github.com/ghost1227/cdm"
====================================


In the same way, I like how your screen shot appears to not need any other"system" (directfb or dialog).
However IMO there are too many keys, I would say to make it similar to slim with the press F1 to toggle WM.
For example:
to change the user just keep pressing"U" to toggle through the list
to change the Icons just keep pressing"I"
to change the WM just keep pressing"W"
to Configure the Display Manager press"C"
For help Press"H"
And to launch press"Enter"

The other way I would go is to make it similar to grub, with the main list being all the desktop sessions and the"F* menus" being"(U)ser","(I)cons","(C)onfigure","(H)elp". Where pressing"U" will Bring up the"User" menu, which you choose the user by pressing the Up and Down Arrows. When in a menu pressing"Enter" will set the selection, and in the main desktop list pressing"Enter" would execute the desktop.

I have not looked into it really deeply, as I could never fully figure out what a display manager needs to do to allow full system operation.
Hope this helps with the
BitJam wrote: Thoughts? Ideas? Suggestions?
Dave
Posts: 765
rust collector
Joined: 27 Dec 2011
#5
I like qingy, it can choose x sessions, and also non x, but it has a screensawer, and stuff I don't need.

I think it was mrt that noticed that slim used around 10mb, and never quit, and I think the explanation was that it had to keep running because it was used to do something to shutdown, or hibernate and such properly?

I dunno?
I don't use that stuff...

Anyway, as long as it lets me choose my wm, and get out of the way, I am ok with it
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#6
Thanks Dave!

TL;DR: The grid is best. We almost agree on the hot-keys, I think.
Dave wrote:I have thought about text based display manager several times. I like the idea because you can fork to X. This means if there is a problem with X you still have Console to fall back on, without needing to know the"add a 3 to the end" or"press control alt f*".
It would be trivial to add chvt commands to the WM menus. I've already done that here so I can get from X to another vt via the desktop menu. I'm not sure what you gain by forking because the other consoles are available. I will think about it. My plan was to not fork X so when you exit X, control comes back to the DM at a specific place in the code. That is how I was planning to implement a WM menu that allows the user to switch the WM. While in the WM, the user could select:

Main --> Window Manager --> Fluxbox

When the user selects this, we write a specific file containing"fluxbox" and logout. When control returns to the DM, it looks for that file. If it is fresh then we start X again but this time with the Fluxbox WM. To save RAM we could exec X. When we logout of X then we could exec the DM again. Alternative, we could just exit X and allow the DM to respawn via the inittab. This starts to get tricky because I want to detect when we are run from inittab and when we have exited from X.

I've also wanted to create a cli menu system similar to the WM menu systems. There should also be a cli control centre. Perhaps this would fill the need you are trying to fill with forking the DM.
It would be especially cool if you could link smxi /sgfxi/inxi/cli-installer/etc scripts to run with a limited amount input needed. For example, just choose"Update Graphics" and away it goes.
This is a great idea! Maybe it would fit better in the cli menus/control-centre. Maybe not. BTW: I also want to add a"pastebin" command that will send files or text to pastebin.com. IMO there should be both a cli and a gui version. There should be an option to post some standard diagnostics.
There is also CDM, it is all bash based. It is nice because it cleanly works.
Here is the source for CDM
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/ghost1227/cdm"
linktext was:"https://github.com/ghost1227/cdm"
====================================
Thanks. I didn't know about this. I will look into it.
However IMO there are too many keys, I would say to make it similar to slim with the press F1 to toggle WM.
Arrgh! __{{emoticon}}__ I thought you would be so pleased with my grid! IMO F1 in SLiM is a big pain because you don't see all the WMs available and if you go past the one you want you need to keep pressing F1 to cycle around. You and I have discussed at length the limitations of SLiM's WM selector. The grid can easily show you 20 or more WMs all at once. I also thought you would be pleased to see the icon-manager as a separate choice from the WM. I tried to address the problems you and I had discussed of giving users ready access to a large number of WMs.
For example:
to change the user just keep pressing"U" to toggle through the list
to change the Icons just keep pressing"I"
to change the WM just keep pressing"W"
For help Press"H"
to Configure the Display Manager press"C"
The"Hot-keys" line in the screen shot was meant to express an idea like this but, for example, once you pressed"U", a list of users would show up and you would use <Up-Arrow> and <Down-Arrow> to navigate the list. This is how Grub (with gfxboot) works. I think it is very intuitive.
And to launch press"Enter"
Yes. I'm having trouble capture <Enter> ATM but I'm working on it.
The other way I would go is to make it similar to grub, with the main list being all the desktop sessions
The names of the WMs are usually short. You can fit more in a grid than in a list. With a list, some of the WMs would be scrolled off-screen, etc. With a small number of WMs there is not much difference between a list and a grid. With a larger number, the grid is much better.

ISTM the only extra keys I've added are <Left-Arrow> and <Right-Arrow> (since Grub uses <Up-Arrow> and <Down-Arrow> to navigate through the main menu) and the <Tab> key to cycle through the active areas as an alternative to using the hot-keys. IMO the <Tab> key will be useful for newbies to quickly exploration of what is available while the hot-keys are a slightly faster way to get where you want once you are familiar with what everything does.

Thanks again Dave! I really appreciate all of your input.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#7
rust collector wrote:I think it was mrt that noticed that slim used around 10mb, and never quit,
I just tested this in VirtualBox and found slim used only 2 mb extra. I booted normally then opened up a virtual console as root and ran"free -m". I rebooted into runlevel 3, opened a virtual console as demo and ran"xinit". I then opened up a virtual console as root and ran"free -m". The first way used 82 mb and the second used 80 mb.
and I think the explanation was that it had to keep running because it was used to do something to shutdown, or hibernate and such properly?
In my experience there have been several different *strange* ways that slim prevented a clean shutdown so I finally gave up on it. One of the problems (strange crashing of the machine or something of that order) was caused by using slim when I had two video cards plugged in. Another problem happened when I modified my WM to save session info on shutdown. This made slim very angry. Don't know why. I switched to gdm and all these problems went away.

I had run another test first and got these results:

Code: Select all

SLiM + IceWM = 91M
SLiM only    = 65M
neither      = 48M
IceWM only   = 94M
This test wasn't as clean as the one I reported above. In this test SLiM seems to use negative 3 mb of ram. That's what caused me to reboot between tries in my test reported above. Here it looks like just running slim uses a lot of ram but you have to remember that X is running too. AFAICT, slim has a small memory footprint.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#8
A console DM is a great idea!

I personnally like the grid concept. Do you intend to show the default wm so that in the lion's share of cases, you are basically just logging into your usual environment?

I also like the icon-selector concept. seperate from the wm is the way it should be!

the way selecting the wm in slim has always bugged me and I usually take at least one trip around the list before I land on the option I want. But I love the slimpicity of a default login where you don't select anything, just type your login and password and go.
Posts: 765
rust collector
Joined: 27 Dec 2011
#9
Ok, so say it uses 2... but why doesn't it just stop, when it has logged in?
Nah, doesn't matter, I will use yours

Maybe, it would be an idea to let people choose what kind of login manager they want to use, when they install, almost like the sid,testing and stable box you get now? maybe use the same function that is in smxi?

hmm, no, I am sure you will get this right...

I like the idea of icons to pick my wm, an smxi sgfxi option is a good idea too.
But if you are doing a cli cc...keep the login manager as clean as possible.


will you stop posting while I am trying to post? __{{emoticon}}__
Posts: 1,062
Dave
Joined: 20 Jan 2010
#10
BitJam wrote: It would be trivial to add chvt commands to the WM menus. I've already done that here so I can get from X to another vt via the desktop menu. I'm not sure what you gain by forking because the other consoles are available. I will think about it. My plan was to not fork X so when you exit X, control comes back to the DM at a specific place in the code. That is how I was planning to implement a WM menu that allows the user to switch the WM. While in the WM, the user could select:

Main --> Window Manager --> Fluxbox

When the user selects this, we write a specific file containing"fluxbox" and logout. When control returns to the DM, it looks for that file. If it is fresh then we start X again but this time with the Fluxbox WM. To save RAM we could exec X. When we logout of X then we could exec the DM again. Alternative, we could just exit X and allow the DM to respawn via the inittab. This starts to get tricky because I want to detect when we are run from inittab and when we have exited from X.
Forking was a bad way of saying it, I did not know how else to say it __{{emoticon}}__
BitJam wrote: I've also wanted to create a cli menu system similar to the WM menu systems. There should also be a cli control centre. Perhaps this would fill the need you are trying to fill with forking the DM.
It would be especially cool if you could link smxi /sgfxi/inxi/cli-installer/etc scripts to run with a limited amount input needed. For example, just choose"Update Graphics" and away it goes.
This is a great idea! Maybe it would fit better in the cli menus/control-centre. Maybe not. BTW: I also want to add a"pastebin" command that will send files or text to pastebin.com. IMO there should be both a cli and a gui version. There should be an option to post some standard diagnostics.
I thought from the login screen because I was not aware of the thought of a cli menu / control center. The pastebin idea would be really helpfull, maybe an option to write to a file / usb stick?
BitJam wrote:
However IMO there are too many keys, I would say to make it similar to slim with the press F1 to toggle WM.
Arrgh! __{{emoticon}}__ I thought you would be so pleased with my grid! IMO F1 in SLiM is a big pain because you don't see all the WMs available and if you go past the one you want you need to keep pressing F1 to cycle around. You and I have discussed at length the limitations of SLiM's WM selector. The grid can easily show you 20 or more WMs all at once. I also thought you would be pleased to see the icon-manager as a separate choice from the WM. I tried to address the problems you and I had discussed of giving users ready access to a large number of WMs.
Yes I am very pleased! What I was meaning was rather than tab/ shift tab and the left right arrows, just simply press the one key to move to the next option in that section of the grid.
BitJam wrote:
For example:
to change the user just keep pressing"U" to toggle through the list
to change the Icons just keep pressing"I"
to change the WM just keep pressing"W"
For help Press"H"
to Configure the Display Manager press"C"
The"Hot-keys" line in the screen shot was meant to express an idea like this but, for example, once you pressed"U", a list of users would show up and you would use <Up-Arrow> and <Down-Arrow> to navigate the list. This is how Grub (with gfxboot) works. I think it is very intuitive.
OK, Then I miss understood what the hot keys would do. Really that is what I was thinking of when I meant a slim like toggle, the only difference being that rather than a menu using the up down arrows, all the options are visible on the main screen and you keep pressing the hotkey to select which one.
BitJam wrote:
And to launch press"Enter"
Yes. I'm having trouble capture <Enter> ATM but I'm working on it.
OK, I thought you might be doing something like that, but I was not sure why the spacebar so I mentioned it.
BitJam wrote:
The other way I would go is to make it similar to grub, with the main list being all the desktop sessions
The names of the WMs are usually short. You can fit more in a grid than in a list. With a list, some of the WMs would be scrolled off-screen, etc. With a small number of WMs there is not much difference between a list and a grid. With a larger number, the grid is much better.

ISTM the only extra keys I've added are <Left-Arrow> and <Right-Arrow> (since Grub uses <Up-Arrow> and <Down-Arrow> to navigate through the main menu) and the <Tab> key to cycle through the active areas as an alternative to using the hot-keys. IMO the <Tab> key will be useful for newbies to quickly exploration of what is available while the hot-keys are a slightly faster way to get where you want once you are familiar with what everything does.
OK again I miss understood the hotkeys, I thought the tab and arrow keys were the only way to move around. Now that I understand a little better the amount of keys seems a little more reasonable.
Posts: 765
rust collector
Joined: 27 Dec 2011
#11
Just to be sure, is this going into the grub screen, or is it the"next window"
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#12
dolphin_oracle wrote:Do you intend to show the default wm so that in the lion's share of cases, you are basically just logging into your usual environment?
Most definitely. The default will be highlighted, most likely with reverse video but that will be configurable. There will also be an autologin feature, just like SLiM.
I also like the icon-selector concept. separate from the wm is the way it should be!
That's Dave's idea.
I love the slimpicity of a default login where you don't select anything, just type your login and password and go.
Yes. A core design goal is to select intelligent defaults that reduce keystrokes. My current plan is to let you select a user, other than the default user, from a menu. I could have hot-keys jump to the first/next username that starts with the letter you press so if the list contains:

igor
jane
john
kathy

Then pressing"j" once gets you to"jane", pressing it again gets you to"john". Press it again and we wrap around to"jane". So from the main menu"ujj<enter>" selects the user"john". The"u" opens the user menu, the first"j" gets you"jane", the second gets you"john" and then <enter> selects"john" and returns you to the main menu. I'm not sure this level of speed/sophistication is needed though.

One problem is if I want to use a similar scheme to select the WM then there will be an ambiguity between selecting a WM with a single letter and selecting a menu like u --> user, h --> help, and so on. I could use uppercase letters for one of them but they are harder to type. Conceptually U --> user, H --> help, and so on makes sense because these are"bigger" steps. OTOH, these might get used often and people might be confused if they try a lowercase letter and it does not do what they expect. Another way out is to leave the WM selection disabled by default and force users to type"w" before selection a WM. Again, this would probably cause trouble.

@RC:
Ok, so say it uses 2... but why doesn't it just stop, when it has logged in?
For the same reason I don't want to fork X. When you log out of X, you return to the SLiM login page. This is trivial to implement if SLiM (or console-dm) keep running but starts to get delicate otherwise.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#13
Dave wrote:OK again I miss understood the hotkeys, I thought the tab and arrow keys were the only way to move around. Now that I understand a little better the amount of keys seems a little more reasonable.
I see. Brevity may be the soul of wit but it can make communication difficult. I apologize for the confusion I caused. It is also confusing because there are immediately two levels of navigation, one to move between WMs and another to move between menus.

I'll try to edit my original post to make things more clear.

I looked at CDM and I think my plan will be more sophisticated but there was a lot for me to learn from CDM.

I'm basing the basic arrow key navigation on the space-evaders program on the LiveCD/USB. It's located at /live/bin/space-evaders. It is almost entirely shell script. It is highly configurable. I find it is challenging with"-r8a10s4e5w100". It might start off slow. You can change the speed interactively with <up-arrow>, <down-arrow>. You can start out faster with the -t (--tick) option. The default is"-t10000" so"-t5000" will start out almost twice as fast. It speeds up as it goes along. Use -h to see all the command line options.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#14
rust collector wrote:Just to be sure, is this going into the grub screen, or is it the"next window"
I want to put it in the"next window" so we don't destroy the boot messages in tty1. If it is set for autologin then we can just go straight to X in tty7. If not, then we will need to execute"chvt 2" to change to tty2 (or whichever one we use). This can certainly be done when X exits to get us back to the console-dm. If we don't autologin on boot then I will have to see when it is best to run"chvt 2". It is possible that it will work okay if we do it inside console-dm but I won't count on it at this stage.
Posts: 765
rust collector
Joined: 27 Dec 2011
#15
ok, the grub screen has enough stuff already