Discussion:
[Fluxbox-users] Minimum ubuntu post-install recipe for fluxbox
Tim Johnson
2015-02-16 04:37:22 UTC
Permalink
To recap a former thread that I posted to this ML :
I've done a minimum install of ubuntu 14.04. This install can be
describe (as per ubuntu 12.04) at the following site:
http://www.psychocats.net/ubuntu/minimal

I believe this request could be considered outside of the venue of
this list, but I hope that some leeway could be considered, given
that I believe that many who use fluxbox do so on minimal
"hand-rolled" installation deployments. So I'll describe the process
as follows :

The minimum install for ubuntu 14.04 on this Asus EEEpc 900 does not
provide for x, window managers etc.

The initial install went flawlessly. I then installed fluxbox
without a login manager and that seemed to go just fine. I then
decided that I sould have a backup window manager and then installed
icewm and xdm. I found that xdm did not appear to provide me with a
menu of sessions and that it seemed that I was stuck with icewm.

I removed xdm, installed slim and to keep the story short, I ended
up with a mess. I believe it would best serve my interests by
re-installing.
From the psychocats link above there is a "recipe" which can be
quickly found by doing a search on the following string : "At the
prompt, type these three commands" etc...

The commands for the "recipe" are provided as follows :

### begin commands
sudo apt-get update

sudo apt-get install xorg xterm gdm icewm menu firefox gksu synaptic
--no-install-recommends

sudo service gdm start
### end commands

I would prefer to have *both* fluxbox and icewm as well as mc and
aptitude (in lieu of synaptic), but that is just me. I believe that
there are alternative login managers to gdm that still provide for
picking from any number of alternative wm sessions without the
"bulk" of gdm.

I would appreciate recommendations for an edited alternative to the
"recipe" above to suit my goal of having fluxbox with icewm as an
"backup" wm session and a basic but flexible login manager.

thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
Bob Hepple
2015-02-16 05:29:32 UTC
Permalink
lxdm ?

I use the lxdm spin of fedora on my lappy and it seems reasonably good
- not that I log off very often. It fully supports your ~/.xseesion by
putting this in /usr/share/xsessions/xsession.desktop:

[Desktop Entry]
Encoding=UTF-8
Name=XSession
Comment=This session will run your ~/.xsession
Exec=$HOME/.xsession
Icon=
Type=Application
[Window Manager]
SessionManaged=true

My .xsession file starts up the essentials:


ERRFILE="$HOME/.xsession-errors$DISPLAY"
exec &>> $ERRFILE

echo "==============================================================="
echo "Running .xsession ... $(date)"
export PS4='+$(basename
${BASH_SOURCE}):${LINENO}:${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x

[[ "$WM" ]] || {
F=~/.config/desktop
[[ -f $F ]] && source $F
}
[[ "$WM" ]] || WM=$(type $WM 2>/dev/null)

# fallbacks:

[[ "$WM" ]] || {
WM=$(
type startfluxbox 2>/dev/null ||
type awesome 2> /dev/null ||
type startkde 2> /dev/null ||
type gnome-session 2> /dev/null
)
[[ "$WM" ]] && {
set -- $WM
WM=$1
}
}

[[ "$WM" ]] || {
F=/etc/sysconfig/desktop
[[ -f $F ]] && source $F
[[ -x "$PREFERRED" ]] && WM=$PREFERRED
WM=$(type $WM 2>/dev/null)
}

# final unction:
[[ "$WM" ]] || WM=myterm

[ "$DBUS_SESSION_BUS_ADDRESS" ] || {
# eval `dbus-launch --sh-syntax --exit-with-session`
echo ".xsession: sourcing /etc/X11/xinit/xinitrc.d/*"
source /etc/X11/xinit/xinitrc.d/* # should do the above
}

echo ".xsession: .Xmodmap etc:"
MODMAP="$HOME/.Xmodmap"
MODMAPVNC="$HOME/.Xmodmap.vnc"
XRESOURCES=$HOME/.Xresources
H=$(hostname -s)
XRESOURCES_HOST=$XRESOURCES.$H
XMODMAP_HOST=$MODMAP.$H

# .Xresources is the modern way - why did they make such a random
# change from .Xdefaults?
[ -r $XRESOURCES ] && xrdb -merge $XRESOURCES
[ -r "$XMODMAP" ] && xmodmap "$XMODMAP"
[ "$VNCDESKTOP" -a -r "$MODMAPVNC" ] && xmodmap "$MODMAPVNC"
[ -z "$NX_CLIENT$VNCDESKTOP$X2GO_SESSION" ] && {
[ -r $XRESOURCES_HOST ] && xrdb -merge $XRESOURCES_HOST
[ -r $XMODMAP_HOST ] && xmodmap $XMODMAP_HOST
}

export BH_XSESSION=true

#fix-xft.dpi
xrandr -q | grep "VGA1 connected" && {
echo ".xsession: VGA1 detected setting up for VGA1 and LVDS1"
xrandr --output VGA1 --mode 1920x1080 --left-of LVDS1
xrandr --output LVDS1 --pos 1920x800
}

# g-k-d may have been started by the DM, maybe already initialised
# with the password:
type gnome-keyring-daemon && {
# --replace is on f19, not RHEL-6. g-k-d does not cache gpg
# keys so use gpg-agent instead! g-k-d sets .ssh-agent-info
# but doesn't set the pid - maybe the pid can change and they
# can't be bothered to update it? Bloody gnome.

# g-k-d may need these hacks to get the keyring to open at login:
# /etc/pam.d/xscreensaver: auth optional pam_gnome_keyring.so
# /etc/pam.d/passwd: password optional pam_gnome_keyring.so

GKD="gnome-keyring-daemon --start --components=secrets,ssh,pkcs11,gpg"
echo ".xsession: $GKD"
eval $( $GKD )

export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID SSH_AUTH_SOCK GPG_AGENT_INFO

SSH_AGENT_PID=$(pgrep gnome-keyring-daemon )
[[ "$SSH_AUTH_SOCK" ]] && {
{
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
echo "SSH_AGENT_PID=$SSH_AGENT_PID"
} > ~/.ssh-agent-info
}
}

# if you want to kill g-k-d:
#GKD_PID=$(
# ps -o pid,user --no-header -C gnome-keyring-daemon |
# awk "/$USER/ {print \$1; exit}"
#)
#[[ "$GKD_PID" ]] && kill $GKD_PID

[[ -z "$GPG_AGENT_INFO" ]] && type gpg-agent && {
echo ".xsession: running gpg-agent:"

# gpg-agent refuses to run if there's another one running:
EXISTING_GPG=$(
ps -o pid,user -C gpg-agent --no-header |
awk "/$USER/ {print \$1; exit}"
)
if [[ "$EXISTING_GPG" ]]; then
echo ".xsession: Re-using an existing gpg-agent with PID $EXISTING_GPG"
GPG_INFO_FILE="${HOME}/.gpg-agent-info"

[[ -e $GPG_INFO_FILE ]] && {
source $GPG_INFO_FILE
export GPG_AGENT_INFO
}
else
# if possible, don't use gpg-agent for ssh 'cos it sux esp. with
# batch-ssh - just use it for gpg keys:
USE_GPG_FOR_SSH=""
[[ -z "$SSH_AUTH_SOCK" ]] && ! type ssh-agent && USE_GPG_FOR_SSH="yes"

TTL=$(( 7 * 24 * 60 * 60 ))
GPG_OPTS="--daemon --write-env-file ${HOME}/.gpg-agent-info"
GPG_OPTS+=" --default-cache-ttl $TTL"
GPG_OPTS+=" --max-cache-ttl $TTL"

[[ "$USE_GPG_FOR_SSH" ]] && {
GPG_OPTS+=" --enable-ssh"
GPG_OPTS+=" --default-cache-ttl-ssh $TTL"
GPG_OPTS+=" --max-cache-ttl-ssh $TTL"
}

echo ".xsession: gpg-agent $GPG_OPTS"
eval $(gpg-agent $GPG_OPTS)
export GPG_AGENT_INFO

[[ "$USE_GPG_FOR_SSH" ]] && {
[[ "$SSH_AUTH_SOCK" ]] && {
{
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
echo "SSH_AGENT_PID=$SSH_AGENT_PID"
} > ~/.ssh-agent-info
}
}
fi
}

echo ".xsession: SSH_AUTH_SOCK='$SSH_AUTH_SOCK'"

AGENT=
[ "$SSH_AUTH_SOCK" ] || {
if type ssh-agent; then
echo ".xsession: no SSH_AUTH_SOCK so running $WM with ssh-agent:"
AGENT=ssh-agent
else
echo ".xsession: WARNING: no SSH_AUTH_SOCK and no ssh-agent!!!"
fi
}

echo ".xsession: running and waiting for: $AGENT $WM"
$AGENT $WM

# Cleanup

# ssh-agent dies with the WM; gpg-agent might be needed by another
# session for this user (only one per user). If you want to leave
# something running after the session finishes, better unset DISPLAY!!
echo ".xsession: $AGENT $WM finished, cleaning up"
for SIG in TERM KILL; do
for PID in GNOME_KEYRING_PID; do
[[ "${!PID}" ]] && kill -0 ${!PID} && kill -$SIG ${!PID}
done

# kill processes for this user on this display
for PID in $( pgrep -u $USER | grep -v "^$$"'$' ); do
# NB g-k-d's environ is read-only by root so won't match here
eval $( print_env $PID _ )
case $_ in
*/gpg-agent) continue ;;
esac
D=$( print_env $PID DISPLAY )
D=${D%.0}
[[ "$D" == "DISPLAY=${DISPLAY%.0}" ]] && kill -$SIG $PID
done
sleep 2
done
echo ".xsession: done cleaning up, exiting"
Post by Tim Johnson
I've done a minimum install of ubuntu 14.04. This install can be
http://www.psychocats.net/ubuntu/minimal
I believe this request could be considered outside of the venue of
this list, but I hope that some leeway could be considered, given
that I believe that many who use fluxbox do so on minimal
"hand-rolled" installation deployments. So I'll describe the process
The minimum install for ubuntu 14.04 on this Asus EEEpc 900 does not
provide for x, window managers etc.
The initial install went flawlessly. I then installed fluxbox
without a login manager and that seemed to go just fine. I then
decided that I sould have a backup window manager and then installed
icewm and xdm. I found that xdm did not appear to provide me with a
menu of sessions and that it seemed that I was stuck with icewm.
I removed xdm, installed slim and to keep the story short, I ended
up with a mess. I believe it would best serve my interests by
re-installing.
From the psychocats link above there is a "recipe" which can be
quickly found by doing a search on the following string : "At the
prompt, type these three commands" etc...
### begin commands
sudo apt-get update
sudo apt-get install xorg xterm gdm icewm menu firefox gksu synaptic
--no-install-recommends
sudo service gdm start
### end commands
I would prefer to have *both* fluxbox and icewm as well as mc and
aptitude (in lieu of synaptic), but that is just me. I believe that
there are alternative login managers to gdm that still provide for
picking from any number of alternative wm sessions without the
"bulk" of gdm.
I would appreciate recommendations for an edited alternative to the
"recipe" above to suit my goal of having fluxbox with icewm as an
"backup" wm session and a basic but flexible login manager.
thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Fluxbox-users mailing list
https://lists.sourceforge.net/lists/listinfo/fluxbox-users
Tim Johnson
2015-02-16 16:26:49 UTC
Permalink
Post by Bob Hepple
lxdm ?
I use the lxdm spin of fedora on my lappy and it seems reasonably good
- not that I log off very often. It fully supports your ~/.xseesion by
Thank you for the supporting resources as well. Good to see your
init files.
cheers
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
Eric S Fraga
2015-02-16 10:43:43 UTC
Permalink
On Sunday, 15 Feb 2015 at 19:37, Tim Johnson wrote:

[...]
Post by Tim Johnson
I would appreciate recommendations for an edited alternative to the
"recipe" above to suit my goal of having fluxbox with icewm as an
"backup" wm session and a basic but flexible login manager.
My experience is trying to achieve minimal installs is 1) not use ubuntu
but go with vanilla Debian, typically the testing version and 2) install
lightdm instead of gdm. Lightdm provides for a default xsession
session.
--
: Professor Eric S Fraga, CPSE, Chemical Engineering, UCL
: GnuPG/PGP key 0xFFFCF67D, http://www.ucl.ac.uk/~ucecesf
Tim Johnson
2015-02-16 16:20:47 UTC
Permalink
Post by Eric S Fraga
[...]
Post by Tim Johnson
I would appreciate recommendations for an edited alternative to the
"recipe" above to suit my goal of having fluxbox with icewm as an
"backup" wm session and a basic but flexible login manager.
My experience is trying to achieve minimal installs is 1) not use ubuntu
but go with vanilla Debian, typically the testing version and 2) install
lightdm instead of gdm. 1)I'm just experimenting with this netbook, so I'm game to try
debian (I originally started using ubuntu when I ran into hardware
issues with debian on a desktop). Can you point me to a current
debian that you recommend for a minimal install?
Post by Eric S Fraga
Lightdm provides for a default xsession
session.
2) And an alternative xsession session?

thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
Eric S Fraga
2015-02-16 16:43:23 UTC
Permalink
Post by Eric S Fraga
1)I'm just experimenting with this netbook, so I'm game to try
debian (I originally started using ubuntu when I ran into hardware
issues with debian on a desktop). Can you point me to a current
debian that you recommend for a minimal install?
https://www.debian.org/devel/debian-installer/
Post by Eric S Fraga
Lightdm provides for a default xsession session.
2) And an alternative xsession session?
Not sure what you mean by this. A bare bones .xsession would have
something along the lines of

exec /usr/bin/startfluxbox

but you could have various things before. E.g. I start conky in mine.
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.1 + Ma Gnus v0.12 + evil-git-bdeb602
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
Tim Johnson
2015-02-16 18:58:28 UTC
Permalink
Post by Eric S Fraga
Post by Eric S Fraga
1)I'm just experimenting with this netbook, so I'm game to try
debian (I originally started using ubuntu when I ran into hardware
issues with debian on a desktop). Can you point me to a current
debian that you recommend for a minimal install?
https://www.debian.org/devel/debian-installer/
Thank you.
Post by Eric S Fraga
Post by Eric S Fraga
Lightdm provides for a default xsession session.
2) And an alternative xsession session?
Not sure what you mean by this. A bare bones .xsession would have
something along the lines of
I'm sorry, I mis(spoke/wrote). I should have said : Does it handle
alternate window managers/desktop sessions? And I'm sure it does,
from some research.
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
Eric S Fraga
2015-02-16 19:13:24 UTC
Permalink
On Monday, 16 Feb 2015 at 09:58, Tim Johnson wrote:

[...]
Post by Tim Johnson
I'm sorry, I mis(spoke/wrote). I should have said : Does it handle
alternate window managers/desktop sessions? And I'm sure it does,
from some research.
It does indeed. Although I prefer to use xsession and choose from
within there. I use dmenu, as in:

--8<---------------cut here---------------start------------->8---
# --------------------------------- WM selection
WM=$(dmenu <<EOF
ratpoison
startfluxbox
emacs
EOF
)
eval $(gnome-keyring-daemon --start)
setxkbmap -symbols "pc+gb"
exec $WM
--8<---------------cut here---------------end--------------->8---
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.1 + Ma Gnus v0.12 + evil-git-bdeb602
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
Loading...