Auto Login in Debian 8.10

New to Debian (Or Linux in general)? Ask your questions here!

Auto Login in Debian 8.10

Postby nikudim » 2018-05-11 17:02

Hello everyone.

I am having a trouble setting up auto login on my debian 8 with cinnamon environment.
Googleling the web, I found out that /etc/lightdm/lightdm.conf needs to be adjusted. Here is the problem:

After I try gedit /etc/lightdm/lightdm.conf I receive this:
No protocol specified

** (gedit:19022): WARNING **: Could not open X display
No protocol specified
Unable to init server: Could not connect: Connection refused

(gedit:19022): Gtk-WARNING **: cannot open display: :0


Any suggestions?


Thanks in advance!
nikudim
 
Posts: 2
Joined: 2018-05-11 16:56

Re: Auto Login in Debian 8.10

Postby Head_on_a_Stick » 2018-05-11 17:45

nikudim wrote:Any suggestions?

Code: Select all
sudoedit /etc/lightdm/lightdm.conf

Or
Code: Select all
# editor /etc/lightdm/lightdm.conf

EDIT: thread moved to Beginner's Questions
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Auto Login in Debian 8.10

Postby nikudim » 2018-05-11 19:34

Head_on_a_Stick wrote:
nikudim wrote:Any suggestions?

Code: Select all
sudoedit /etc/lightdm/lightdm.conf

Or
Code: Select all
# editor /etc/lightdm/lightdm.conf

EDIT: thread moved to Beginner's Questions



Thank you for the reply and moving the topic.

This command opened the files but it is black, there is nothing in it...
I do not think it is normal. What am I doing wrong?
nikudim
 
Posts: 2
Joined: 2018-05-11 16:56

Re: Auto Login in Debian 8.10

Postby Head_on_a_Stick » 2018-05-11 20:49

nikudim wrote:This command opened the files but it is black

What is black?

Which editor did you select for sudoedit (or which editor is set as /etc/alternatives/editor)?

Editing system files with a GUI is not best practice, you should learn how to use a terminal-based editor for such tasks, nano is probably best for you.
there is nothing in it...

Please post the full output of
Code: Select all
cat /etc/lightdm/lightdm.conf

EDIT: using LightDM for auto-login is silly anyway, just let agetty log you in instead:

viewtopic.php?f=16&t=123694
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Auto Login in Debian 8.10

Postby debiman » 2018-05-13 03:22

nikudim wrote:This command opened the files but it is black, there is nothing in it...
I do not think it is normal. What am I doing wrong?

which command? HoaS gave 2.
show us the exact & full command.

from what i see, 3 possibilities:
1. permission denied because you did not use privilege escalation (sudo or su)
2. the file does not exist
3. misconfigured $EDITOR variable. very unlikely imo.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Auto Login in Debian 8.10

Postby Head_on_a_Stick » 2018-05-13 07:25

debiman wrote:misconfigured $EDITOR variable

I suggested that the OP try the `editor` command, which is supplied by /etc/alternatives/editor — this will probably be linked to either a vi clone (I forget which one) or nano.

I suppose there is a chance that the editor alternative (and the sudoeditor) is set to /bin/ed, that would probably be quite confusing :lol:

@OP: what is the output of
Code: Select all
ls -l /etc/alternatives/editor
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Auto Login in Debian 8.10

Postby 1byte » 2018-05-18 07:08

My notes on Autologin:

# LightDM - Autologin
------------------------------------------------------------------------------------------------------------------------------------------------------------
viewtopic.php?t=119348
http://www.linuxserve.com/2015/06/how-t ... ebian.html




# Automatic Login for LightDM - MATE
------------------------------------------------------------------------------------------------------------------------------------------------------------
sudo cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.back
sudo nano /etc/lightdm/lightdm.conf
########################################################################
[SeatDefaults] # !!!!!!!!

autologin-user=donald
autologin-user-timeout=0
########################################################################
sudo dpkg-reconfigure lightdm





# Automatic Login for GDM3 - GNOME3
------------------------------------------------------------------------------------------------------------------------------------------------------------
sudo cp /etc/gdm3/daemon.conf /etc/gdm3/daemon.conf.back
sudo nano /etc/gdm3/daemon.conf
########################################################################
Under [daemon] entry uncomment these two lines:

AutomaticLoginEnable = true
AutomaticLogin = donald
########################################################################
sudo dpkg-reconfigure gdm3
1byte
 
Posts: 57
Joined: 2017-07-16 06:51


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable