# Graphics mode in the console.



## valsorym (Jul 26, 2011)

Hi all,
I do not install the GUI and use the console.
But I do not like the expansion of 80 x 25 characters.

How do I turn the graphics mode in the console?
I used

```
# vidcontrol -g 100x37 VESA_800x600
```
(or add to /etc/rc.conf: _allscreens_flags = "-g 100x37 VESA_800x600"_)
but need have next option in kernel:


```
options SC_PIXEL_MODE
```

My GENERIC did not have this option.
Ok. I load the kernel source:


```
# cat /etc/csup/src-all
```


```
*default host=cvsup3.ua.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8_2
*default delete use-rel-suffix
*default compress
src-all
```


```
# csup /etc/csup/src-all
```

And:

```
# cd /sys/i386/conf/
# cp GENERIC MYKERNEL
# vi MYKERNEL
```
And add options SC_PIXEL_MODE
- save.


```
# cd /usr/src/
# make KERNCONF=MYKERNEL kernel
```
All ok.


```
# reboot now
```

And.

```
# vidcontrol -g 100x37 VESA_800x600
```
- do not work, again.

I'm new on FreeBSD (previously used Win XP) .
I understand that I have not recompiled the kernel. As it is easier (to start), I can solve this problem?

Oh, yes - my system:

```
# uname -a
FreeBSD  8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Jul 26 23:40:43 UTC 2011
 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```


----------



## UNIXgod (Jul 26, 2011)

add this to your kernel:

```
options VESA
```

may also be loaded as a module iirc


----------



## valsorym (Jul 26, 2011)

Ok.


```
# echo 'iirc_load="YES"' >> /boot/loader.conf
# reboot now
```

And

```
# vidcontrol -g 132x43 VESA_800x600
```

It is do not worked.
Diagnosis - lamer. What am I doing wrong?

How to add in kernel?

```
options         SC_PIXEL_MODE
options         VESA
```

Now reread  _FreeBSD Developers' Handbook_ Kernel


----------



## wblock@ (Jul 27, 2011)

VESA BIOS implementations vary, but tend to be minimal.  Using X for a graphic terminal gives a lot more options.  This came up enough that I wrote Using X For A High Resolution Console On FreeBSD to document it.


----------



## SirDice (Jul 27, 2011)

While the console graphics modes are nice to have they are rather slow. Especially scrolling.


----------



## valsorym (Jul 27, 2011)

Previously, I installed Xorg and GNOME2.
Extract from the file /etc/rc.conf

```
â€¦
# GUI.
hald_enable=â€YESâ€
dbus_enable=â€YESâ€

gdm_lang=â€ru_RU.KOI8-Râ€
#gnome_enable=â€YESâ€
# end GUI sector.
â€¦
```
If I want to relax, I run GNOME:

```
# /usr/local/etc/rc.d/gdm forcestart
```

I read this link: Using X For A High Resolution Console On FreeBSD 

Ok, 

```
# mkdir â€“p ~/scripts/console/
# cd ~/scripts/console/
# vi uxf
...
```


```
# cat uxf
#!/bin/sh
# (c) 2011 Warren Block 
setxkbmap -option terminate:ctrl_alt_bksp
xset r rate 250 55
Terminal --hide-menubar &
exec antiwm
```


```
# xstart
```

Run X-Windows. 
Earlier, I ran it, but it did not work - because non-whites included "dbus" and "hald".
This is a good alternative to my question. Thank you. But I continue.


```
# cd ~/scripts/console/
# sh uxf
Terminal: not found
exec: antiwm: not found
```

While I do not understand much.

However, Q: A good option is to run 7 X-Windows  in 7 virtual consoles?
A: It did not happen. Write (If this server is no longer running, remobe /tmp/.X0-lock).

xterm - a good analog console, but it is not convenient to switch between them.

Thank you for opening a new view.


----------



## wblock@ (Jul 27, 2011)

doorways said:
			
		

> I read this link: Using X For A High Resolution Console On FreeBSD
> 
> Ok,
> 
> ...



Translation problem?



> ```
> # cd ~/scripts/console/
> # sh uxf
> Terminal: not found
> ...



x11/Terminal must be installed.  Other terminals like xterm would work also.



> However, Q: A good option is to run 7 X-Windows  in 7 virtual consoles?



Probably not.  antiwm has key sequences to switch between windows.  So do Terminal and sysutils/tmux.


----------



## valsorym (Jul 27, 2011)

> Originally Posted by *wblock*.
> Translation problem?



Yes, sorry. 



> Originally Posted by *wblock*.
> x11/Terminal must be installed. Other terminals like xterm would work also.



Oh, I realized.



> Originally Posted by *wblock*.
> Probably not. antiwm has key sequences to switch between windows. So do Terminal and sysutils/tmux.



Ok, thank you very much!


----------



## valsorym (Jul 27, 2011)

Ok.
I installed "x11/Terminal" and "sysutils/tmux".
Run "uxf" script. And


```
exec: antiwm: not found
```

But, ran a "Terminal" - black console. 
Thank you, I will examine X-Windows as an alternative to graphical console. :stud


----------



## UNIXgod (Jul 27, 2011)

doorways said:
			
		

> Ok.
> 
> 
> ```
> ...



doorways I'm sorry. I will be more explicit next time. when I said _iirc_ it meant as shorthand for "If I Recall Correctly"

http://www.urbandictionary.com/define.php?term=iirc

You didn't do anything wrong and it seems that you are coming along fine and are not a lamer. You will want to remove that non existent kernel module from your loader.conf.

look at this:
http://caterva.org/blog/posts/High_resolution_console_on_FreeBSD/


```
# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC-SC_PIXEL_MODE
# [color="Red"]echo "options SC_PIXEL_MODE" >> GENERIC-SC_PIXEL_MODE[/color]
# cd /usr/src
# make buildkernel KERNCONF=GENERIC-SC_PIXEL_MODE
# make installkernel KERNCONF=GENERIC-SC_PIXEL_MODE
# [color="Red"]echo 'vesa_load="YES"' >> /boot/loader.conf[/color]
# [color="Red"]echo 'allscreens_flags="MODE_325"' >> /etc/rc.conf[/color]
# shutdown -r now
```


----------



## bes (Jul 27, 2011)

Before
	
	



```
# echo 'allscreens_flags="MODE_325"' >> /etc/rc.conf
```
it would do well to check out all available modes:

```
vidcontrol -i mode
```


----------



## valsorym (Jul 27, 2011)

In this case all modes are in the format:
80 characters in width, and
25-60 characters in height.

it's all text mode, I want:
200 width
and 100 in height. 

like this


----------



## UNIXgod (Jul 27, 2011)

doorways said:
			
		

> In this case all modes are in the format:
> 80 characters in width, and
> 25-60 characters in height.
> 
> ...



So this is working for you? Mark the thread solved if it is.


----------



## valsorym (Jul 27, 2011)

> Originally Posted by *UNIXgod*.
> doorways I'm sorry. I will be more explicit next time. when I said iirc it meant as shorthand for "If I Recall Correctly"
> http://www.urbandictionary.com/define.php?term=iirc



Oh, I from Ukraine and i have translation problem. Sorry me.



> Originally Posted by *UNIXgod*.
> 
> ```
> # cd /usr/src/sys/i386/conf
> ...



And:

```
# vidcontrol -g 100x37 VESA_800x600
```

Yes, it works. 
Thank you very much. No, no. A huge thank you.
This is a direct response to my question.

I will now:

```
# echo 'allscreens_flags = "-g 100x37 VESA_800x600"' >> /etc/rc.conf
```

That's all. Thank you very much UNIXgod.


----------



## valsorym (Jul 27, 2011)

And now

```
# vidcontrol -i mode
```

Show me many mode, thanks bes.


----------



## valsorym (Jul 27, 2011)

Thank you all very much! Theme maybe closed. 
Thank all, again.


----------



## wblock@ (Jul 27, 2011)

doorways said:
			
		

> Ok.
> I installed "x11/Terminal" and "sysutils/tmux".
> Run "uxf" script. And
> 
> ...



Install x11-wm/antiwm.  This and other requirements are described in the Setup section of the article.


----------



## UNIXgod (Jul 27, 2011)

doorways said:
			
		

> Oh, I from Ukraine and i have translation problem. Sorry me.



No it's not your fault. you don't have a translation problem; I have a communication problem :e

To personally better myself I realize I need to communicate effectively to the largest segment of the population as possible without obfuscation. In this case I failed( not you) at providing the information in the clearest possible manner. I am glad it is working for you.

~


----------



## bes (Jul 28, 2011)

doorways@   Congratulations 

Simply note, it is possible to change the default colors of syscons.
For example, the following line will set the default colors. The normal text will be green on black background:

```
options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
```
The following line will set the default colors of the kernel message.
The kernel message will be printed red on black background:

```
options	SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK)
```
for more details have a look at syscons(4) and /usr/src/sys/conf/NOTES

Few months ago I played with it.  Screenshot.



> Originally Posted by UNIXgod.
> doorways I'm sorry. I will be more explicit next time. when I said iirc it meant as shorthand for "If I Recall Correctly"
> http://www.urbandictionary.com/define.php?term=iirc





			
				doorways said:
			
		

> Oh, I from Ukraine and i have translation problem. Sorry me.


Wtf is little shell script  which translates acronyms :

```
# wtf wtf iirc
WTF: {what,when,where,who,why} the *beep**beep**beep**beep*
IIRC: if I recall correctly
```


----------



## valsorym (Aug 1, 2011)

> Originally Posted by *wblock*.
> Install x11-wm/antiwm. This and other requirements are described in the Setup section of the article.



Yes, it works. Thank you.
Although I like to option to transfer the console in graphical mode.


Thank you "UNIXgod" for over the issue.
Thank you "bes" for the good properties of the console settings.

Thank you all.


----------



## nickednamed (Aug 6, 2011)

Thanks guys. 

That is just what I've been trying to work out!

I now have a nice, high-res console.

Dvtm has just become 10 times more useful.


----------



## UNIXgod (Aug 6, 2011)

nickednamed said:
			
		

> Thanks guys.
> 
> That is just what I've been trying to work out!
> 
> ...



dvtm rocks.


----------



## valsorym (Aug 12, 2011)

I think what "tmux" better, than "dvtm" or "screen".
It is mine subject opinion.


----------



## nickednamed (Aug 14, 2011)

I actually prefer to use tmux. But it kept crashing or freezing on me, so i use dvtm which has never crashed on me.


----------



## valsorym (Aug 14, 2011)

> Originally Posted by *nickednamed*.
> I actually prefer to use tmux. But it kept crashing or freezing on me, so i use dvtm which has never crashed on me.



Yes, You are right.
If I show of a large file, tmux spoils the whole screen ..
Without a doubt - the idea tmux good, but it works - wants the best.
I also probably will move on dvtm.
Thanks.


----------



## jrm@ (Aug 14, 2011)

doorways said:
			
		

> Yes, You are right.
> If I show of a large file, tmux spoils the whole screen ..



/usr/bin/reset often fixes things.  This page might be helpful: http://docstore.mik.ua/orelly/unix/upt/ch42_04.htm


----------



## valsorym (Aug 14, 2011)

Thanks.


----------

