Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xmonad and LXDE.

141 views
Skip to first unread message

peas...@shaw.ca

unread,
Jul 12, 2012, 1:40:02 PM7/12/12
to
xdm and LXDE are installed here. Wikipedia tells that xdm
is a display manager and LXDE is a desktop environment. I'm
convinced that the acronyms are consistent with function.
No outstanding problems with either of these softwares.

Currently I'm interested to try xmonad. Wikipedia tells
that it is a window manager. The xmonad metapackage is
installed. /usr/share/doc/xmonad/README has
Running xmonad:
Add:
$HOME/bin/xmonad
to the last line of your .xsession or .xinitrc file.

/usr/share/doc/xmonad/README.Debian doesn't contradict this
but there is no ~/.xsession or ~/.xinitrc here.

Well, given that xmonad is a window manager, it might be able to
manage windows in LXDE. I opened an LXTerminal and tried it.

peter@dalton:~$ xmonad
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 7
Current serial number in output stream: 8

"private resource"? Definitely clear as mud.

In all the screenshots I've seen, the xmonad windows occupy the whole screen
with nothing else visible at the edges. So I wonder whether xmonad can run
on X without a desktop environment. Explanations?

Does anyone here use xmonad? How do you start it?

Thanks, ... Peter E.



-- 456789 123456789 123456789 123456789 123456789 123456789 123456789
Telephone 1 360 639 0202. Bcc: peter at easthope.ca http://carnot.yi.org/
"http://members.shaw.ca/peasthope/index.html#Itinerary "


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057580....@cantor.invalid

Matthew Moore

unread,
Jul 12, 2012, 2:00:01 PM7/12/12
to
On Thu 2012-07-12 10:29:32 AM, peas...@shaw.ca wrote:
> Currently I'm interested to try xmonad. Wikipedia tells
> that it is a window manager. The xmonad metapackage is
> installed. /usr/share/doc/xmonad/README has
> Running xmonad:
> Add:
> $HOME/bin/xmonad
> to the last line of your .xsession or .xinitrc file.
>
> /usr/share/doc/xmonad/README.Debian doesn't contradict this
> but there is no ~/.xsession or ~/.xinitrc here.

If you ditch xdm and start using startx, you can put the xmonad command
in your .xinitrc. If you want to keep using xdm, you'll need to create
the .xsession file. A minimal one would just have the command "xmonad"
in it. See

http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#How_can_I_use_xmonad_with_a_display_manager.3F_.28xdm.2C_kdm.2C_gdm.29

> In all the screenshots I've seen, the xmonad windows occupy the whole screen
> with nothing else visible at the edges. So I wonder whether xmonad can run
> on X without a desktop environment. Explanations?
>
> Does anyone here use xmonad? How do you start it?

I start it with startx, and don't run a DE with it. My .xinitrc has
commands for loading .Xresources and starting some programs like a
clipboard manager, dbus, etc. I find the whole setup very usable, and it
gives me more control than xdm would.

Hope this helps,
MM


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2012071217...@delta.lexicon

Cybe R. Wizard

unread,
Jul 12, 2012, 2:10:01 PM7/12/12
to
On Thu, 12 Jul 2012 10:29:32 -0800
peas...@shaw.ca wrote:

> Does anyone here use xmonad? How do you start it?

I just now installed it on my Debian Sid LXDE and started it by issuing:
xmonad --replace

I couldn't do a thing with it and re-started my xserver, then went
and read:
man xmonad.

I suggest you do so, especially the Usage part called Default keyboard
bindings.

I'm going now to print that man page and try to learn how to use it. I
hope you do, too.

Cybe R. Wizard
--
Nice computers don't go down.
Larry Niven, Steven Barnes
"The Barsoom Project"


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20120712130228.10bcf84d@wizardstower

John L. Cunningham

unread,
Jul 12, 2012, 2:40:01 PM7/12/12
to
On Thu, Jul 12, 2012 at 10:29:32AM -0800, peas...@shaw.ca wrote:
> In all the screenshots I've seen, the xmonad windows occupy the whole screen
> with nothing else visible at the edges. So I wonder whether xmonad can run
> on X without a desktop environment. Explanations?

xmonad is a tiling window manager. The windows expand and/or contract so
that the entire screen is always filled. (Unless you have configured it
to behave otherwise). You may want to search for xmonad on youtube to
see it in action.

>
> Does anyone here use xmonad? How do you start it?

How does xdm know to start LXDE if you don't have a ~/.xsession file?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20120712183...@infotech.vrg.org

peas...@shaw.ca

unread,
Jul 12, 2012, 2:50:01 PM7/12/12
to
From: "Cybe R. Wizard" <cybe_r...@earthlink.net>
Date: Thu, 12 Jul 2012 13:02:28 -0500
> started it by issuing:
> xmonad --replace

peter@dalton:~$ xmonad --replace
xmonad: user error (unrecognized flags)

peter@dalton:~$ xmonad --help
Usage: xmonad [OPTION]
Options:
--help Print this message
--version Print the version number
--recompile Recompile your ~/.xmonad/xmonad.hs
--restart Request a running xmonad process to restart

You have a different xmonad.

Regards, ... Peter E.




-- 456789 123456789 123456789 123456789 123456789 123456789 123456789 12
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057580....@cantor.invalid

Cybe R. Wizard

unread,
Jul 12, 2012, 3:00:02 PM7/12/12
to
On Thu, 12 Jul 2012 11:45:00 -0800
peas...@shaw.ca wrote:

> From: "Cybe R. Wizard" <cybe_r...@earthlink.net>
> Date: Thu, 12 Jul 2012 13:02:28 -0500
> > started it by issuing:
> > xmonad --replace
>
> peter@dalton:~$ xmonad --replace
> xmonad: user error (unrecognized flags)
>
> peter@dalton:~$ xmonad --help
> Usage: xmonad [OPTION]
> Options:
> --help Print this message
> --version Print the version number
> --recompile Recompile your ~/.xmonad/xmonad.hs
> --restart Request a running xmonad process to
> restart
>
> You have a different xmonad.
>
> Regards, ... Peter E.
>
Probably. Mine is 0.10-4+b2

Cybe R. Wizard
--
Nice computers don't go down.
Larry Niven, Steven Barnes
"The Barsoom Project"


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20120712135649.1cbbf923@wizardstower

Bob Proulx

unread,
Jul 12, 2012, 3:50:01 PM7/12/12
to
John L. Cunningham wrote:
> peas...@shaw.ca wrote:
> > In all the screenshots I've seen, the xmonad windows occupy the
> > whole screen with nothing else visible at the edges. So I wonder
> > whether xmonad can run on X without a desktop environment.
> > Explanations?
>
> xmonad is a tiling window manager. The windows expand and/or contract so
> that the entire screen is always filled. (Unless you have configured it
> to behave otherwise). You may want to search for xmonad on youtube to
> see it in action.

Additionally there are (at least) three layers when looking at this
topic. The X Window System itself, window managers, desktop
environments, in that order. X can be run by itself, albeit not very
usefully. Window managers need X. You can run very well with X and a
window manager and without a desktop environment. Desktop
Environments need X and usually need a window manager. This is
implementation dependent. GNOME 2 definitely worked in conjuction
with a window manager such as sawfish in the earlier days and then
metacity in the later days. Desktop environments are often criticized
for being very heavy and bloated.

Xmonad is a window manager. It may run on X and under a DE. But it
does not require a DE. It is perfectly functional by itself on X
without a DE.

Xmonad should run fine under LXDE. I believe that by default LXDE
uses openbox as the window manager. That means that before switching
to xmonad you should kill exit openbox first.

LXDE is a desktop environment. It is relatively lightweight when
compared to GNOME and KDE. But relatively heavy when compared to X
and a light window manager by itself.

I personally don't like the heavy desktop environments. I run X with
a window manager but without a desktop session manager. For the
previous couple of decades it was fvwm. A very nice environment.
These days I am using awesome window manager. I am also exploring
stumpwm and xmonad too. All tiling managers. All without a desktop
environment such as LXDE, KDE, or GNOME.

> > Does anyone here use xmonad? How do you start it?
>
> How does xdm know to start LXDE if you don't have a ~/.xsession file?

On Debian the default /etc/X11/Xsession will use a default if you
don't have one of your own. The Debian one must handle different
packages being installed and removed therefore it uses the command
x-session-manager as an "alternatives" management system. Various
window managers install alternatives to it. It always points to
either the highest priority installed one, the last installed one if
there are equal priorities, or the manually selected one.

Run this:

$ update-alternatives --display x-session-manager

The output will be different depending upon what you have installed
and the order you installed them.

Bob
signature.asc

peas...@shaw.ca

unread,
Jul 12, 2012, 8:50:01 PM7/12/12
to
From: "John L. Cunningham" <djo...@gmail.com>
Date: Thu, 12 Jul 2012 14:32:19 -0400
> You may want to search for xmonad on youtube to
> see it in action.

Nice demonstrations, thanks. The ETH Oberon interface is
similar except that the inter-track boundary isn't moveable.

I'm interested to see how well navigation can occur
with the mouse rather than with key combinations.

From: Bob Proulx <b...@proulx.com>
Date: Thu, 12 Jul 2012 13:49:38 -0600
> Additionally there are (at least) three layers when looking at this
> topic. The X Window System itself, window managers, desktop
> environments, in that order. X can be run by itself, albeit not very
> usefully. Window managers need X. You can run very well with X and a
> window manager and without a desktop environment. Desktop
> Environments need X and usually need a window manager. ...

Thanks. Those concepts are crucial and I haven't seen them mentioned
elsewhere; and my thinking had the relationship between DE and WM
reversed.

Now if DirectFB could supplant X, the system would be even more efficient.

> Xmonad is a window manager. It may run on X and under a DE. But it
> does not require a DE. It is perfectly functional by itself on X
> without a DE.
>
> Xmonad should run fine under LXDE. I believe that by default LXDE
> uses openbox as the window manager. That means that before switching
> to xmonad you should kill exit openbox first.

In light of the above, that makes perfect sense and will allow me
to learn xmonad in short intervals without spending too much time
reconfiguring.

> ... x-session-manager ... always points to
> either the highest priority installed one, the last installed one if
> there are equal priorities, or the manually selected one.

Will also be worthwhile to find how this manual selection is accomplished.

Thanks to everyone for the replies, ... Peter E.



-- 456789 123456789 123456789 123456789 123456789 123456789 123456789 12
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057580....@cantor.invalid

peas...@shaw.ca

unread,
Jul 12, 2012, 10:50:01 PM7/12/12
to
From: Bob Proulx <b...@proulx.com>
Date: Thu, 12 Jul 2012 13:49:38 -0600
> ... before switching to xmonad you should kill exit openbox first.

Killing the openbox process is easy but how can another WM be
started? There is no terminal on the target system and xmonad lacks
a display parameter which might allow starting via the network.

> $ update-alternatives ...

This is my effort to switch the WM with update-alternatives.

root@dalton:/home/peter# update-alternatives --config x-window-manager
There are 2 choices for the alternative x-window-manager (providing /usr/bin/x-w
indow-manager).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/openbox 90 auto mode
1 /usr/bin/openbox 90 manual mode
2 /usr/bin/xmonad 20 manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/xmonad to provide /usr/bin/x-window-manager
(x-window-manager) in manual mode.
root@dalton:/home/peter# update-alternatives --display x-window-manager
x-window-manager - manual mode
link currently points to /usr/bin/xmonad
/usr/bin/openbox - priority 90
slave x-window-manager.1.gz: /usr/share/man/man1/openbox.1.gz
/usr/bin/xmonad - priority 20
Current 'best' version is '/usr/bin/openbox'.

No error message but openbox remains 'best'?

Thanks, ... Peter E.

-- 456789 123456789 123456789 123456789 123456789 123456789 123456789 12
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057580....@cantor.invalid

Bob Proulx

unread,
Jul 13, 2012, 1:00:02 AM7/13/12
to
peas...@shaw.ca wrote:
> Bob Proulx wrote:
> > ... before switching to xmonad you should kill exit openbox first.
>
> Killing the openbox process is easy but how can another WM be
> started? There is no terminal on the target system and xmonad lacks
> a display parameter which might allow starting via the network.

When doing things like that with the window manager I usually start a
terminal first. I like xterm. Then in xterm I would kill the
previous window manager and then start the second.

$ ps -e | grep openbox
$ kill $OPENBOXPID
$ xmonad &

More pedantically that last should probably be:

$ nohup xmonad </dev/null >~/.xsession-errors 2>&1 &
$ disown

> > $ update-alternatives ...
>
> This is my effort to switch the WM with update-alternatives.
>
> root@dalton:/home/peter# update-alternatives --config x-window-manager
> There are 2 choices for the alternative x-window-manager (providing /usr/bin/x-w
> indow-manager).
>
> Selection Path Priority Status
> ------------------------------------------------------------
> * 0 /usr/bin/openbox 90 auto mode
> 1 /usr/bin/openbox 90 manual mode
> 2 /usr/bin/xmonad 20 manual mode

Looks reasonable.

> Press enter to keep the current choice[*], or type selection number: 2
> update-alternatives: using /usr/bin/xmonad to provide /usr/bin/x-window-manager
> (x-window-manager) in manual mode.

Looks good.

> root@dalton:/home/peter# update-alternatives --display x-window-manager
> x-window-manager - manual mode
> link currently points to /usr/bin/xmonad
> /usr/bin/openbox - priority 90
> slave x-window-manager.1.gz: /usr/share/man/man1/openbox.1.gz
> /usr/bin/xmonad - priority 20
> Current 'best' version is '/usr/bin/openbox'.
>
> No error message but openbox remains 'best'?

Right. Because openbox has the highest priority of any package
installed providing that alternative.

But see where it says this:

> root@dalton:/home/peter# update-alternatives --display x-window-manager
> x-window-manager - manual mode
^^^^^^^^^^^

So the priority doesn't matter and the "best" doesn't matter.

> link currently points to /usr/bin/xmonad
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So you successfully switched the symlink.

To return the selection to the package priorities use --auto like
this:

update-alternatives --auto x-window-manager

Note that there is x-window-manager and x-session-manager and they are
used for slightly different purposes in the scripts. Both are Debian
specific because they were created to be something that the packages
could use to symlink through the alternatives so that different
packages could be swapped in and out as they are installed and removed.

Bob
signature.asc

peas...@shaw.ca

unread,
Oct 18, 2013, 2:00:02 PM10/18/13
to
From: Bob Proulx <b...@proulx.com>
Date: Thu, 12 Jul 2012 13:49:38 -0600
> You can run very well with X and a window manager and without a desktop environment.

Definitely I've taken note but for now I'm leaving LXDE.
For example, the task bar at the bottom of the screen is helpful
and I haven't learned to open it without LXDE.

From: Bob Proulx <b...@proulx.com>
Date: Thu, 12 Jul 2012 23:04:12 -0600
> Oops. Probably append instead of overwrite.
>
> $ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 &
> $ disown

I've tried to combine on one line and neither of these works.
$ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 & ; disown
$ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 & \; disown
Someone please give a correct syntax.

Thanks, ... Peter E.






--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +13606390202 Bcc: peasthope at shaw.ca http://carnot.yi.org/


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20120713050...@hysteria.proulx.com

Tony Baldwin

unread,
Jul 14, 2012, 3:10:01 PM7/14/12
to
On Thu, Jul 12, 2012 at 07:39:59PM -0800, peas...@shaw.ca wrote:
> From: Bob Proulx <b...@proulx.com>
> Date: Thu, 12 Jul 2012 13:49:38 -0600
> > ... before switching to xmonad you should kill exit openbox first.
>
> Killing the openbox process is easy but how can another WM be
> started? There is no terminal on the target system and xmonad lacks
> a display parameter which might allow starting via the network.
>

This might sound odd, but, what if you ran xmonad,
and then started the lxpanel?

./tony
--
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E
signature.asc

peas...@shaw.ca

unread,
Jul 15, 2012, 3:20:01 PM7/15/12
to
From: Bob Proulx <b...@proulx.com>
Date: Thu, 12 Jul 2012 22:57:03 -0600
> When doing things like that with the window manager I usually start a
> terminal first. I like xterm.

OK, xmonad ran and mod-p gave a dmenu as a list of commands in
a ribbon across the top of the screen. The left and right arrow keys scrolled
the list. I didn't find how to execute a command in dmenu or get a
result from any other xmonad "key binding". Didn't spend much time at
it and not complaining.

Incidentally, xmonad.man refers to the mod key but never mentions what
it is. <Alt>+<P> gave the dmenu. On a PC keyboard, mod appears to be Alt.

> </dev/null

Never seen /dev/null used for input. What is the advantage? Or what is
the harm in not specifying stdin?

> >~/.xsession-errors ... Oops. ... >> ~/.xsession-errors ...

No problem. Caught it.

> So the priority doesn't matter and the "best" doesn't matter.

I miss that point completely. What is the significance of auto and
manual?

Thanks, ... Peter E.



>-- 456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Telephone 1 360 639 0202. Bcc: peter at easthope.ca http://carnot.yi.org/
"http://members.shaw.ca/peasthope/index.html#Itinerary "


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057583....@heaviside.invalid

Daniel Landau

unread,
Jul 16, 2012, 2:50:01 AM7/16/12
to
On Sun, Jul 15, 2012 at 10:14 PM, <peas...@shaw.ca> wrote:
> Incidentally, xmonad.man refers to the mod key but never mentions what
> it is. <Alt>+<P> gave the dmenu. On a PC keyboard, mod appears to be Alt.
>

You can change the mod key. See:

http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Rebinding_the_mod_key_.28Alt_conflicts_with_other_apps.3B_I_want_the_____key.21.29

Daniel


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAPBTYu51rehe9ViwVVeW_+_6...@mail.gmail.com

peas...@shaw.ca

unread,
Jan 19, 2013, 12:10:01 PM1/19/13
to
man update-alternatives has no mention of how the priorities of
alternatives originate. The most reasonable explanation I can
imagine is that any new alternative is assigned a lower priority
than extant alternatives. Correct?

My example from last July.
peter@dalton:~$ update-alternatives --display x-window-manager
x-window-manager - auto mode
link currently points to /usr/bin/openbox
/usr/bin/openbox - priority 90
slave x-window-manager.1.gz: /usr/share/man/man1/openbox.1.gz
/usr/bin/xmonad - priority 20
Current 'best' version is '/usr/bin/openbox'.

Suppose that I prefer xmonad to openbox.

One way to indulge my prefence would be to somehow impose
it in the operation of startx. Apparently this is the effect
of the first instruction in http://wiki.debian.org/Xmonad,
"... add
STARTUP=x-window-manager
to your ~/.xsessionrc."

A second strategy would be to find a way to raise the priority
of xmonad. If my original speculation above is correct, this
might be achieved by de-installing both alternatives and
reinstalling in the desired order. Alternatively, by using
update-alternatives directly.

update-alternatives --remove x-window-manager /usr/bin/xmonad
update-alternatives --install x-window-manager x-window-manager /usr/bin/xmonad 100

This would give xmonad top priority system wide and should work
for a display manager as well as for startx. Comments welcome.

... Peter E.


--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +13606390202 Bcc: peasthope at shaw.ca http://carnot.yi.org/
"http://members.shaw.ca/peasthope/index.html#Itinerary "


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057907....@cantor.invalid

Kushal Kumaran

unread,
Jan 20, 2013, 1:50:02 AM1/20/13
to
peas...@shaw.ca writes:

> man update-alternatives has no mention of how the priorities of
> alternatives originate. The most reasonable explanation I can
> imagine is that any new alternative is assigned a lower priority
> than extant alternatives. Correct?
>

The packager chooses the priority. The alternative provided is
installed (by calling update-alternatives --install) from the package
postinst.

> My example from last July.
> peter@dalton:~$ update-alternatives --display x-window-manager
> x-window-manager - auto mode
> link currently points to /usr/bin/openbox
> /usr/bin/openbox - priority 90
> slave x-window-manager.1.gz: /usr/share/man/man1/openbox.1.gz
> /usr/bin/xmonad - priority 20
> Current 'best' version is '/usr/bin/openbox'.
>
> Suppose that I prefer xmonad to openbox.
>

Run update-alternatives --config x-window-manager to set your
preference. You don't need to mess with priority. It only decides what
will be selected automatically when packages are installed/removed. If
you override by running update-alternatives --config, then the priority
has no effect.

> One way to indulge my prefence would be to somehow impose
> it in the operation of startx. Apparently this is the effect
> of the first instruction in http://wiki.debian.org/Xmonad,
> "... add
> STARTUP=x-window-manager
> to your ~/.xsessionrc."
>
> A second strategy would be to find a way to raise the priority
> of xmonad. If my original speculation above is correct, this
> might be achieved by de-installing both alternatives and
> reinstalling in the desired order. Alternatively, by using
> update-alternatives directly.
>
> update-alternatives --remove x-window-manager /usr/bin/xmonad
> update-alternatives --install x-window-manager x-window-manager /usr/bin/xmonad 100
>
> This would give xmonad top priority system wide and should work
> for a display manager as well as for startx. Comments welcome.
>

I recommend you don't run update-alternatives --remove or --install for
this purpose. For most sysadmins, --config should be sufficient.

--
regards,
kushal


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/50fb91f4.a4d144...@mx.google.com

Bob Proulx

unread,
Jan 20, 2013, 3:00:01 AM1/20/13
to
peas...@shaw.ca wrote:
> man update-alternatives has no mention of how the priorities of
> alternatives originate. The most reasonable explanation I can
> imagine is that any new alternative is assigned a lower priority
> than extant alternatives. Correct?

The package postinst script will include the alternative and the
priority. For example the 'nano' package with the nano editor
contains:

update-alternatives --install /usr/bin/editor editor /bin/nano 40 \
--slave /usr/share/man/man1/editor.1.gz editor.1.gz \
/usr/share/man/man1/nano.1.gz

That priority is 40 and is assigned by the package.

> My example from last July.
> peter@dalton:~$ update-alternatives --display x-window-manager
> x-window-manager - auto mode
> link currently points to /usr/bin/openbox
> /usr/bin/openbox - priority 90
> slave x-window-manager.1.gz: /usr/share/man/man1/openbox.1.gz
> /usr/bin/xmonad - priority 20
> Current 'best' version is '/usr/bin/openbox'.
>
> Suppose that I prefer xmonad to openbox.
>
> One way to indulge my prefence would be to somehow impose
> it in the operation of startx. Apparently this is the effect
> of the first instruction in http://wiki.debian.org/Xmonad,
> "... add
> STARTUP=x-window-manager
> to your ~/.xsessionrc."

That is one way. That overrides the value determined by the
/etc/X11/Xsession.d/50x11-common_determine-startup script.
And there are other ways.

This way is good because it is personal for you and doesn't affect
others and works across boxes.

> A second strategy would be to find a way to raise the priority
> of xmonad. If my original speculation above is correct, this
> might be achieved by de-installing both alternatives and
> reinstalling in the desired order.

We have been here before:

http://lists.debian.org/debian-user/2012/07/msg00897.html

I suggested then and now:

# update-alternatives --config x-window-manager

Or in scripted batch mode:

# update-alternatives --set x-window-manager /usr/bin/xmonad

Order only matters among alternatives of the same priority.

> Alternatively, by using update-alternatives directly.

Either this (configuring update-alternatives) or setting it in your
dot files is probably better.

> update-alternatives --remove x-window-manager /usr/bin/xmonad
> update-alternatives --install x-window-manager x-window-manager /usr/bin/xmonad 100

Although that works, and it is your own system so go ahead if you feel
like it, this won't be preserved when packages are installed and
upgraded since they will have new package postinst scripts and won't
know to preserve your changes since the changes will be marked as
system automatic. But if you use --config or --set then they will be
marked as manual and they will. So I think --config or --set is the
better way to go. Or probably best is setting up your local files
with something like STARTUP or similar above.

Some time ago I posted this in a discussion about the Debian
alternatives and it includes a walkthrough of how alternatives are
used and configured. I think it is still relevant.

http://lists.debian.org/debian-user/2002/08/msg02808.html

Bob
signature.asc

peas...@shaw.ca

unread,
Jan 25, 2013, 12:20:02 PM1/25/13
to
* From: Bob Proulx <b...@proulx.com>
* Date: Thu, 12 Jul 2012 22:57:03 -0600
> So the priority doesn't matter and the "best" doesn't matter.
> ... you successfully switched the symlink.

I've added instructions about alternative window managers to
http://wiki.debian.org/Xmonad .

> When doing things like that with the window manager I usually start a
> terminal first. I like xterm. Then in xterm I would kill the
> previous window manager and then start the second.

Switching the WM with update-alternatives struck me as better
for a novice reading http://wiki.debian.org/Xmonad .

> $ ps -e | grep openbox
> $ kill $OPENBOXPID
> $ nohup xmonad </dev/null >~/.xsession-errors 2>&1 &

That gave an xmonad process and killed the terminal window;
but no response to <Alt>+<Shift>+<Enter>.

> $ disown

With the terminal gone I didn't pursue that.

I'm interested in criticism of http://wiki.debian.org/Xmonad
and won't complain if someone improves my addition.

Regards, ... Peter E.

--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +13606390202 Bcc: peasthope at shaw.ca http://carnot.yi.org/
"http://members.shaw.ca/peasthope/index.html#Itinerary "


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/171057913....@cantor.invalid

Anthony Campbell

unread,
Jan 28, 2013, 5:10:02 AM1/28/13
to
On 25 Jan 2013, peas...@shaw.ca wrote:
>
> Switching the WM with update-alternatives struck me as better
> for a novice reading http://wiki.debian.org/Xmonad .
>


With the method you give on the wiki you have to log out and in again to
swap the WM. I prefer to have two different WMs running simultaneously
and swap between them with Alt-Shift-F8 and Alt-Shift-F7. I have a
little script which launches an alternative WM (icewm in my case):


# switch to icewm
xinit /home/ac/.xxinitrc -- :1 &



Where .xxinitrc is my usual .xinitrc altered to launch icewm.

Actually, I use spectrwm instead of xmonad (avoids haskell) but the
same method applies. I seem to remember that ratpoison has the inbuilt
optio to swap window managers.

The reason I have this arrangement is that although I like tiling WMs
none of them works very well with programs that open a lot of windows,
like xsane and gimp. A stacking WM is better for these.


AC

--
Anthony Campbell - a...@acampbell.org.uk
http://www.acampbell.org.uk
http://www.reviewbooks.org.uk
http://www.skepticviews.org.uk
http://www.acupuncturecourse.org.uk
http://www.smashwords.com/profile.view/acampbell
https://itunes.apple.com/ca/artist/anthony-campbell/id73235412






--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/2013012809...@acampbell.org.uk

Bob Proulx

unread,
Oct 18, 2013, 5:40:02 PM10/18/13
to
peas...@shaw.ca wrote:
> I've tried to combine on one line and neither of these works.
> $ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 & ; disown
> $ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 & \; disown
> Someone please give a correct syntax.

Try it without the extra ';' there.

$ nohup xmonad </dev/null >> ~/.xsession-errors 2>&1 & disown

man bash

Lists
A list is a sequence of one or more pipelines separated by one
of the operators ;, &, &&, or ||, and optionally terminated by
one of ;, &, or <newline>.

The '&' and ';' occupy the same position in the command list. It is
one or the other but not both.

Bob
signature.asc
0 new messages