- Как запустить графическую оболочку Ubuntu
- Запуск графической оболочки Ubuntu
- RootUsers
- Guides, tutorials, reviews and news for System Administrators.
- How To Start GUI In CentOS 7 Linux
- Start GUI In CentOS
- Summary
- How to start GUI linux programs from the command line, but separate from the command line?
- 14 Answers 14
- GUI does not start
- 10 Answers 10
- Not the answer you’re looking for? Browse other questions tagged boot gnome or ask your own question.
- Linked
- Related
- Hot Network Questions
- Subscribe to RSS
- How do you run Ubuntu Server with a GUI?
- 14 Answers 14
Как запустить графическую оболочку Ubuntu
Если вы запустили систему в текстовом режиме или вовсе это сервер и на нём надо работать только через терминал, но на нём уже есть установлено графическое окружение, есть несколько способов его запустить.
В этой статье мы постараемся разобраться как запустить графическую оболочку Ubuntu из терминала несколькими способами.
Запуск графической оболочки Ubuntu
Сначала можно посмотреть текущий уровень запуска в systemd. Для этого выполните:
systemctl list-units —type target | egrep «eme|res|gra|mul» | head -1
Если уровень запуска не graphical.target вы можете это исправить выполнив команду:
sudo systemd isolate graphical.target
После этого уровень запуска будет изменён на графический и графическая оболочка запуститься автоматически. Если вам нужно запустить менеджер входа вручную выполните такую команду:
sudo systemctl start display-manager
Эта команда запустит менеджер входа в систему, после этого вы сможете ввести логин и пароль, а затем запуститься графическая оболочка.
С более простыми графическими оболочками, вроде Openbox, Fluxbox, i3wm и даже XFCE может сработать ещё один метод, очень популярный ранее. Это команда startx. Однако чтобы она сработала в файле
/.xinitrc надо прописать оболочку, которую вы хотите запустить. Например:
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
feh —bg-fill
/Загрузки/52453-sklon_holm_cerkvushka_sneg.jpg &
lxpanel &
exec openbox-session
Блок if загружает все конфигурационные файлы из каталога /etc/X11/xinit*, сторчка, начинающаяся с feh добавляет фон рабочего стола, следующая — нижнюю панель, а последняя запускает сам openbox. Теперь запуск графической оболочки Ubuntu из консоли выполняется командой:
Или если, на первом экране уже что-то запущено, можно использовать любой другой доступный, например, второй:
Обратите внимание, что оболочку можно запустить только из консоли TTY, из терминала в графическом окружении это не сработает. Как видите, всё просто. Ваша оболочка запуститься в том же терминале, в котором вы выполнили startx.
Источник
RootUsers
Guides, tutorials, reviews and news for System Administrators.
How To Start GUI In CentOS 7 Linux
By default a full installation of CentOS 7 will have the graphical user interface (GUI) installed and it will load up at boot, however it is possible that the system has been configured to not boot into the GUI.
In this quick guide we will show you how to swap to the GUI and enable it to start up by default on system boot.
Start GUI In CentOS
In this example I have installed CentOS 7 but we are not currently using the GUI. With the systemctl command, we can list the default target that the system is configured to boot into.
The multi-user.target is similar to the well known run level 3, which is essentially console only with networking enabled.
We can start the GUI right now (as long as there is a GUI installed) by running ‘systemctl isolate graphical.target’.
While this will start the graphical user interface by moving us into the graphical target (similar to run level 5), if we perform a reboot we will not be presented with the GUI. To do this, we must first set the graphical target to become the default.
Now if we reboot the system we will automatically boot into the GUI, which ever version you may have installed. If you’re interested in changing things up, check out our posts on installing different GUIs in CentOS.
Summary
We have seen that we can easily change the current target to the graphical target at run time, and to set the system to boot to the graphical target automatically.
Источник
How to start GUI linux programs from the command line, but separate from the command line?
I’ve searched for this before, but have never been able to find an answer.
In Windows, if I have a console window open, type winmine , and press enter, Minesweeper will appear, completely separate from the cmd program. The Minesweeper instance is not tied to the command prompt in any way that I know of, with the exception of Minesweeper’s parent being set to that instance of the command prompt. It’s different in Linux, however.
In Linux, if I have a console window open, type emacs and press enter, Emacs will open, but it seems tied to the command line. Specifically, it appears that I can’t use the command line anymore until that instance of Emacs is closed. Is there a way to replicate the Windows behavior in Linux?
14 Answers 14
In bash , detach is a built-in, used as follows:
In zsh , you can background and detach in a single operation:
Append & to the commandline:
This will put emacs in the background and enable you to continue using your terminal.
Note that this will still leave emacs as a sub-process of your terminal, and when you exit the terminal it will also exit emacs. To avoid this, type:
The parentheses tell the terminal to detach the emacs process from the terminal.
Still, stdout and stderr messages from the program will show up on the terminal. To prevent this, use:
Use nohup . Like this: nohup amarok &
Hope this helps.
I posted an answer to an older thread of similar topic with answers from various sources. Following is a copy of that answer adapted for this thread.
This is Nathan Fellman’s answer plus redirection.
«&> /dev/null» redirects both stdout and stderr to the null device. The last ampersand makes the process run in the background. The parentheses around the command will cause your «gui_app» to run in a subshell.
Doing this will detach the «gui_app» process from the console you execute this command from. So even if you close the window parent terminal emulator is running in, «gui_app» won’t close. I ran this then looked at the process tree with «pstree» command and found an application started this way will become child process to «init».
will run the application in the background, but it will become a child process of the console process and will terminate when you close the terminal. (Though exiting the terminal through bash by using the exit command or Ctrl-D will let bash clean up by handing off the background process to init.)
«nohup» works as NawaMan has suggested, but that redirects output & error to a file by default. As JeffG has answered, «disown» command (if available in shell) can detach process from terminal after you’ve started a background process:
(BTW all of this applies to bash. I’m sure other shells have other methods/syntax for doing this.)
If it’s a simple call to a GUI application — without complicated options and such — it seems using a launcher like «gmrun» or dmenu (warning: loud audio) is also a good option. Bind it to a key combination. I don’t use a launcher yet but have tried those two.
NOTE: CarlF in the comments of the other thread reports GUI apps started via «gui_app &» method does not close when he exits from the parent terminal. I think that we were closing the terminal in different ways. I was closing the window the terminal emulator was running in. I think he may have been exiting the terminal emulator through the shell (exit command or Ctrl-D). I tested this and saw that exiting through bash does not stop GUI started as terminal’s background process as CarlF says. It seems bash hands off background processes to init when it is given the chance to clean up. In fact, this must be the mechanism by which the background process started in a subshell gets handed off to init.
Источник
GUI does not start
Initially, the computer was showing the error as mentioned in How to fix «The system is running in low-graphics mode» error? question. Fixing it resulted in the above error.
Please take look at the last line
One more thing before all this problem I have edited xorg.conf file to use Tooya X graphic tablet as suggested on here.
I don’t know if that’s the reason but I thought it is important to share.
10 Answers 10
Alt+F2 keystroke which started the terminal session for me and I was able to login.
Then choose your display manager in the menu that opens (for Ubuntu 16.10+ the default is GDM, for 16.04 and earlier the default is LightDM), or use sudo dpkg-reconfigure gdm3 to choose GDM.
This should work
There appears to be other people having this issue as well. A bug report was also made on this. It appears to be a bug with version 3.16. A temporary fix would be to use LightDM instead, so (in a VT, eg Ctrl+Alt+F1 :
Press enter to get past the «Configuring lightdm» screen, and then navigate to LightDM in the list of options and press Enter. Restart, and you should be using LightDM. This should work temporarily until the GDM bug is fixed.
I solved this issue like this:
- Press Ctrl Alt F7
- Press Alt F2
- Log in via terminal
- Go to /etc/X11 and delete xorg.conf (or rename for backup)
I tried all the possible solutions mentioned in comment area and other answers. Unfortunately none of them work.
Solution that worked for me was format and re-install.
I had to format my laptop before re-installing. Because re-installing without format was not working. I mean computer starts normally but there were several bugs with WiFi, Bluetooth, USB, etc.
I had the exact same issue, After messing around for 3-4 hours I finally got the ubuntu running.
Before I reboot the ubuntu I did install xubuntu by
sudo apt-get install xubuntu-desktop
mkdir -p /var/lib/lightdm
chown -R lightdm:lightdm /var/lib/lightdm
chmod 0750 /var/lib/lightdm
So it installed xubuntu desktop but I got everything working fine.
This is how I did it.
I would suggest first try the 2nd part if that does not work then try the installing xubuntu desktop.
Hope it helps someone.
Happened with me with gdm 3.28. The problem was nvidia driver (which was working fine few days before) After allowing software updater to install updates I shut it down and rebooted in morning to see this same error.
Uninstalled nvidia driver (I used the .run file to install it)
Press Alt+F3 to access console mode
Verdict: Do not update software from GUI if you have nvidia driver installed. Check if the update will affect any installed driver, especially if the driver isn’t from ubuntu repositories
You will get more details when running gdm manually in a virtual console ( Ctrl + Alt + F1 ):
For me, the problem was that gdm wasn’t able to find /usr/bin/X, which led me to this bug. Turns out xserver-xorg was not installed somehow. The following line solves this particular problem.
Hope this helps.
In my case with Ubuntu 17.10 in a Virtualbox VM the error occurred because the partition for Linux was full. I solved this problem this way:
- Start the machine with using Linux live image (on CD, USB or so)
- Mount the Linux partition and create space
- Restart the machine
Enter a TTY with Ctrl + Alt + F6 and run:
and then push start button left corner and the preferencs and the upper gfx settings adm and set all to default, and reboot and it might work fine this way.
Start Ubuntu in recovery mode, (Esc->Advanced options->recovery mode). You have few things to check and correct, in particular my issue was solved after selecting and passing tow entries [dppk: repair broken packages], some upgrades where done and some obsolete packages removed. then i check entry: [grub: update grub bootloader] . something was corrected! then i chose to boot . then system boots normally! my point is if you can boot in recovery and check your fs . etc. then no need to format/install.
Not the answer you’re looking for? Browse other questions tagged boot gnome or ask your own question.
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.8.40416
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Источник
How do you run Ubuntu Server with a GUI?
Trying to run a Ubuntu server for the first time. But everything is in a terminal. Is there a way to switch to a GUI?
14 Answers 14
There’s no specific distribution called “Ubuntu server”, it’s all Ubuntu. There are different installation media for Ubuntu desktop and server, but the difference is only in the initial installation program and the set of packages included. The server installation media doesn’t install a GUI by default, but it’s just a package installation away. The desktop installation media does install a GUI by default.
To add a desktop UI environment to an Ubuntu installed as the «server» variety, you’ll need to install some packages from the internet.
Run these commands to install a desktop environment:
You should get a graphical login prompt at that point (I’m not completely sure; if you don’t get one, reboot).
Once you have a GUI, you should go and enable a few more software sources, at the very least security updates and the universe repository. Click on the Ubuntu button, and search for «Software Sources”, and check the “restricted”, “universe” and “multiverse” boxes (in addition to “main”) in the first tab, and check at least “-security” and “-updates” (and you might as well check the others) in the “Updates” tab.
If you want to administer locally
You can install the default Ubuntu desktop by executing the following:
sudo apt-get install ubuntu-desktop
There are many desktop alternatives which you may install and use, like:
- Gnome 3 installation: sudo apt-get install gnome-shell
- KDE see Kubuntu installation: sudo apt-get install kubuntu-desktop
- XFCE installation: sudo apt-get install xfce4
- LXDE installation: sudo apt-get install lxde
- Openbox installation: sudo apt-get install openbox
- Gnome Classic (old) a Gnome 3 desktop that looks like Gnome 2 installation: sudo apt-get install gnome-session-fallback
- Ubuntu Gnome (Official flavor) installation: sudo apt install ubuntu-gnome-desktop
Local and or remote administration
Except from the above you can administer your server by using a web based solution using less resources:
- Webmin installation: see here
- Zentyal (
offers community editionthere seems to be no free edition enymore. A lot of complaints, it’s stripped down more and more. ) installation: see here - ISPConfig (supports up to 16.10) installation: see here
Hi guys after a little research I wanted to share an answer too!
Some more info can be found here https://help.ubuntu.com/community/ServerGUI. I assume you start with a clean install of Ubuntu Server 16.04 (some modifications may be needed for older versions of Ubuntu). Depending on your needs you can do these:
Minimal GUI:
Run the command startx and openbox will start (you can open a terminal there and run any application you want)
Minimal GUI with display manager:
After reboot you will see the lightdm login menu.
A more functional minimal desktop environment (the one I use):
EXPLANATION: lxde-icon-theme is needed for basic icons(there are alternatives), lxde-core and lxde-common will install the basic lxde components, policykit-1 and lxpolkit are needed to run pkexec, lxsession-logout is needed so that the logout menu works, gvfs-backends is needed if you want trash,network,devices etc support at pcmanfm
A full lightweight desktop environment:
Then choose one of these:
EXPLANATION: Each of these metapackages is based on lxde,xfce and mate desktop respectively including dependencies such as alsa, lightdm etc. and with many more packages such as themes, configurations etc.
A full lightweight desktop environment without minding the recommendations:
Choose one of these:
EXPLANATION: Almost the same as 4 (including full xorg installation) but with many more packages such as bluetooth, printers, scanner support, different themes and fonts, basic gnome tools etc.
A full desktop with all the extras (better choose another option):
Choose one of these:
EXPLANATION: This will install everything that the live cd of each ubuntu flavor installs (that means even the media players or whatever they find useful for their flavor. So, it’s not recommended option
TIP1: The —no-install-recommends options applies to all dependencies packages recursively so I first install xorg package to make sure all graphic drivers and other packages are installed and so that my system is portable even if I change motherboard or GPU. Some people install only components of xorg but I’ve never been able to create a usable system this way.
TIP2: If an option you choose installs network-manager and network-manager-gnome then better use it to configure your network and delete everything at /etc/network/interfaces file (except the lo interface) in order to avoid conflicts.
TIP3: If you need remote desktop via x11vnc then choose option 2 to 6 (I think you also need to add option -auth guess and -loop so that vnc works before you login and after you logout)
TIP4: At options 2 to 6 if you wanna stop lightdm autostarting then run the command sudo systemctl disable lightdm and you can start it whenever you want with sudo systemctl start lightdm . To re-enable it run sudo systemctl enable lightdm and check it with systemctl is-enabled lightdm (sometimes you can’t re-enable it and the is-enabled commands has output static so run sudo apt install —reinstall lightdm to fix it)
TIP5: There is also another option (which I left out on purpose). You can install the specific desktop environment metapackage like lxde , xfce4 , mate-desktop-environment , plasma-desktop , unity , gnome . However, you will need more packages than just xorg in most cases and these packages or metapackages might install packages that are not longer preferred by any Ubuntu flavor. For example lxde installs wicd as recommendation when all flavors (including lubuntu) use network-manager and network-manager-gnome nowadays. To see differences between packages you can search here: http://packages.ubuntu.com/
TIP6: If upon boot you see the greeter and it throws you back to tty again, then simply restart the lightdm by firing sudo service lightdm restart
Источник