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

 

 

 

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

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#1 Post by Lysander »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#2 Post by Head_on_a_Stick »

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?
deadbang

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#3 Post by Lysander »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#4 Post by Head_on_a_Stick »

Lysander wrote:very close to your suggestion
Ah yes, sorry, i don't have access to a Debian box atm.
I think that might be for KDE and the OP only says "Linux" [sic] rather than Debian.
deadbang

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#5 Post by Lysander »

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
Thorny
Posts: 542
Joined: 2011-02-27 13:40

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

#6 Post by Thorny »

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
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#7 Post by Lysander »

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
Thorny
Posts: 542
Joined: 2011-02-27 13:40

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

#8 Post by Thorny »

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
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#9 Post by Lysander »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#10 Post by Head_on_a_Stick »

Lysander wrote:'Purge' doesn't purge absolutely everything, it seems
APT should never touch any files in "$HOME", that is the expected behavior.
deadbang

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#11 Post by Lysander »

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
Thorny
Posts: 542
Joined: 2011-02-27 13:40

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

#12 Post by Thorny »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#13 Post by Head_on_a_Stick »

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).
deadbang

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

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

#14 Post by Lysander »

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
Thorny
Posts: 542
Joined: 2011-02-27 13:40

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

#15 Post by Thorny »

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. :-)

Post Reply