2

I am installing fedora 21 server on VM.

It used to boot in to text/command line interface. So I followed steps here.

In the last step, when I did vi /etc/inittab, the file reads initab is no longer used

So as instructed, I ran following:

systemctl set-default graphical.target

but now when I reboot it gives me blank screen with blinking cursor to which I cannot type anything.

2

If you use GNOME, systemctl enable gdm.service.

If you use KDE (kdm), systemctl enable kdm.service.

| improve this answer | |
  • 1
    err, but what happens if those packages aren't installed? – thrig Jan 2 '18 at 21:47
  • This is what helps when GUI stops working due to the removal of Network Manager in CentOS 7 you guys. – Jan Czajkowski Dec 12 '18 at 21:54
1

Fedora Server doesn't come with the packages for a graphical environment installed. It's meant to be managed remotely. If you want to add one, you can, but you'll need to do that in addition to changing the default target.

Try

sudo yum groupinstall basic-desktop-environment

or

sudo yum groupinstall xfce-desktop-environment

Alternately, if really what you want is a desktop platform with some server software installed (perhaps for development), you might start from Fedora Workstation and yum install those few packages.

| improve this answer | |
-1

It is booting into your graphical environment, however it's failing to load the environment. (You wouldn't see a cursor if X or Wayland wasn't started)

This sounds like a configuration problem. I don't know the inner workings of fedora so I can't help with that, but in the meantime, if you can successfully load the GUI using startx, you could do things the way they do on arch.

(source) First: /etc/systemd/system/getty@tty1.service.d/override.conf

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin username --noclear %I 38400 linux

(remember to replace username with your username)

(source) Then: ~/.bash_profile (at the bottom)

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx &> $HOME/xorg.log

Doing the above will automatically log you in @tty1 (console 1) and then execute startx when you log in, it will also post the output of startx into ~/xorg.log.

An alternative approach would be to do the whole thing in one systemd service.

/etc/systemd/system/xinit@.service

[Unit]
Description=startx for user %i
After=x@vt7.service systemd-user-sessions.service
Wants=x@vt7.service
Conflicts=getty@tty1.service

[Service]
User=%i
TTYPath=/dev/tty1
PAMName=login
Environment=DISPLAY=:0
WorkingDirectory=/home/%I
Nice=0
ExecStart=/bin/bash -l -c "cd; startx >/dev/null 2>&1"

[Install]
WantedBy=graphical.target
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.