armbian设置字体分辨率以及sh报错处理

Orangepilite 开发板型号
 
 
 
 let: not found解决办法
 
 
错误描述:运行shell脚本,报错误
 
test.sh: 4: test.sh: let: not found
 
 
 
解决办法:
 
It's because Ubuntu uses the dash shell as default and doesn't always recognize when you try to set the shell in a script. Even if you enter "echo $SHELL" into the console it will tell you you're using /bin/bash but for some reason it's actually using dash instead.
 
use:
sudo dpkg-reconfigure dash
<password>
 
and when you get the option select "no" to actually use bash instead of dash
 
 
应用
这里列出部分常用dpkg-reconfigure 指令做为参考。
 
dpkg-reconfigure dash 
设置默认的shell为bash
dpkg-reconfigure locales 
本地化语言设置
 
Ubuntu中字体的改变
 
 
1.sudo dpkg-reconfigure console-setup
 
2.弹出 Configuring console-setup 界面,选择适当的编码格式,我们一般选择默认的UTF-8,选择OK
 
3.在接下来的界面里选择字体,可以依次尝试,我选择默认的latin1 and latin5 -western Europe and Turkic languages,这种字体下有较大的字体大小选择空间。
 
4.选择字体显示效果,根据说明,我选择了TernimusBold,因为我要用Framebuffer来显示。
 
5.接下来的界面选择字体大小。
 
 

有时我们想切换到字符界面去写一些代码,发现字符界面的字体有些小,
对于带镜子的童鞋,看起来将是有些困难。
下面我们看一看如何修改其字体大小,

点击(此处)折叠或打开

  1. $ sudo dpkg-reconfigure console-setup

 

之后根据个人喜好选择,

我这里选择了Latin7-->Terminus-->28x14-->OK

然后执行即可:

点击(此处)折叠或打开

  1. $ sudo setfont /usr/share/consolefonts/Lat7-Terminus28x14.psf.gz
 
 
 
一条命令就能解决
 
sudo apt-get install fbterm
 
然后按Ctrl + Alt + [F1] 进入命令行界面,输入:
sudo fbterm
 
就可以显示中文了
 
 
 
 
Linux通过xrandr命令设置屏幕分辨率以及多屏
date: 2013.05.23; modification:2018.08.17
 
目录:
 
1 背景
2 查看分辨率
3 设置分辨率
4 设置启动自动运行
5 设置多屏
1 背景
没有桌面系统的时候, 比如使用awesome, 屏幕显示分辨率不对就需要用命令行来设置.
 
2 查看分辨率
调用命令:
 
xrandr
会出现类似如下结果:
 
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 800
default connected 1280x800+0+0 0mm x 0mm
   1024x768       85.0     75.0     70.0     60.0      0.0  
   832x624        75.0  
   800x600        85.0     75.0     72.0     60.0     56.0      0.0  
   640x480        85.0     75.0     73.0     60.0      0.0  
   720x400        85.0  
   640x400        85.0      0.0  
   640x350        85.0  
   320x240         0.0  
   400x300         0.0  
   512x384         0.0  
   854x480         0.0  
   1280x720        0.0  
   1280x800        0.0* 
   720x480         0.0  
   720x576         0.0  
   320x200         0.0  
   800x480         0.0  
   1280x768        0.0  
default connected 1280x800+0+0 0mm x 0mm表示当前默认是1280x800.
 
3 设置分辨率
输入命令:
 
xrandr --output default --mode "1920x1080"
即可变为1920x1080的分辨率。
 
4 设置启动自动运行
可以将命令放到: /etc/X11/Xsession.d/45custom_xrandr-settings 脚本中.
 
5 设置多屏
如果连接了多屏, 调用无参数的xrandr会显示类似信息:
 
Screen 0: minimum 8 x 8, current 3360 x 1080, maximum 32767 x 32767
HDMI1 connected primary 1920x1080+1440+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.08    60.00  
   1024x576      59.97  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    60.00  
   720x400       70.08  
VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 430mm x 280mm
   1440x900      59.89*+  74.98  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.08    72.00    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32  
   640x480       75.00    72.81    66.67    60.00  
   720x400       70.08  
其中的HDMI1 VGA1就是用来设置多屏用的名称.
 
设置双屏:
 
克隆模式:
 
xrandr --output VGA1 --same-as HDMI1 --mode 1920x1080
扩展模式:
 
xrandr --output VGA1 --right-of HDMI1 --auto
 
xrandr --output HDMI1 --primary --auto --output VGA1 --auto --left-of HDMI1     # 这种方式设置多个
 
 
二,setfont
 
     setfont  -   load EGA/VGA console screen font (加载EGA/VGA终端字体)
 
    !注意:setfont在x下没法使用,只能是在EGA/VGA字符终端下可用。
 
    用法:setfont [font_name] [-C console_name]
 
    典型用法:
 
        $setfont  -- 设置当前终端字体为默认字体。
 
 
 
        $setfont font_name    --设置当前终端字体为指定名称的字体。
 
        $setfont font_file         --设置当前终端的字体为指定的字体。
 
                                            font_file只能是psf,psfu与psf.gz,psfu.gz稍后说明。
 
        $sudo setfont  -C /dev/tty2 [font_name] --设置指定终端的字体。
 
        
 
        字体文件:字体文件存放在/usr/share/kbd/consolefonts,
 
        以我的主机为例:
 
        $ls /usr/share/kbd/consolefonts
 
        。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
 
        eurlatgr.psfu.gz              Tamsyn10x20r.psf.gz      ter-i20b.psf.gz
        Goha-12.psfu.gz               Tamsyn5x9b.psf.gz        ter-i20n.psf.gz
        Goha-14.psfu.gz               Tamsyn5x9r.psf.gz        ter-i22b.psf.gz
        Goha-16.psfu.gz               Tamsyn6x12b.psf.gz       ter-i22n.psf.gz
        GohaClassic-12.psfu.gz        Tamsyn6x12r.psf.gz       ter-i24b.psf.gz
        GohaClassic-14.psfu.gz        Tamsyn7x13b.psf.gz       ter-i24n.psf.gz
        GohaClassic-16.psfu.gz        Tamsyn7x13r.psf.gz       ter-i28b.psf.gz
        gr737a-8x8.psfu.gz            Tamsyn7x14b.psf.gz       ter-i28n.psf.gz
        gr737a-9x14.psfu.gz           Tamsyn7x14r.psf.gz       ter-i32b.psf.gz
        gr737a-9x16.psfu.gz           Tamsyn8x15b.psf.gz       ter-i32n.psf.gz
        gr737b-8x11.psfu.gz           Tamsyn8x15r.psf.gz       ter-k12n.psf.gz
 
        。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
 
        font_name:上述字体文件去掉.psf.gz/.psuf.gz后缀
 
        font_file:就是上述文件,记得切换到该目录或者使用绝对路径。
 
 
 
        用例:setfont GohaClassic-16
 
                    setfont GohaClassic-16.psfu.gz
 

改变Ubuntu控制台字体大小(转)

 

输入

sudo dpkg-reconfigure console-setup

选择一个适合的字体和字号即可。

 
 
 
 

dpms显示器休眠设置:

开启:$ sudo xset dpms 1 1 2
取消:$ sudo xset -dpms

xset设置屏保:

设置10秒后进入屏保:$ sudo xset s 10 600
恢复系统默认值:$ sudo xset s 0 600
取消屏保:$ sudo xset s off

测试发现取消屏保的指令不工作,所以可以投机取消一下,通过设置很大的时间值延缓屏保的到来:$ sudo xset s 99999 99999

但通过 $ sudo xset q 查看设置的情况发现,最大值是有限制的,到不了所设置的时间值。

 当然,你也可以安装fcitx-pinyin or fcitx-sunpinyin,如果你喜欢你甚至可以将他们全部安装,可以通过以下命令:

sudo apt install fcitx-googlepinyin fcitx-pinyin  fcitx-sunpinyin
 
 

Debian 系统安装中文 / 中文输入法

 

apt-get install ttf-wqy-zenhei(安装字体)   
apt-get install ibus ibus-gtk ibus-pinyin(安装输入法)

posted @ 2020-11-25 19:33  dongfangbao  阅读(556)  评论(0)    收藏  举报