Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X without display manager[solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Sun Nov 23, 2014 5:13 am    Post subject: X without display manager[solved] Reply with quote

I'm trying to automatically start an xfce session without a display manager
I'm using this guide http://wiki.gentoo.org/wiki/Automatic_login_to_virtual_console
and have editted my inittab accordingly:
http://pastebin.com/zVyW3DYj

I've also tried the systemd service method
nothing, I keep getting prompted for my username and password


thanks


Last edited by Adel Ahmed on Thu Dec 04, 2014 5:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Thu Nov 27, 2014 5:26 am    Post subject: Reply with quote

help anyone?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Nov 27, 2014 5:30 am    Post subject: Reply with quote

Are you using systemd? (In this case I do not know, although I did set up a Debian box using systemd some time ago for autologin with Google help. It worked, I see no reason why it shouldn't work in Gentoo.)
If you are using OpenRC make sure you have agetty installed.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Nov 27, 2014 10:51 am    Post subject: Reply with quote

I can't help with systemd.

If you want to use openrc then all you should need is to emerge mingetty, then modify your inittab this way:

Code:
c1:2345:once:/sbin/mingetty --noclear --autologin <your_user_name_here> tty1 linux
#c1:12345:respawn:/sbin/agetty 38400 tty1 linux --noclear


If that doesn't help, please, give us details on what you did and what the result was, error massages if any or whatever else.

If it works, then you are prepared to move into the next step, which would be launching X from your shell rc file and configuring a valid ~/.xinitrc so that X does something useful.
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Thu Nov 27, 2014 5:42 pm    Post subject: Re: X without display manager Reply with quote

blakdeath wrote:
I keep getting prompted for my username and password
thanks


You should make sure the display manager is removed from the default runlevel, what does

Code:
 rc-update show default

give?

Alex.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Sat Nov 29, 2014 1:51 pm    Post subject: Reply with quote

Thanks everone
But I am currently using systemd
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 233

PostPosted: Sat Nov 29, 2014 2:46 pm    Post subject: Reply with quote

Systemd is just nonsense when it comes to auto login. Take a look at arch's wiki the page is named auto login to virtual console. And than just make your self a .xinitrc file which will execute the session you want.

Or you could write a few systemd files (services) and use that.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Sun Nov 30, 2014 5:57 am    Post subject: Reply with quote

I've tried out that arch wiki entry method, unfortunately I just get a screen with plenty of dmesg messages, and I cannot use the keyboard
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 233

PostPosted: Sun Nov 30, 2014 11:35 am    Post subject: Reply with quote

That happened to me when I had misspelt something. If you have not made any mistakes and it still doesn't work I would suggest you to write your own services.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Sun Nov 30, 2014 12:11 pm    Post subject: Reply with quote

I see nothing wrong:
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin adel --noclear %I 38400 linux
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 233

PostPosted: Sun Nov 30, 2014 12:27 pm    Post subject: Reply with quote

In parent directory there should be a file (don't remember the name) which you can configure for the same purpose, but it is not documented anywhere. Delete the file you created and tinker with the file in the parent dir.

Note: I only know about the file in the parent dir because a guy on arch forum screwed something up and came for help. And I can not look up the exact file because I use openrc even on Arch.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Tue Dec 02, 2014 6:15 pm    Post subject: Reply with quote

well I've editted the /etc/systemd/system/getty.target.wants/getty\@tty1.service to automatically login my user, problem is if I try to shutdown the machine, it just starts X again
I'm currently working on this issue
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 233

PostPosted: Tue Dec 02, 2014 6:30 pm    Post subject: Reply with quote

Post your ~/bash_profile, or whatever is the profile file your shell uses.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Wed Dec 03, 2014 5:50 pm    Post subject: Reply with quote

here's my bash_profile:

[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx
fi
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Wed Dec 03, 2014 6:54 pm    Post subject: Reply with quote

blakdeath wrote:
here's my bash_profile:

[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx
fi

That's the way to go... still I have no clue what would happen with SystemD crap. You can find additional tips in https://wiki.gentoo.org/wiki/Enlightenment
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1510

PostPosted: Thu Dec 04, 2014 5:42 am    Post subject: Reply with quote

well I was looking around in the service file and I found the following line:
Restart=always
changed it to Restart=no and X does not start when I try to shut down anymore

thanks everyone
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum