2

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
  • 1
    You would need to do something similar to startx from within the tty. Think of it as it's own separate terminal.
    – No Time
    Feb 11, 2015 at 0:38
  • Could you explain some more?
    – Erik W
    Feb 11, 2015 at 20:43
  • 1
    The ttys are basically like an emulator for a terminal (think kinda like terminal/mainframe, or a separate computer entirely). When you load up your OS, you actually have scripting which will run something to start your graphical interface. 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.
    – No Time
    Feb 11, 2015 at 22:46

3 Answers 3

2

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.

2
  • How do I change the resolution exactly?
    – Erik W
    Feb 11, 2015 at 20:03
  • 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)
    – xvan
    Feb 14, 2015 at 22:53
1

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!

1
  • I meant running without any desktop Environment, but thanks anyways
    – Erik W
    Feb 11, 2015 at 23:14
1

As for a browser, you can install links2 and run it in graphical mode using

links2 -g www.google.com

links2 in graphical mode

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

backgammon

worm

worm

tetris-bsd

tetris-bsd

You can also install ninvaders which is a cool game also.

ninvaders

P.S. : All the capture are taken on gnome-terminal but those programs work on the real console.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .