English
Ask Your Question
1

How to stop and start x server, Fedora 19? [closed]

asked 2013-10-01 04:55:02 +0000

Hi again,

As I've stated before, I am new to Linux and am trying to find resources or instructions that work to stop and start x server. This is more for the experience than anything else at this time.

I have tried su - > password > init 3 and I get the black screen and to login which succeeds, then I type init 5 and it outputs "failed to issue method call: Access Denied

Am I using the wrong syntax or something? Or is it to do with my proprietary (akmod) nVidia drivers?

I would greatly appreciate any advice.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, right answer was accepted" by Akshay
close date 2013-10-29 02:59:18.792539

Comments

The systemctl isolate xyz.target command is the Systemd equivalent of SysVinit’s init runlevel and telinit runlevel commands. For a list of the targets, and their SysVinit run-level equivalents, see the link in @randomuser’s post. Since the older commands should still work, and simply call the Systemd equivalents, it’s probable that this won’t fix your problem, but it should be ruled out first.

Gareth Jones ( 2013-10-01 16:06:56 +0000 )edit
1

Why do you need to restart X server? Perhaps you don't need to do it. Please share, what do you want to achive, perhaps there is a better way?

Artur Szymczak ( 2013-10-02 07:35:47 +0000 )edit

6 Answers

Sort by » oldest newest most voted
3

answered 2013-10-01 05:38:23 +0000

The init command should still function, but Fedora does not use sysVinit. You should start getting used to the systemd commands, see:

http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

Remember, you can only change targets as root. Check the journal (journalctl) if the correct commands under proper privileges don't work, and update your question with anything suspicious.

edit flag offensive delete publish link more

Comments

The journalctl command generates thousands of lines of code that I don't understand at all and the telinit 5 command does the same thing as init 5 does "failed to issue method call: Access Denied". I'm completely out of my depth. I guess I need to try a simpler Linux distribution?

elwood ( 2013-10-01 21:17:12 +0000 )edit
1

Read the link. Don't use init. Try systemctl isolate graphical.target.

randomuser ( 2013-10-02 05:42:59 +0000 )edit

I am sure that your (randomuser) answer is the correct one although I am having some trouble understanding the commands. I guess it's going to take me a while before I can begin to understand Fedora. I'll print out that page and study it and maybe then I can begin to make sense of it.

elwood ( 2013-10-02 20:58:57 +0000 )edit
0

answered 2013-10-03 21:58:46 +0000

deusdara gravatar image

updated 2013-10-03 21:59:56 +0000

Hi

You change run level to 3:

$ su -

password

init 3

That will stop X.

To get back to normal with a GUI, change to runlevel 5:

at prompt type

root

root password

#init 5

edit flag offensive delete publish link more
0

answered 2013-10-28 06:35:36 +0000

hawkfeather gravatar image

updated 2013-10-28 07:20:46 +0000

Using the init 3 command will log out the user, and you'll have to log back in. For KDE users, to simply reboot the desktop w\out a full user logout, do the following as sudo or root:
# systemctl restart kdm.service
Or use start or stop in place of restart when appropriate.

As I recall for GNOME, you open an input form w\ Alt-F2, then r<Enter>.

Hope this helps;]

edit flag offensive delete publish link more
0

answered 2013-10-03 22:03:56 +0000

sea gravatar image

updated 2013-10-03 22:05:56 +0000

Just to complete the list here, beeing aware init is no longer supportet...

Log in to another TTY, for example 2.

ALT + CTRL + F2

Login as root and then type:

init 3 && init 5

Fedora will go to Multiuser, resetting any running X session, and reload into Graphical and shows the login screen.

Hope this helps

edit flag offensive delete publish link more
-2

answered 2013-10-01 21:19:48 +0000

I am able t stop X on my Fedora 19 by pressing CRTL + F12 and then restart it by pressing CRTL + F1 and X starts back after about 10 seconds. Take note that you will lose your session if you use this method and will have to log back in when X restarts.

edit flag offensive delete publish link more

Comments

If this method works, just about to try it, does it mean any changes that are made while X is stopped are also lost along with the session? Not that I'm planning to make changes right now, just when and if I need to. I don't know if I'm doing it right, but CTRL+F12 has no effect, but I was able to use the init 5 command to work. I didn't realize that I wasn't in root after X was off, so tried su - and then password and it worked. So thanks for all the help. I would like for the key combination to work also tho'.

elwood ( 2013-10-01 23:18:47 +0000 )edit
1

This switches virtual consoles, it does not restart X. If you are logged out of a session when you switch TTYs, something is dramatically wrong with your system.

randomuser ( 2013-10-02 05:40:38 +0000 )edit
-2

answered 2013-10-02 00:14:42 +0000

My apologies Elwood, I forgot "ALT". The commands are CTRL + ALT +F12 to stop and CTRL + ALT + F1 to restart it. You will be logged out when you use the F12 key sequence and Fedora will drop back to terminal. You can actually log into other accounts and do other normal terminal commands while in this mode. To restart X simply press the CTRL + ALT + F1 key sequence. Also for some reason sometime F4 will work when F1 doesn't. I hope this helps you!

edit flag offensive delete publish link more

Comments

This also is blatantly incorrect. BTW, you can update your answer instead of posting a new one.

randomuser ( 2013-10-02 05:41:24 +0000 )edit

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers to your questions.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question tools

Follow
1 follower

Stats

Asked: 2013-10-01 04:55:02 +0000

Seen: 10,172 times

Last updated: Oct 28 '13