How to configure /.dmrc for default DE via tty1 [SOLVED]

If none of the more specific forums is the right place to ask

How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Lysander » 2018-01-01 16:57

Using

Code: Select all
systemctl set-default multi-user.target


I have set my desktop up to drop to console at startup rather than go to gdm3. I only have GNOME as a DE. It works fine.

My netbook has both XFCE and LXDE, the latter being the default. However, when I set multi-user.target it boots into XFCE though LXDE is the default when using lightDM.

I read around and apparently the right option can be set in /.dmrc. On my desktop the file says

Code: Select all
[Desktop]
Language=en_GB.utf8
Session=xfce


which is odd because I uninstalled xfce. Whereas in my netbook it says

Code: Select all
[Desktop]
Language=en_GB.utf8
Session=LXDE


though it boots into XFCE when going through tty1.

Are these files configured wrongly? Should I update them to boot into the DEs I want or is there another way?
Last edited by Lysander on 2018-01-01 18:07, edited 1 time in total.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 login

Postby Head_on_a_Stick » 2018-01-01 17:16

Lysander wrote:when I set multi-user.target it boots into XFCE

I'm not sure I understand this — if you are booting to multi-user.target then a console login should just return a command prompt unless ~/.profile is modified, AFAIUI.

So do you mean that XFCE is started when you run the `startx` (or `xinit`) command?

If so, then try this:
Code: Select all
# update-alternatives --set x-session-manager

I think that should let you choose a desktop to become the default.

Otherwise, add "exec startxfce4" to ~/.xsession, this will let `startx` run that desktop and will also become the file parsed for the "Default XSession" in LightDM.

EDIT: no idea about this "~/.dmrc", can you quote a link for that?
User avatar
Head_on_a_Stick
 
Posts: 7994
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to configure /.dmrc for default DE via tty1 login

Postby Lysander » 2018-01-01 17:33

Head_on_a_Stick wrote:
So do you mean that XFCE is started when you run the `startx` (or `xinit`) command?


Yes that's correct.

Head_on_a_Stick wrote:If so, then try this:
Code: Select all
# update-alternatives --set x-session-manager

I think that should let you choose a desktop to become the default.


Thanks for this - I tried this instead on reading your post, very close to your suggestion:

Code: Select all
# update-alternatives --config x-session-manager


nabbed from this link:

https://unix.stackexchange.com/question ... ion/367706

And it worked! This is the output and my choice:

Code: Select all
root@lysurfer-vii:/home/lysander# update-alternatives --config
x-session-manager There are 5 choices for the alternative
x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                      Priority   Status
------------------------------------------------------------
* 0            /usr/bin/startxfce4        50        auto mode
  1            /usr/bin/lxsession         49        manual mode
  2            /usr/bin/openbox-session   40        manual mode
  3            /usr/bin/startlxde         50        manual mode
  4            /usr/bin/startxfce4        50        manual mode
  5            /usr/bin/xfce4-session     40        manual mode

Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/startlxde to
provide /usr/bin/x-session-manager (x-session-manager) in manual mode
root@lysurfer-vii:/home/lysander#


Now when booting into a console and typing startx is boots into LXDE.

Head_on_a_Stick wrote:EDIT: no idea about this "~/.dmrc", can you quote a link for that?


Yes of course - the reason I mentioned this file is that I was under the impression that this file determined which DE is default. I read it here

https://superuser.com/questions/685970/ ... stem-start

I am confused why this file says xfce for my desktop when GNOME is the default and xfce is no longer installed. Maybe I'm not understanding it correctly.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 login

Postby Head_on_a_Stick » 2018-01-01 18:02

Lysander wrote:very close to your suggestion

Ah yes, sorry, i don't have access to a Debian box atm.

Lysander wrote:https://superuser.com/questions/685970/how-to-set-a-default-desktop-environment-at-system-start

I think that might be for KDE and the OP only says "Linux" [sic] rather than Debian.
User avatar
Head_on_a_Stick
 
Posts: 7994
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to configure /.dmrc for default DE via tty1 login

Postby Lysander » 2018-01-01 18:07

Head_on_a_Stick wrote:I think that might be for KDE and the OP only says "Linux" [sic] rather than Debian.


Aha yes. Thanks for your help. Would have taken longer without it. Marking as solved.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 login

Postby Thorny » 2018-01-01 18:09

Lysander wrote:I am confused why this file says xfce for my desktop when GNOME is the default and xfce is no longer installed. Maybe I'm not understanding it correctly.

How old is that file? There is this.
https://help.gnome.org/admin/system-adm ... er.html.en
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: How to configure /.dmrc for default DE via tty1 login

Postby Lysander » 2018-01-01 18:28

Thorny wrote:How old is that file? There is this.
https://help.gnome.org/admin/system-adm ... er.html.en


Good question. It says 17th Nov 2017. Now, it could have come from KDE maybe, seeing as I recently installed [and uninstalled] KDE? But I don't see why it would say xfce then. xfce was my default DE for a few days, when I was using 9.2.

As for your link, it's very helpful and clears up the confusion, esp since it says .dmrc isn't used anymore. The file at /var/lib/AccountsService/users/lysander gives

Code: Select all
[User]
Email=
Language=en_GB.utf8
XSession=gnome
Icon=/usr/share/pixmaps/faces/energy-arc.jpg
SystemAccount=false


which looks right to me.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Thorny » 2018-01-01 18:42

Perhaps I didn't word that as clearly as I might have. Better might have been, could that file have existed when XFCE was on that system and wasn't purged when you removed it?
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Lysander » 2018-01-01 20:59

Thorny wrote:Perhaps I didn't word that as clearly as I might have. Better might have been, could that file have existed when XFCE was on that system and wasn't purged when you removed it?


It could possibly, yes. 'Purge' doesn't purge absolutely everything, it seems. So it's possible, indeed. I'm guessing that's what happened.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Head_on_a_Stick » 2018-01-01 21:44

Lysander wrote:'Purge' doesn't purge absolutely everything, it seems

APT should never touch any files in "$HOME", that is the expected behavior.
User avatar
Head_on_a_Stick
 
Posts: 7994
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Lysander » 2018-01-01 22:12

Head_on_a_Stick wrote:APT should never touch any files in "$HOME", that is the expected behavior.


That explains why I've been manually deleting stuff from "$HOME" through rm -r. Good to clear that up.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Thorny » 2018-01-01 22:19

Lysander wrote: So it's possible, indeed. I'm guessing that's what happened.

You wouldn't really have to guess.

I hesitate a bit to say much more because people often don't want my oldschool advice but you generally are a quick study and you've never growled at me. :-)

If, especially while changing things and trying things out, you were to record in a log book, you could have checked if the timestamp on the file was the same as the date you installed XFCE, for confirmation. That would be easier than having to parse back through your dpkg.log's to find it, with a lot of activity, it's probably already gz. But keeping a log book isn't something most home users do, although it has some potential to help while you are still trying things out.

Since you've chosen GNOME and no other DEs, that file is useless and unnecessary until such time as you add another DE that would use it and overwrites it. And, in this instance, it interfered with the way you wanted to use your system.


@HoaS, do you know if the GUI, Synaptic's "complete" removal would have removed that user configuration file or not, I don't know. I'm still oldschool apt-get most of the time.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Head_on_a_Stick » 2018-01-02 06:24

Thorny wrote:@HoaS, do you know if the GUI, Synaptic's "complete" removal would have removed that user configuration file or not

I would be surprised if it does that but who can tell with a GUI? :D

Thorny wrote:I don't know. I'm still oldschool apt-get most of the time.

+1

I don't have synaptic installed in any of my Debian boxen, graphical package management is a sin against "$DEITY" (IMO).
User avatar
Head_on_a_Stick
 
Posts: 7994
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Lysander » 2018-01-02 08:41

Thorny wrote:you generally are a quick study and you've never growled at me. :-)


Both of those are good things, I hope!

Thorny wrote:If, especially while changing things and trying things out, you were to record in a log book, you could have checked if the timestamp on the file was the same as the date you installed XFCE, for confirmation. That would be easier than having to parse back through your dpkg.log's to find it, with a lot of activity, it's probably already gz. But keeping a log book isn't something most home users do, although it has some potential to help while you are still trying things out.


You have a point here. I've installed and uninstalled Xfce and KDE. Keeping logs of major things like that would have been useful. I'll check to see if there's any way to find out when I installed Xfce.

EDIT: looks like it was around mid Nov. I'm betting that at one point it was the default session and that's when the file was created by lightdm.

https://forum.xfce.org/viewtopic.php?id=3108

Thorny wrote:Since you've chosen GNOME and no other DEs, that file is useless and unnecessary until such time as you add another DE that would use it and overwrites it. And, in this instance, it interfered with the way you wanted to use your system.


Indeed. I'll get rid of it.


Thorny wrote: I'm still oldschool apt-get most of the time.


I've always used apt and actually don't actually know the difference between apt and apt-get. Time to do some reading.

On another note, getting rid of Synaptic may be something to consider. I never use it.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: How to configure /.dmrc for default DE via tty1 [SOLVED]

Postby Thorny » 2018-01-02 10:09

Lysander wrote:Both of those are good things, I hope!

They are in my book. ;-)
Lysander wrote:I've always used apt and actually don't actually know the difference between apt and apt-get. Time to do some reading.

On another note, getting rid of Synaptic may be something to consider. I never use it.

My suggestion is to stick with Apt, it is the future and does have what I consider some useful new features. For me it is just a case of old habits. I do use Apt but I have to check the man page more often to make sure I'm doing what I want to do.

If you want something to study, it might be reasonable to learn Aptitude and all its features.

This is your thread, so you get to direct it. However, I still wonder if HoaS or anybody else is familiar enough with Synaptic to answer that last question I asked. If the "complete" removal option does in fact remove that user configuration file or blank it, then the confusion you started out with would not have been there. I can't remember if you have the capability of using virtual machines but if you do, you could quickly set one up with those previous conditions we have been discussing and see how Synaptic handles it.

Having the Synaptic GUI on your system does not make you less 133t. :-)
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable