[Working] [UPDATE 20/01/2017] Installing directly a WM

Help with issues regarding installation of Debian

[Working] [UPDATE 20/01/2017] Installing directly a WM

Postby qyron » 2017-01-12 11:33

I want to do a fresh install of a machine I have laying around but instead of going for a standard install and loading a DE I would like to have Openbox installed directly and do the configurations needed to it.

On an experiment, I skipped the DE configuration step on a standard install, but I ended up with a broken installation, not having network interface to finish the installation by hand.

Google-gu only gave me confusing results. Most of what I read suggested I should install a light DE (like XFCE or LXDE), install OpenBox and then purge the other DE. Which I've tried and end up having a broken system.

Can someone spare a few pointers? I don't have any problems doing standard installations but his machine is quite strapped for resources and I would like to revive it with a simple WM.

edit: I know I can get the BunsenLabs distro but I would really want to do this with Debian directly. If it proves to be over my league, I'll throw in the towel and get Hydrogen.
Last edited by qyron on 2017-01-20 20:48, edited 2 times in total.
Stop hitting me with anvils!|Parem de me bater com bigornas!
Willie E. Coyote
User avatar
qyron
 
Posts: 156
Joined: 2008-07-21 20:47

Re: Installing directly a WM

Postby wizard10000 » 2017-01-12 11:50

...On an experiment, I skipped the DE configuration step on a standard install, but I ended up with a broken installation, not having network interface to finish the installation by hand.


You're on the right track. My 32-bit netbook runs Sid, uses fluxbox as a WM and uses < 100mb of RAM at idle. Here's how I do it -

I use the unofficial Testing weekly netinstall build with firmware. You *must* have a way to network after install, so unless you want to hand-configure wpasupplicant it'd be good to do this on a wired installation.

On my own machine after a minimal install Ethernet worked but was not enabled. Easy enough to fix - as root:

Code: Select all
ip link set dev <interface> up
dhclient


This should get you networked. After that, go fix your apt sources if necessary - you may need to enable non-free and contrib repositories, and after that (also as root)

Code: Select all
apt update
apt full-upgrade
apt install xorg lightdm openbox obconf obmenu tint2 synaptic


I use fluxbox instead of openbox and lightdm and tint2 are personal preference, but that should get you a working openbox desktop plus a gooey package manager.

Hope this helps -

edit: You'll also need a network management tool of some kind. Network Manager is out there, I personally prefer wicd but that's just me. Good luck -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Installing directly a WM

Postby qyron » 2017-01-12 11:58

Thanks!

I'll go have a try a it. And luckily I do have a wired network at hand.

A side note: where you state <interface> I should be putting in the motherboard network card address, correct? I'm still working on getting my power-user colours...
Stop hitting me with anvils!|Parem de me bater com bigornas!
Willie E. Coyote
User avatar
qyron
 
Posts: 156
Joined: 2008-07-21 20:47

Re: Installing directly a WM

Postby Head_on_a_Stick » 2017-01-12 12:12

To use /etc/network/interfaces & ifupdown to connect wirelessly, see this guide:

https://wiki.debian.org/WiFi/HowToUse#W ... d_WPA2-PSK

For the name of your wireless interface, use:
Code: Select all
ip link

qyron wrote:I know I can get the BunsenLabs distro but I would really want to do this with Debian directly.

Excellent, I like your attitude :)
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6678
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Installing directly a WM

Postby wizard10000 » 2017-01-12 12:16

qyron wrote:Thanks!

I'll go have a try a it. And luckily I do have a wired network at hand.

A side note: where you state <interface> I should be putting in the motherboard network card address, correct? I'm still working on getting my power-user colours...


You should use the internal name of the network interface, which is gonna be either eth0 or in my case, enp0s3. You can find device names like this - as root:

Code: Select all
ip link


This will spit out the names of your network interfaces. You can see sample output of ip link here -

Code: Select all
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:23:6f:3a brd ff:ff:ff:ff:ff:ff


So in my case it'd be

Code: Select all
ip link set dev enp0s3 up
dhclient


Hope this helps -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Installing directly a WM

Postby wizard10000 » 2017-01-12 12:23

Head_on_a_Stick wrote:To use /etc/network/interfaces & ifupdown to connect wirelessly, see this guide:

https://wiki.debian.org/WiFi/HowToUse#W ... d_WPA2-PSK


^ a better solution than hand-configuring wpasupplicant :)
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: Installing directly a WM

Postby alan stone » 2017-01-12 14:02

qyron wrote:Most of what I read suggested I should install a light DE (like XFCE or LXDE), install OpenBox and then purge the other DE. Which I've tried and end up having a broken system.

It's some time ago I did a similar new install, however this summarizes the procedure:

Code: Select all
Just install from netinstall, during the step when asked about packages to unstall, untick the desktop environment box. Finish the install and reboot.
Log in as root
apt-get update
apt-get install xorg openbox
edit your .xinitrc so that it launches openbox-session
Reboot and have fun configuring everything.

^ source

FYI, there's also Distros and DEs using Openbox
Debian 8.9 32bit, WM: Openbox
Computers are like air conditioners. They work fine until you start opening windows. - Author Unknown
Programming is like sex. One mistake and you have to support it for the rest of your life. - Michael Sinz
User avatar
alan stone
 
Posts: 211
Joined: 2011-10-22 14:08
Location: In my body.

Re: Installing directly a WM

Postby alan stone » 2017-01-12 14:39

This might also be of interest: Adding CrunchBang features in another distro
Debian 8.9 32bit, WM: Openbox
Computers are like air conditioners. They work fine until you start opening windows. - Author Unknown
Programming is like sex. One mistake and you have to support it for the rest of your life. - Michael Sinz
User avatar
alan stone
 
Posts: 211
Joined: 2011-10-22 14:08
Location: In my body.

Re: Installing directly a WM

Postby Head_on_a_Stick » 2017-01-12 15:49


The #! wiki is very old and completely unmaintained; also, the repositories listed in that guide are no longer active :(

(I am (was) a moderator on http://crunchbang.org/forums/)

http://crunchbang.org/forums/userlist.p ... rch=Submit
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6678
Joined: 2014-06-01 17:46
Location: /dev/chair

UPDATE 20/01/2017 - Installing directly a WM

Postby qyron » 2017-01-20 22:38

I feel obliged to report back on this subject after all the great feedback and support I've had.

Unfortunately I haven't had the time I wished to get really going on this install has it deserves but up until now here is what I have accomplished, along with a few thoughts.

a) downloaded and installed from a Testing Weekly Build.

The only off on the entire process was what I can only consider a "hiccup" during the first installation attempt, when downloading the base installation packages at some point the installer stopped recognizing the image and kept asking for the installation disk. After aborting the install and restarting from scratch there was no problem, so I dismissed it to a problem with the thumb drive itself.

The installation itself went very smoothly (I'll admit I was more nervous than I can ever recall about doing an installation) and after the machine rebooted itself, I was presented with a blank terminal screen.

b) bare bones system

I was pleasantly surprised to find out the ethernet port was up and running at this point, without the need to further configuration but nonetheless I sniffed for it with

Code: Select all
ip link


It seems that Wizard10000 and I are working on similar machines has I have a default ethernet port mapped has enp3s0.
I'm still considering to fully configure the networking capabilities of the machine before getting to the actual system basic configuration because I don't really need wifi at this point.

Question I have the system displaying an error message at startup. I think related to the disk or disk mapping but I can't retain enough information to research. I've learned I can find the logs under /var/log but which one to read? I have quite a lot and even one that reads out in nano has a string of @.

c) basic system configuration

I followed Wizard10000 advice and installed the suggested packages with a few changes.

Code: Select all
apt install install xorg lightdm openbox obconf obmenu tint2 conky midori


I decided I was going to try and cut my teeth deeper with apt so I deducted synaptic. Again, I admit I used a different syntax when using apt. While Wizard uses:

Code: Select all
apt update
apt full-upgrade
apt install


I usually used:

Code: Select all
apt-get update
apt-get upgrade -y
apt-get install


It was actually refreshing to discover I could shorten even more the commands and get the same results.

After this I also decided I was going to try and instead of using LightDM, I replaced it with slim. Both seem nice but I notice the machine taking a bit loading either, displaying a blank black screen. At this point I'm not worried about this.

However, not having the option to directly shutdown the system from within Openbox - yet - forced me to revert back to LightDM, due to the convenient shortcut bar. When I get to the point I can use a direct command (shortcut) to shutdown the system from within the WM, I'll reinstall slim, the reason being it has no dependencies.

Question Alan Stone refers another option, which involves editing .xinitrc to launch openbox-session directly. I feel too wet behind the ears to go that extra length at this point but what will that do when in comparison with what I've done at up until now?

Midori was another attempt to shed Firefox has my default browser but I still feel it lacks a lot and I did get an error warning when invoking it from terminal instead of using the Openbox shortcut. I gave it a few opportunities to impress me but it kept falling short and I purged it from the system and brought Firefox to the arena, ready to face long loading periods but to my surprise the browser actually responds and runs quite fast.

Conky is... well... Conky. I've done a few research and the little program can actually provide a lot of "services" usually nested on the taskbar, like clock & calendar display, as well as system load and other resources the veterans in this forum know better than I do, without the need to burn unnecessary resources other plug-ins would take up, as long as I am willing to learn how to work with it and configure it. Which I am. Even if only for the ego boost and bragging rights.

I haven't yet decided on the network frontend - if Network Manager (which I know) or Wicd (which I've only briefly experimented on a LXDE install on a very outdated machine) - I will use. The system is able to connect to the internet as it is, so for now I will leave it alone. Don't fix what is not broken.

d) further system configuration

At this point, I've realized I have a lot to learn and work on. I have to learn how to build my system menu and how to "teach" the system which programs I want to run automatically at startup. Having a wallpaper instead of a blank grey background seems a good idea to.

I've been doing some research on how to handle Openbox on Google, with most resources pointing me to ArchWiki. I found a lot less links relating to DebianWiki.
I assume reading both will be more than advisable before starting to actually try to do anything regarding WM tinkering. If someone could care to suggest additional reading material, I would be very thankful.

On a side note and these are more curiosity points than a actual problems:

I allowed the installer to automatically setup the LVM for the system and I noticed that for root alone it alloted 25GB. With all the partitions it setup, it used nearly 60GB for installation. HHD space is not at a premium but I felt the installer went a bit greedy.
I've read the DebianWiki regarding disk partitions and have made a few custom installations before, tweaking the LVM to my liking, but usually what do you consider a reasonable allotment for installation?

On my main machine I have an LVM set up along these lines. Values between brackets are the min/max values I tend to allocate according to the disk size. My usual installation takes about 20GB for a 80GB HDD.

/ - 15GB [10/15]
/var - 5GB [5/8]
/log - 5GB [5/8]
/usr - 5GB [5/8]
/tmp - 2GB [2/5]
swap = to available RAM
/home (whatever remains)

Right now I'm not going to bother doing it but this computer has an SD card port and I know I can use one to install and run the OS, leaving thte HDD for storage alone. In the future I would like to try doing that and replace the current HDD for an SSD, so having some opinions regarding systems partitioning would be great.

Again, thanks for all the help and support up until know. Has I started going through this process, I realized I was getting myself into a really challenging yet rewarding experience. I'm considering putting together a How To Guide for newbies at some point, later down the road.

Any further pointers and advice are welcome and appreciated.
Stop hitting me with anvils!|Parem de me bater com bigornas!
Willie E. Coyote
User avatar
qyron
 
Posts: 156
Joined: 2008-07-21 20:47

Re: [Working] [UPDATE 20/01/2017] Installing directly a WM

Postby wizard10000 » 2017-01-20 23:57

Looks to me like you've done pretty darned well for yourself :)

If you want to do conky I'd be happy to share my conky config; it looks a bit like this - clickable, target is 1024x600

Image

and if my conky config gives you or anyone else some ideas you can find it here - https://paste.debian.net/909772

Have fun!
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: UPDATE 20/01/2017 - Installing directly a WM

Postby Head_on_a_Stick » 2017-01-21 10:50

qyron wrote:Question I have the system displaying an error message at startup. I think related to the disk or disk mapping but I can't retain enough information to research. I've learned I can find the logs under /var/log but which one to read? I have quite a lot and even one that reads out in nano has a string of @.

It is possible to read the (binary) logs directly using:
Code: Select all
strings /var/log/journal/*/system.journal | grep -i message

However, the recommended approach is to use systemd's inbuilt logging facilities, guide here:

https://www.digitalocean.com/community/ ... stemd-logs

tl;dr: check the output of `systemctl --failed` to spot any major problems ;)

slim

That project is dead upstream and the display manager does not handle systemd login sessions correctly.

I would recommend either LightDM or viewtopic.php?f=16&t=123694 instead.

Question Alan Stone refers another option, which involves editing .xinitrc to launch openbox-session directly. I feel too wet behind the ears to go that extra length at this point but what will that do when in comparison with what I've done at up until now?

There is no need to mess around with ~/.xinitrc at all because all startup commands can be added to ~/.config/openbox/autostart and then plain old `startx` will launch /etc/alternatives/x-session-manager — this should be "openbox-session", change it if needed:
Code: Select all
# update-alternatives --config x-session-manager

This allows easy switching between window & session managers through the Alternatives system with no need to edit .xinitrc every time.

There are also some complications in the way Debian handles `startx` that make a lack of ~/.xinitrc desirable, all the gory details are in this rather marvellous thread by one of the BunsenLabs developers:

http://crunchbang.org/forums/viewtopic.php?id=20442

Midori

That browser should *not* be used against untrusted websites in Debain.

See https://www.debian.org/releases/stable/ ... r-security

wallpaper

I have a set from http://simpledesktops.com/ that can be used as a "slideshow":

https://github.com/Head-on-a-Stick/conf ... ers.tar.gz

Unpack it with:
Code: Select all
wget https://github.com/Head-on-a-Stick/configs/raw/master/simplewallpapers.tar.gz
tar xf simplewallpapers.tar.gz -C ~/Pictures
rm simplewallpapers.tar.gz

Then add this line in ~/.config/openbox/autostart to show a random selection, changing every 10 minutes:
Code: Select all
while true; do feh --bg-fill --randomize ~/Pictures/simplewallpapers; sleep 600; done &

https://packages.debian.org/jessie/feh

additional reading material

The official Openbox wiki is one of the best on the interweb:

http://openbox.org/wiki/Help:Contents

And urukrama's legendary site is a must-visit, of course:

https://urukrama.wordpress.com/
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6678
Joined: 2014-06-01 17:46
Location: /dev/chair

UPDATE 25/01/2016

Postby qyron » 2017-01-25 22:13

Okay...

So I've given it some consideration and because I'm using this installation as a learning experiment, I decided I would go even further outside my comfort zone.

Beside having reinstalled the system from scratch (tweaked the LVM partitions a bit), I also loaded debfoster, just to help me keep track of what I throw into the system and what I really want to keep; man-debfoster actually makes a pretty interesting reading.

I have a working WM - writing this from within it - although not fully tweaked and tuned (that will take a little longer), which is what I was aiming at when I started this experiment.

Pressing matters at this point
>> at boot, I get a message stating: Failed to connect with lvmetad. Falling back to device scanning.

A little (very little, actually) research pointed me to the information that lvmetad is a metadata daemon that receives information from udev about the logic volumes the system is running and keeps an updated image of it.

If I correctly understood, I now have to install udev for this situation to solve itself. I assume the system already has lvmetad enabled, hence the message at startup.
If not, and I have to manually set lvmetad to run, then I found at the same source that I would only need to issue under /etc/lvm/lvm.conf use_lvmetad=0. Is this correct?

>> this is my EeePC (and I do now these little rascals can be a pain to configure) and I read in the Debian Wiki that for the Atom N6xx series the GMA500 proprietary driver is broken. Is this still true at this point?
Stop hitting me with anvils!|Parem de me bater com bigornas!
Willie E. Coyote
User avatar
qyron
 
Posts: 156
Joined: 2008-07-21 20:47

Re: UPDATE 25/01/2016

Postby wizard10000 » 2017-01-26 00:26

qyron wrote:If I correctly understood, I now have to install udev for this situation to solve itself.


udev is nice to have and and learning to write a simple udev rule can give you all kinds of cool ideas for stuff you can trigger with one.

Want to fire off a backup script when a particular flash drive is plugged in? Different script for a different flash drive? udev can do that too. Events are way cool.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: UPDATE 25/01/2016

Postby Head_on_a_Stick » 2017-01-26 07:15

qyron wrote:If I correctly understood, I now have to install udev for this situation to solve itself.

You already have udev installed.
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6678
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable