I want to use Ubuntu in console mode (ctrl + alt + f1) instead of the graphical interface. Is it possible to run a graphical program, such a browser or a game from it?
3 Answers
You need to start an Xsession for an X program to run. You can open an Xsession just for your program with xinit, ie to start firefox:
xinit /usr/bin/firefox -- :9
You must use a full binary path and assign a free display server (the -- :9 at the end)
A lot of modern applications may expect some kind a binding to a WM, so this may not work as well as expected.
Also, you can change the new Xsession screen resolution with xrandr.
-
-
xrandr -s <resolution> --display <display>. You can list available resolutions with "xrandr -q" or add you own resolution (3rd post here ubuntuforums.org/showthread.php?t=1112186)– xvanFeb 14, 2015 at 22:53
If by running a graphical program from a shell, sure... ie on the command line enter gedit filename where filename is a file you want to edit. If you have the graphical portion of Ubuntu installed it will start up.
I do not recall the name specifically off hand, but there are specific browsers that are text only that are very small format and do a pretty good job - providing that the website/developer wrote code that is W3C compliant.
Again, if you have installed the full graphical Ubuntu you can start a program from the command line (ie firefox)
Hope this helps!
As for a browser, you can install links2 and run it in graphical mode using
links2 -g www.google.com
You will need to have a framebuffer working and you will probably also want gpm so you can have a cursor. You can also run mplayer on the framebuffer, as for games you can install bsdgames and you will be able to play with :
backgammon
worm
tetris-bsd
You can also install ninvaders which is a cool game also.
P.S. : All the capture are taken on gnome-terminal but those programs work on the real console.
startx
from within the tty. Think of it as it's own separate terminal.startx
is one command which would do that depending on what you are using. But this is all done in one of your ttys (so Ctrl + Alt +F1-F8
) you return to the original one with F1/F2 usually, but they are all basically ttys just one is running GUI.