CentOS 7 how to stop / start Gnome desktop from command line [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have remote server running under CentOS 7, usually it's enough to operate using SSH CLI - but sometimes I need a graphic access, so I installed Gnome Desktop there too.
But how to stop or start Gnome Desktop ? Especially because gnome-shell eats CPU when I don't need Gnome.
It seems strange but 3 pages of Google search did not help.
I'm afraid there are no a simple solution here like
service gnome stop | start
So thanks in advance for any hint or howto !

But the solution was simple.
First of all - check if you GDM service is running.
service gdm status
If not - start it to make active.
(my case service gdm was loaded but inactive and it causes a confusing)
After that I just stopped gdm service
service gdm stop
and checked any Gnome processes
ps aux | grep gnome
an output is empty, Gnome desktop gone until started again by
service gdm start

Related

How to stop a linux service (daemon) from a windows server [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
New to linux but sadly a linux server just got dumped on us when we have no experience, so trying to gather experience and get some of the automation back.
One of the services we need to automate the start/stop/restart of is now on linux as a daemon i think it is.
All our sql databases, task schedules and automations are on windows servers so I need to work out a way of sending linux commands from a windows service to stop and start a service.
Is there any way of doing this from windows powershell or command prompt?
Like sending the below commands to the linux server
sudo systemctl stop
sudo systemctl start
I am a complete novice with linux commands so please be kind :)

Local Linux user that automatically executes a command thyat can't be turned off [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I've spent last few hours looking for a solution for my problem which is:
I have my home server set up next to me with a small monitor attached to it. What i want to do is i want to create an additional user called "monitor" that executes command "nethogs eth1" straight after it has been logged one locally on the machine, and does not allow to turn off the script.
Basically i want nethogs running 24/7 on my monitor, without way to turn it off.
Please help me if you know the solution.
sudo adduser monitor
echo "sudo -u monitor nethogs eth1" >> /etc/rc.local
Each time your machine boots, it will execute nethogs eth1 as user monitor, and only root or monitor itself can stop that command.

Possible for multiple users to login into the same tty [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm running an Arch Linux. I installed a display manager. So every time I turn on my machine, it switches to tty1 and there is a login manager GUI. I wonder if it's possible to do the following: while I logged in using username0 on tty1, now I somehow return to the display manager, without killing my session, and another user reuses tty1 and logs in using username1. Much like a user switch, but without having to really logoff first. So I can switch back and forth with everything still running.
Try screen.
If you start it using
screen -S screen-test
And allow multiuser access using
CTRL-A
:multiuser on
And allow another user to join your screen using
CTRL-A
:acladd anotheruser
You can reattach to it as a different user using command
screen -x myuser/screen-test
Try tmux or screen I like tmux much better

Terminal in Gnome for Arch Linux Not Working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I've just installed Arch Linux and installed the gnome package (Note: Not gnome-extra)
I open Gnome using the xinit gnome-session command, as I have already installed X Window.
When I run that command, Gnome opens up and I'm presented with a white terminal titled "login". However, nothing I do in this terminal actually does anything. No commands work, nothing.
Could someone help me figure out what I'm doing wrong? There have been a few questions around similar to this, however none that have been properly answered.
Thank you!
After installing gnome session you need to append
exec gnome-sssion
at the end of your .xinitrc file located at your home.
when you get the login: prompt enter your username and then your password.
Once you're logged in type startx to start gnome session
Solved! I hadn't set Gnome to startup automatically, so when you login to Arch Linux using your standard root login. Check that gnome is installed and works (Use: xinit gnome-session).
Create an account by going to Settings, Users, Create the account as Administrator. Logout of Gnome Log back in as root to your Arch Linux CLI Use the command: systemctl enable gdm The next time you reboot, you should be presented with the Gnome Login screen.

Is it possible to forward the output of "service httpd restart" for example to "notify-send $output"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
If I create a script that will restart apache:
service httpd restart
... I will never know what the output was because it does not open the terminal window.
I am wondering if the output can be taken and then forwarded to:
notify-send output
... this way there is some visual of what happened for few seconds on the screen.
First, you really should look inside the terminal when running your script.
Also, notice that services are started before login time (at boot time).
And server daemons like Apache or Lighttpd have their own log files usually under /var/log/;
You could put the output of service httpd restart command into some variable like
restart_msg=$(service httpd restart 2>&1)
where 2>&1 redirects stderr to stdout
then you can show that with
notify-send "HTTPD restarted" "$restart_msg"
But I don't think all this is a good idea. You should take the habit of restarting services inside a terminal and have a look at the output (in the rare case something gets wrong, you'll need all of it).
Read the Advanced Bash Scripting Guide.

Resources