LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2018, 11:57 AM   #1
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Rep: Reputation: Disabled
Simple question about window managers- how to disable at boot?


So, I have one of my lan servers booting into kde, but I don't want it to anymore.

My first instinct is to switch to runlevel 3 from 5. But I'm told that these days runlevels are outdated, and don't really matter much. (I'm an old-timer.)

So I'm guessing this is an easy question, right?

I guess I could just gut startx, but that's hackish, there's probably a cleaner way to find the service and disable it, right.

I did google for how to kill it, the kill version works, but it's also hackish, and that's after boot.

https://unix.stackexchange.com/quest...-nvidia-driver

Anyway, long story short how do I find the service name so I can systemctl disable it?

I guess what I'm really asking is how do I just get a list of services? chkconfig is apparently deprecated too because it's only listing like 2 services and I know I have more running (nginx for example)

easy question, thanks,

thanks
 
Old 03-10-2018, 12:03 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Runlevels still work. I routinely reboot my Centos 7 server with init 6

That said, it would behoove us (you and I) to learn the new ways. A search for "centos change runlevel" yielded many hits with instructions about the new way using systemctl targets. This was the first link.

PS Get a list of service by just entering
Code:
systemctl
or
Code:
systemctl | grep service
Suggest
Code:
man systemctl
or, again, a web search for more details.

Last edited by scasey; 03-10-2018 at 12:08 PM.
 
1 members found this post helpful.
Old 03-10-2018, 12:07 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
With systemd run level 3 is called multi-user.target and 5 is graphical.target. To set the default to multi-user run the command

systemctl set-default multi-user.target

Last edited by michaelk; 03-10-2018 at 12:09 PM.
 
1 members found this post helpful.
Old 03-10-2018, 12:07 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I use run levels Slack, 3 and 4
Quote:
Graphical Login

To start with a graphical login screen on boot instead of Slackware's default console login, change the default runlevel to 4. Edit the file /etc/inittab and change the line that looks like

id:3:initdefault:

to

id:4:initdefault:
so whoever told you that still does not know as much as you. I'd go with your first instinct.

wait:
unless you're just wanting a different desktop, KDE just isn't doing it for you any more, then install whatever other one you want and use your login manager to select a different desktop.

Last edited by BW-userx; 03-10-2018 at 12:14 PM.
 
1 members found this post helpful.
Old 03-10-2018, 12:10 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You can disable the display manager service, gdm3, xdm, kdm.
 
Old 03-10-2018, 12:11 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Just FYI, on CentOS 7:
Code:
 more /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
#
Tho I note that the comments provide the answer to the question for the OP...as did michaelk

Last edited by scasey; 03-10-2018 at 12:14 PM.
 
1 members found this post helpful.
Old 03-10-2018, 12:12 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Depends on what init system yours OS uses. Systemd does not use inittab.
 
Old 03-10-2018, 12:17 PM   #8
cuit100
LQ Newbie
 
Registered: Mar 2018
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
With systemd run level 3 is called multi-user.target and 5 is graphical.target. To set the default to multi-user run the command

systemctl set-default multi-user.target
Yeah i too would use this simple way "Rotwang2"

If want to switch in current session
Code:
systemctl isolate multi-user.target
you can check current with

Code:
systemctl get-default
 
1 members found this post helpful.
Old 03-10-2018, 01:03 PM   #9
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Omg you guys are awesome, I post a question in the middle of the day on a saturday and get 924586 resonses haha! I should really be giving back more answers here on lq.

So I'm running Fedora 27 in 32 bit (Yea, michaelk, I'm that guy from the fedora forum haha).

Ha so runlevel was the way to go, I'm not so old after all! So I did michaelk's soln and did systemctl set-default multi-user.target and restarted, worked as expected. Not only that but I can still run xfce when I want to (I was a bit worried that runlevel 3 would also disable some kind of libraries or something to support a window manager at all. nope.)


Well here's my giving back a little bit-

Yea, (scasey), in addition to just running systemctl with no arguments or the grep- I found in my notes something I'd forgotton that I read on stackoverflow, this is pretty handy (and colored, woo!):

Code:
systemctl list-unit-files
Btw, seems odd that chkconfig no longer works? it used to be hand-in-hand with systemctl right? I was right about runlevel but wrong about chkconfig, sigh.

Thanks guys. (Sadly killing X didn't fix my underlying problem which is that my drive is periodically active for 1 our of every 10 seconds, i thought xfce was doing it, no, but that's for another post later, that could be any number of things, I'll post that later.)

thanks again,

rw
 
Old 03-10-2018, 01:25 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
super old way:

$ sudo nano /etc/inittab

debian runs X from run level 2 so that old way is mostly useless (if running debian / debian based distros).

$ sudo bash -c "echo false > /etc/X11/default-display-manager"

the systemd way:

$ sudo systemctl set-default multi-user.target

the IDK way:

$ sudo apt-get remove lightdm kdm gdm xdm wdm slim

the round about way:

$ sudo update-alternatives --config x-window-manager

That one doesn't change the boot level, but changes the default gui (depending on how a gui is started anyway). It works on the pocket chip anyway for a compiled but not installed wm. Although manually with the ln -s (wm_binary) /etc/alternatives/x-window-manager method.
 
  


Reply

Tags
runlevels, window manager



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disable wheel click for any X11 Window managers? qlands Linux - Hardware 2 09-17-2010 08:55 AM
LXer: 20 Most Nimble and Simple X Window Managers for Linux LXer Syndicated Linux News 0 08-03-2008 07:20 AM
Simple File/Window Managers? Vampirite Slackware 13 10-24-2005 12:45 PM
Window Managers, a small question TigerCardeo Mandriva 6 02-28-2004 05:54 PM
Window managers question Orbitalbears Linux - General 1 06-24-2002 09:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration