You are not logged in.

#1 2015-09-26 19:08:32

francois.e
Member
Registered: 2011-11-02
Posts: 61

SOLVED: enable root login with xinitrc

I work in root mode only in virtualbox where I have setup an archlinux guest over another linux distribution. I have installed the xfce environment and tried to enable root login with xinitrc with specifying in ~/.xinitrc:
startxfce4

Reading in the xfce wiki and in the xinitrc wiki I did not found any strategy to enable root login with xinitrc. Neither did I found such information on the net.

Is there a way to enable automatically root login into the X environment with xinitrc? Or the only way would go thru the use of a login manager (I am working on kdm to do so meanwhile, thus I installed kdebase-workspace). Would sddm be able to do that?

Thanks.


Note: Maybe this should not be written in the newbie corner. Under kde/kdm it is possible to autologin root and :
http://www.blackmoreops.com/2013/12/19/ … gnome-kde/

You need to work with the /usr/share/config/kdm/kdmrc under archlinux.

Last edited by francois.e (2015-10-12 03:12:57)

Offline

#2 2015-09-26 20:07:18

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: SOLVED: enable root login with xinitrc

Note: Maybe this should not be written in the newbie corner.

*Mod hat off*

I agree. A topic about automatically logging in as root into a graphical environment is more of a dustbin topic. Even newbies have more sense than to do that. I seriously recommend against what you're trying to accomplish.

*Mod hat back on*

That all being said, I can't bin a topic just because I disagree with the objective. If others want to help you accomplish something as foolish as this, good luck to them.

I'll just leave some reading material for you.

http://www.howtogeek.com/124950/htg-exp … m-as-root/


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-09-26 20:10:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: SOLVED: enable root login with xinitrc

The wiki clearly covers how to set up autologin, and autostarting of X if you want.  Whether you do this for a normal user (as described in the wiki) or for root is your own choice - but there shouldn't be any difference in the process.

What is unclear about what is in the wiki?  What have you done so far and where are you stuck?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2015-10-02 20:01:04

francois.e
Member
Registered: 2011-11-02
Posts: 61

Re: SOLVED: enable root login with xinitrc

@trilby:
I have intalled archlinux 64 bit into virtualbox according to :
-the beginners guide
-added xorg
-added networkmanager
-added xfce4 and xfce4-goodies
-installed guest additions to get full screnne and shared folders between my linux host and the archlinux guest
-changed ~/.xinitrc to add:
exec startxfce4

Here is my /.xinitrc file:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
#to startup xfce4 automatically without login
exec startxfce4

Last edited by francois.e (2015-10-02 20:02:37)

Offline

#5 2015-10-02 20:11:51

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: SOLVED: enable root login with xinitrc

Why not just create a user?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2015-10-02 20:17:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: SOLVED: enable root login with xinitrc

You have two exec lines. Reread the wiki page.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-10-02 20:18:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: SOLVED: enable root login with xinitrc

Well I wouldn't expect this to launch xfce:

exec xterm -geometry 80x66+0+0 -name login
#to startup xfce4 automatically without login
exec startxfce4

What *does* happen?  Does it just seem to exit immediately?  That would be the expected result based on the steps you have described.  Either create an xinitrc to do what you want, or install xterm, xclock, and twm to fit with what that one is telling X to do.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2015-10-03 03:53:36

francois.e
Member
Registered: 2011-11-02
Posts: 61

Re: SOLVED: enable root login with xinitrc

Thanks all for your feedback.

I have changed under root ~/.xinitrc content to include this information only:
exec startxfce4

I have created a normal user called fl and created thru ~/.xinitrc with this information only:
exec startxfce4

rebooted from fl or from root. I get the same result: I do not boot directly into X environment and XFCE.

Offline

#9 2015-10-03 11:33:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: SOLVED: enable root login with xinitrc

Why would you expect to boot directly into xfce for either user, you have not set this up!

Xinitrc is for using startx/xinit.  If you want to boot directly to X, there are instructions for that on the wiki, which you clearly are not reading.  This is starting to sound like help vampirism.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2015-10-03 12:10:30

francois.e
Member
Registered: 2011-11-02
Posts: 61

Re: SOLVED: enable root login with xinitrc

@trilby:
This is a very serious accusation. ; )

I understand the DIY nature of your comment, and I am really ready to do the work. You are once more counselling me to read more and reread if necessary. And I have been spending hours setting up archlinux directly onto the computer (which I have renounced to for now) and on this virtualbox guest. And as some my other posts testify, I would say that I can find my way sometimes. Are we still in a friendly forum? Have I been rude to the helpers yet?

Before reading your post I think I have cornered the information. It was not in the xinitrc wiki, neither in the xfce wiki, neither in the xorg wiki, but in the systemd wiki under Xorg and systemd: automatic loading into Xorg without display manager or Xorg as a systemd user service. At least, I hope that empiricism will pay for that so simple function that I am trying to implement.

I will try that.

My fear at some point with the system that I am building  is that a bad manoeuver will just completely destroyed the construct of my os. But I realize that the worst it will cost me is more time and a better knowledge of the arch linux os. Thus there might be virtue in the antivampirism attitude that you promote. : )

And also virtue for patience, though it is much affected by fortune.

Last edited by francois.e (2015-10-03 12:12:18)

Offline

#11 2015-10-12 03:10:13

francois.e
Member
Registered: 2011-11-02
Posts: 61

Re: SOLVED: enable root login with xinitrc

SOLUTION:
You will need three modifications:

1.0 There is a way with systemd to do an override.conf, thus preserving the intactness of  /etc/systemd/system/getty@tty1.service. You can create this file as /etc/systemd/system/getty@.service.d/override.conf:
https://wiki.archlinux.org/index.php/Au … th_systemd

/etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear %I 38400 linux

2.0 Invoking startx thru tty1 automatically thru bash_profile (autostart x login).
Modify ~/.bash_profile adding at the end to enable login true display and ask for starting X:
https://wiki.archlinux.org/index.php/Xinitrc
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

3.0 Modifying ~/.xinitrc to boot xfce by inserting at the end of the file exec startxfce4 with a text editor like nano (command line) or mousepad (graphical environment):

exec startxfce4

Last edited by francois.e (2015-11-03 03:19:11)

Offline

Board footer

Powered by FluxBB