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

 

 

 

Auto Login in Debian 8.10

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
nikudim
Posts: 2
Joined: 2018-05-11 16:56

Auto Login in Debian 8.10

#1 Post by nikudim »

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!

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: Auto Login in Debian 8.10

#2 Post by Head_on_a_Stick »

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
deadbang

nikudim
Posts: 2
Joined: 2018-05-11 16:56

Re: Auto Login in Debian 8.10

#3 Post by nikudim »

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?

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: Auto Login in Debian 8.10

#4 Post by Head_on_a_Stick »

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:

http://forums.debian.net/viewtopic.php?f=16&t=123694
deadbang

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Auto Login in Debian 8.10

#5 Post by debiman »

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

Re: Auto Login in Debian 8.10

#6 Post by Head_on_a_Stick »

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
deadbang

1byte
Posts: 59
Joined: 2017-07-16 06:51

Re: Auto Login in Debian 8.10

#7 Post by 1byte »

My notes on Autologin:

# LightDM - Autologin
------------------------------------------------------------------------------------------------------------------------------------------------------------
http://forums.debian.net/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

Post Reply