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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-27-2014, 03:41 PM
|
#1
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
/etc/X11/default-display-manager keep content nulled after updates && grades
Hi.
/etc/X11/default-display-manager text file has one line /usr/sbin/lightdm in it for GUI-login-screen so I delete that contents to get CLI on logins  then If need GUI can use startx... I want to keep Lightdm installed and made a backup of the original default-display-manager.
As time goes on (updates to it I'd guess) the text finds it's way back so on start no CLI only GUI (until I delete it again.)
Is there a line of code I could replace /usr/sbin/lightdm with to keep it from coming back or add a separate Bash script to empty it; I also assume I can just 'sudo rm /etc/X11/default-display-manager' all together as-well but then updates* put it back?
Thanks In advances for any thought...
Last edited by jamison20000e; 01-28-2014 at 08:32 PM.
|
|
|
01-28-2014, 08:28 PM
|
#2
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
I tried deleting the file /etc/X11/default-display-manager and oddly enough it put me to the GUI login window  so I must just find a way to just keep text out of there?
|
|
|
01-28-2014, 08:44 PM
|
#3
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
What distribution is this? You should never have to delete anything to get to a non GUI login.
It is relatively trivial to get to multi-user mode without the GUI being invoked. For non-systemd based systems it is trivially just setting the initdefault to 3 in the /etc/inittab. For systemd based systems you have to use the command "systemctl set-default multi-user.target".
|
|
|
01-28-2014, 09:16 PM
|
#4
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
Hi. Thanks for the reply.
Code:
:~$ uname -a
Linux debian 3.12-1-amd64 #1 SMP Debian 3.12.8-1 (2014-01-19) x86_64 GNU/Linux
The command systemctl set-default multi-user.target doesn't work for me:
Code:
systemctl set-default multi-user.target
Unknown operation 'set-default'.
I edited /etc/inittab to 3 and now on booting it asks me for run-level but all levels take me to GUI unless I remove the text from default-display-manager...
|
|
|
01-28-2014, 11:42 PM
|
#5
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Debian is not a distro that comes with systemd by default, therefore systemctl will not work. Furthermore, on Debian and most derived systems runlevels 2-5 are the same. To start the system into CLI mode you have to prevent lightdm from being started on the standard runlevel. You can do this with
Code:
update-rc.d lightdm stop 2
to disable lightdem for runlevel 2.
|
|
|
01-29-2014, 09:55 AM
|
#6
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
Code:
~$ update-rc.d lightdm stop 2
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start runlevel arguments (none) do not match lightdm Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (none) do not match lightdm Default-Stop values (0 1 6)
|
|
|
02-05-2014, 10:53 AM
|
#7
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
I want to keep an empty file but on any updates wipe it empty again, so far I keep using manually:
Code:
cat /dev/null > /etc/X11/default-display-manager
Just found the post using /dve/null http://www.linuxquestions.org/questi...5/#post5048328
http://www.linuxquestions.org/questi...ml#post5065993 and "highjacked" another sorry I kinda realize now ways around this and will try to do so in the future.
Last edited by jamison20000e; 02-05-2014 at 09:22 PM.
|
|
|
02-05-2014, 09:28 PM
|
#8
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
So, what is the best way to invoke a start up script or command in Linux i.e. a script or command for Linux to run on every start?
|
|
|
02-06-2014, 04:27 AM
|
#9
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
The best way would be to put the command in rc.local or use the autostart mechanism or your DE/WM. But why don't you just use the advice given to you in the other thread, make the file immutable?
|
|
1 members found this post helpful.
|
02-06-2014, 12:23 PM
|
#10
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Original Poster
|
I put above it doesn't work unless I've missed something, removing the file brings me to GUI and command outputs are posted. I've used rc.local and autostart before and probably should have searched that, Thank you.
|
|
|
All times are GMT -5. The time now is 10:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|