Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Minimal install Debian 10 (Buster) with Openbox [SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
cowogij
Posts: 6
Joined: 2020-03-13 20:59

Minimal install Debian 10 (Buster) with Openbox [SOLVED]

#1 Post by cowogij »

Hi,

I have tried doing a net-install, to then download Openbox and go on from there. During the software selection of the net-install I chose NONE (not even standard utilities), since I figured I'll just add what I need later on. Once done with the installation and logged in, I downloaded openbox using the following command 'sudo apt install --no-install-recommends openbox', and then did the same for 'obmenu' as well as 'obconf'. I also did it for 'lightdm'. I then attempted to start my session, but to no avail. I figured that I need an x-server to display the graphics, so I downloaded 'xorg' and I was able to log into openbox using lightdm.

What exacly does 'obsession' do and is it neccesary? Is it only a way to open log out options etc. from the terminal?
What is the minimum x-server package that I need? Since I rather not install 'xorg' as it comes with dependencies that I do not use. Do I only need 'xserver-xorg'?

Thank you for your time!
Last edited by cowogij on 2020-03-20 15:18, edited 1 time in total.


User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox

#3 Post by Head_on_a_Stick »

cowogij wrote:I then attempted to start my session, but to no avail
How did you try to start your session and what actually happened, exactly? You're probably missing the xinit package.
cowogij wrote:What exacly does 'obsession' do and is it neccesary?
You can use a custom script instead, for example https://raw.githubusercontent.com/Head- ... sharp-exit or https://bbs.archlinux.org/viewtopic.php?id=95984

Or just add the logout, reboot & poweroff commands directly to menu.xml
cowogij wrote:What is the minimum x-server package that I need? Since I rather not install 'xorg' as it comes with dependencies that I do not use. Do I only need 'xserver-xorg'?
You could probably get away with just xserver-xorg & xinit but specify your desired video (DDX) & input drivers along with libgl1-mesa-dri & libpam-systemd if you disable Recommends. The VAAPI and/or VDPAU drivers would also be very useful if you want to use your GPU for video decoding (va-driver-all, vdpau-driver-all and vdpau-va-driver for using the VDPAU backend with the VAAPI library).
cowogij wrote:lightdm
Don't use that, it runs X under the root user. If you must run a display manager then install gdm3 instead but no display manager at all would be my preference for a basic openbox desktop.
deadbang

cowogij
Posts: 6
Joined: 2020-03-13 20:59

Re: Minimal install Debian 10 (Buster) with Openbox

#4 Post by cowogij »

How did you try to start your session and what actually happened, exactly? You're probably missing the xinit package.
I tried launching lightdm by writing 'lightdm' in the terminal. I can't remember the exact message I got, but if really neccesary I can try to find out. So you are saying that I need 'xinit' even when I have a display manager? I thought it was used if you lacked a display manager.
You can use a custom script instead, for example https://raw.githubusercontent.com/Head- ... sharp-exit or https://bbs.archlinux.org/viewtopic.php?id=95984

Or just add the logout, reboot & poweroff commands directly to menu.xm
Okay, so it is just a graphical way of logging out etc.
You could probably get away with just xserver-xorg & xinit but specify your desired video (DDX) & input drivers along with libgl1-mesa-dri & libpam-systemd if you disable Recommends. The VAAPI and/or VDPAU drivers would also be very useful if you want to use your GPU for video decoding (va-driver-all, vdpau-driver-all and vdpau-va-driver for using the VDPAU backend with the VAAPI library).
So the packages I need to get started on a minimal DE for me are,
'openbox' - window manager
'obmenu' - GUI for customizing OB menu
'obconf' - GUI for configuring OB
'obsession' - GUI for exiting a session
'lightdm' - display manager to start a session
'xserver-xorg' - server to display graphical elements
'libgl1-mesa-dri' - rendering of graphics

'ibpam-systemd and 'systemmd' is needed as well but I did not quite understand their overall 'job', would you mind explaining it briefly to me? Also would it be hard to get away with getting 'xserver-xorg-core' instead of getting 'xserver-xorg'?

The computer is mostly going to be used to browse the web, write some documents and maybe watch some videos and edit some content (Inkscape, GIMP etc.). It is an Intel NUC that has intergrated graphics (Iris Plus 655).

Is this correct, and does this get me a baisc working graphical enviroment to start with?

PS. The reason I have all these specific questions and 'minimal' etc. Is not just because I want a light system, but to only have what I need and can at least understand its purpose. Not neccesarily HOW it works, but more of WHY I need it.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox

#5 Post by Head_on_a_Stick »

cowogij wrote:I tried launching lightdm by writing 'lightdm' in the terminal.
No, that won't work. Try this instead:

Code: Select all

# systemctl isolate graphical.target
cowogij wrote:So you are saying that I need 'xinit' even when I have a display manager? I thought it was used if you lacked a display manager.
Yes, you're right about that. It was late when I posted my reply (that's my excuse and I'm sticking to it).
cowogij wrote:'ibpam-systemd and 'systemmd' is needed as well but I did not quite understand their overall 'job', would you mind explaining it briefly to me?
The libpam-systemd package ensures a working login session, see the systemd-logind man page for more on this and use the loginctl command to check.

The systemd package does everything, or at least it will do soon :mrgreen:
cowogij wrote:would it be hard to get away with getting 'xserver-xorg-core' instead of getting 'xserver-xorg'?
Check the dependencies for the xserver-xorg package (apt info xserver-xorg): if you just installed the xserver-xorg-core package then you would be lacking a (DDX) video driver, input driver(s) and some low-level XKB utilities. You could install those manually but you might as well use the metapackage to save some effort; that's what it's for after all.

And be careful with --no-install-recommends, you might miss some important functionality if you use that too indiscriminately. Check the actual Recommends list for the various packages before applying it.
deadbang

cowogij
Posts: 6
Joined: 2020-03-13 20:59

Re: Minimal install Debian 10 (Buster) with Openbox

#6 Post by cowogij »

Okay, thank you for your quick replies, I truly appreciate your help!

Byee :))

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Minimal install Debian 10 (Buster) with Openbox

#7 Post by Deb-fan »

Excellent choice, someone wants minimal Debian gnu/nix can't see a more convenient, effective route than this. May as well keep xinit around, getting rid of the display manager is an obvious next step for people seeking minimalism. Too many ways to do anything dm's do to bother having one. Personally go without using dm's for that reason, they're just adding to overhead for no meaningful benefit, though the savings in going without something like lightdm really isn't substantial, still some. Never been able to figure out a solid basis for this x process running as root = some massive danger, I don't care even if were using one of the dm's where that's the case.

Nixer's have been doing it that way forever pretty much and it's clear changing it is not some big priority or seen as some serious security risk by the techies who develop display managers or it'd have been long changed by this point. Going without a DM also conveniently resolves this too though. So to me just another check mark next to not using dm's. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Minimal install Debian 10 (Buster) with Openbox

#8 Post by Deb-fan »

Another big area of interest here, minimal networking, getting rid of bloaty tools like Gnomes NetworkManager thing. Am fond of using systemd-networkd + wpa_supplicant now for managing network/wireless. Ridiculously light, fast, works very well. Though tad more involved in scanning-connecting via command-line vs the graphical goodness of an applet. Am sure it's possible and keep hoping to see someone come out with a simple script that will kill off X and restart it as user so this X as root thing can stop being harped upon.

Doubt it's overly complicated to do for whichever display manager, just don't have an interest in dorking with it and again this is something people who developed and maintain a given DM could likely do in their sleep w eyes closed, if they're not worrying about it, clearly they aren't, then see no compelling reason I should. Think many nixer's/techies are antisocial by nature, prefer the comfort/company of comps over fellow humanistic type creatures. That leads to isolation, leading to depression and feelings of paranoia, can lead to full blown delusional and irrational views and fears of people being out to get or against such nixer's. Aka: Legit ... actual mental illnesses. Personally just refer to this sort as the tinfoil hatter's faction. :P

Much of the stuff they say, do, advise is amusing in a semi-sad kinda way. Also to be fair, clear some are highly competent, very knowledgeable IT-sec and privacy techies too. Even if in my view it can often be regards a swatting a fly with a howitzer proposal, yep ... That's one dead fly. :D
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 587
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 78 times
Been thanked: 89 times

Re: Minimal install Debian 10 (Buster) with Openbox

#9 Post by wizard10000 »

Deb-fan wrote:...Never been able to figure out a solid basis for this x process running as root = some massive danger, I don't care even if were using one of the dm's where that's the case.

Nixer's have been doing it that way forever pretty much and it's clear changing it is not some big priority or seen as some serious security risk by the techies who develop display managers or it'd have been long changed by this point. Going without a DM also conveniently resolves this too though. So to me just another check mark next to not using dm's. :)
Before modesetting video drivers and systemd-logind were a thing X had to be run under the root account because X was almost a mini-DE itself. Not really a concern for a home PC but a major concern for production servers. X is considerably less than secure and if you compromise X you compromise the entire machine if X is running under the root account.

You still have to launch X under the root account if you're not using a modesetting video driver - if you need nomodeset as a kernel argument your video driver is being launched by your DM and not the kernel. If the kernel can't launch your video driver your display manager has to.

Display managers have been slow to get with the program - the only DM that doesn't run X under the root account is GDM3 and even it launches X as root and then passes the security token to the user who just logged in.
we see things not as they are, but as we are.
-- anais nin

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Minimal install Debian 10 (Buster) with Openbox

#10 Post by Deb-fan »

^Thanks Wiz10k, of course knew a bunch of that, not the modesetting thing though. Enterprise/commercial uses is the driving force behind gnu/nix would pay this more attention in such a setting outside of desktop but would really mean doing the same things anyway. Do know X is a tangled patchwork of hacks, rigs and duct tape slated for replacement (Wayland/Xwayland etc.) Though even after more than a decade of development, apparently still much needs be done before that happens for many nixer's. Slow to change is one thing, distro dev's still putting out dm's which don't isolate X and dm devs not bothering to change the code is something else and a quasi-endorsement in my view.

Mentioned don't bother with dm's anymore anyway so to me it's a moot issue. Thought about taking a stab at some hopefully simple fixes for this. Though don't want to bother undoing what's already setup, running fine ... to dork with dm's I've got no interest in using. People are of course free to do as they please and actually nother thanks Wiz, your response is one of the more meaningful I've seen on why X-root is ill-advised and had searched more than a few times w/o coming up with anything satisfying on it. Putting it in the context of Enterprise, with the known state of X makes things clearer. :) Often ask why it matters and people have/had nothing much to say.
Most powerful FREE tech-support tool on the planet * HERE. *

cowogij
Posts: 6
Joined: 2020-03-13 20:59

Re: Minimal install Debian 10 (Buster) with Openbox

#11 Post by cowogij »

UPDATE:

I installed the net-install again and ran the following commands:

sudo apt install --no-install-recommends openbox
sudo apt install --no-install-recommends obsession
sudo apt install --no-install-recommends obconf
sudo apt install --no-install-recommends obmenu
sudo apt install --no-install-recommends xserver-xorg
sudo apt install --no-install-recommends libgl1-mesa-dri
sudo apt install --no-install-recommends libpam-systemd

I also used

Code: Select all

systemctl isolate graphical.target
this time when I tried to start lightdm, but it did not work. I assume that I am missing a package. I did check all the recommended packages and none of them really popped out as necessary for me, except maybe 'xserver-xorg-video-intel' that for some reason is not included in 'xserver-xorg-video-all'.

Anyone know what package I am missing, or what I am doing wrong?

FYI, I have Iris Plus 655 integrated graphics.

Thanks in advanced!

MALsPa
Posts: 678
Joined: 2007-12-07 19:20
Location: albuquerque
Been thanked: 2 times

Re: Minimal install Debian 10 (Buster) with Openbox

#12 Post by MALsPa »

Maybe the xorg package? Well, just noticed from my notes that when I did my Buster netinstall w/ Openbox I ran sudo apt install xorg but not sudo apt install xserver-xorg. Not sure if that info helps at all, sorry.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox

#13 Post by Head_on_a_Stick »

cowogij wrote:I also used

Code: Select all

systemctl isolate graphical.target
this time when I tried to start lightdm, but it did not work.
What does "did not work" mean, exactly? What actually happened when you ran that command? What did you see on the screen? What messages were recorded in the systemd journal?

Btw you can specify more than one package at a time for the 'apt install' command.
cowogij wrote:except maybe 'xserver-xorg-video-intel' that for some reason is not included in 'xserver-xorg-video-all'.
The xserver-xorg-video-intel package is in the Recommends list for xserver-xorg-video-all but you don't actually need it, the modesetting driver should work for you and that is supplied by the xserver-xorg-core package.
cowogij wrote:Anyone know what package I am missing, or what I am doing wrong?
Go through all of the packages that are listed as dependencies for the xorg metapackage and try adding them. I can't be more specific because I always just install the metapackage (with Recommends enabled) to make sure I'm not missing anything important.
deadbang

cowogij
Posts: 6
Joined: 2020-03-13 20:59

Re: Minimal install Debian 10 (Buster) with Openbox

#14 Post by cowogij »

What does "did not work" mean, exactly? What actually happened when you ran that command? What did you see on the screen? What messages were recorded in the systemd journal?

Btw you can specify more than one package at a time for the 'apt install' command.
When I ran the command it just returned nothing, and I ran status graphical.target command which returned that everything was enabled etc. I then ran systemctl start lightdm.service but it returend that there is no lightdm.service
I think I am just confusing some information I have gathered and mixing them up though.
The xserver-xorg-video-intel package is in the Recommends list for xserver-xorg-video-all but you don't actually need it, the modesetting driver should work for you and that is supplied by the xserver-xorg-core package.
You are probably right, as I installed it and it still did not work.
Go through all of the packages that are listed as dependencies for the xorg metapackage and try adding them. I can't be more specific because I always just install the metapackage (with Recommends enabled) to make sure I'm not missing anything important.
Yeah, this was going to be my last resort. I am gonna do that now, let me know if there are any commands that I can run to give you more information regarding my situatios, eg. error messages, package list etc.

Thanks!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox

#15 Post by Head_on_a_Stick »

cowogij wrote:When I ran the command it just returned nothing, and I ran status graphical.target command which returned that everything was enabled etc. I then ran systemctl start lightdm.service but it returend that there is no lightdm.service
So have you installed LightDM? If you have then check the systemd journal to see what is actually happening.

See also

Code: Select all

systemctl get-default
ls -l /etc/systemd/system/display-manager.service
deadbang

cowogij
Posts: 6
Joined: 2020-03-13 20:59

Re: Minimal install Debian 10 (Buster) with Openbox

#16 Post by cowogij »

Head_on_a_Stick wrote:
cowogij wrote:When I ran the command it just returned nothing, and I ran status graphical.target command which returned that everything was enabled etc. I then ran systemctl start lightdm.service but it returend that there is no lightdm.service
So have you installed LightDM? If you have then check the systemd journal to see what is actually happening.

See also

Code: Select all

systemctl get-default
ls -l /etc/systemd/system/display-manager.service
Thanks for the quick reply. I ran get-default and got that the graphical.target is the default. Also it seems that the display-manager.service file is missing. There is no such file in that directory.

EDIT: Wait I am actually retarded it seems that I have forgotten to install lightdm, but just assumed that I had. Just realized that its not in my prevously mentioned list.

EDIT2: I am sorry for wasting your time, it seems that during my confusion I had apparently forgotten to install lightdm. It now works and I feel stupid af. Maybe its time to sleep for now :/

Thanks for everything!

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Minimal install Debian 10 (Buster) with Openbox

#17 Post by Deb-fan »

^ Happens to every techie. :)

By the way, Gentoowiki mentions that generally having X process running as user is some improvement in security on a single user system but in a shared multi-user, esp multiseat setups actually makes it trivial for users to snoop on each other. The Gentooees, compiling everything from source tend towards knowing their stuff. This X as root or having the process being under a user, is as clear as mud I guess at least haven't invested enough effort to truly get it. It's been commonly done, running as a root process(still is for many)forever, so either way not stressing overmuch about it.

This is on topic, OP is being advised to just use lightdm, it's setup to run X under root, so still kicking this around as something of interest. Wanted to wedge that info in above post in too though. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox

#18 Post by Head_on_a_Stick »

cowogij wrote:It now works
Excellent news :)

Please edit the title of the thread (in your first post) and prepend [SOLVED] to help others with the same problem.

And I would just like to take this opportunity to emphasise the benefits of running X under a non-root user by sharing this link, which explains things nicely:

https://lwn.net/Articles/341033/

The Debian developers considered this improvement so significant that they included it in the official release notes for stretch (when it was first made possible):

https://www.debian.org/releases/stretch ... uires-root

I note that a reference has been made in this thread to the Gentoo wiki page about rootless X[1] along with a suggestion that running X under a normal user allows for input device snooping but this is only relevant for the hack suggested on that wiki page (ie, adding the user to the input group) and it does *not* apply to Debian at all because Debian uses systemd's login session to allow rootless X, unlike Gentoo (which uses OpenRC as the default init system).
deadbang

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1494
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 59 times

Re: Minimal install Debian 10 (Buster) with Openbox [SOLVED]

#19 Post by oswaldkelso »

The op asked for a minimal install. Surely removing lightdm and using startx is the answer, rather than adding gdm3.

"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry :-)
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Minimal install Debian 10 (Buster) with Openbox [SOLVED]

#20 Post by Head_on_a_Stick »

oswaldkelso wrote:Surely removing lightdm and using startx is the answer, rather than adding gdm3.
Yes, I agree. And don't call me Shirley :mrgreen:
deadbang

Post Reply