shenglianfeng

聚精会神搞建设, 一心一意谋发展.
posts - 2, comments - 0, trackbacks - 0, articles - 0
   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

2010年4月15日

环境: VMwork - RHEL 5.4

启动SecureCRT, 文件 -> 快速连接, 协议选择SSH2, 主机名填写Linux主机的IP. 其他默认, 连接.
然后会出现一个密码框, 要求你输入账户和密码.


如果没有出现密码框, 可以看下Linux的防火墙设置, 在信任的服务里面勾选上SSH.

如果输入账户密码后, 被告知错误而无法连接, 则可能有以下两种情况:
  1. root账户
  2. 使用的账户密码为空


对此两种情况, 可以打开/etc/ssh/sshd_config文件, 发现有如下被注释的两行配置:
  #PermitRootLogin yes
  #PermiEmptyPasswords no
将这两行改为:
  PermitRootLogin yes
  PermiEmptyPasswords yes
最后/etc/init.d/ssdh restart即可.


连接后你会发现终端里的问题都是单色, 在SecureCRT中, 选择会话选项 -> 仿真, 选择Linux, 并勾选ANSI颜色.

vim也是可以上色的, 编辑/etc/vimrc, 用以下代码覆盖原有内容:
" ==============================================
"
 General settings
"
 ==============================================
set nocp
set ru
set nu
"set cin
"
set cino = :0g0t0(sus
set sm
set ai
set sw=4
set ts=4
set noet
set lbr
set hls
"set backspace = indent , eol , start
"
set whichwrap = b , s , < , > , [ , ]
"
set fo+ = mB
set selectmode =
"set mousemodel = popup
set keymodel =
"set selection = inclusive
"
set matchpairs+ =
"
 ==============================================
"
 Cursor movement
"
 ==============================================
"
nnoremap gj
"
nnoremap gk
"
vnoremap gj
"
vnoremap gk
"
inoremap gj
"
inoremap gk
"
nnoremap g$
"
nnoremap g0
"
vnoremap g$
"
vnoremap g0
"
inoremap g$
"
inoremap g0
"
nmap :confirm bd
"
vmap :confirm bd
"
omap :confirm bd
"
map! :confirm bd
syntax on
set foldmethod=syntax
if (has( " gui_running " ))
set nowrap
set guioptions+=b
colo inkpot
else
set wrap
colo ron
endif
"let mapleader = " , "
if !has("gui_running")
set t_Co=8
set t_Sf=^[[3%p1%dm
set t_Sb=^[[4%p1%dm
endif

posted @ 2010-04-15 14:43 shenglianfeng 阅读(2449) | 评论 (0)编辑 收藏

环境: VMware - RHEL 5.4

可能很多朋友装好后发现分辨率只有800x600和600x480选项.

网上普遍提供了一种方法:

即修改/etc/X11/xorg.conf文件.
 1 
 2 Section "Screen"
 3     Identifier   "Screen0"
 4     Device       "Videocard0"
 5     DefaultDepth 24
 6     SubSection "Display"
 7         Viewport 0 0
 8         Depth    24
 9         # 添加Modes, 后接你需要的分辨率
10         Modes    1280x800
11     EndSubSection
12 EndSection

无效.

不过发现另一种解决方法:
System -> Administration -> Display, 在Hardware选项卡中可以配置显示器, 其中就有你需要的分辨率.
修改完后重启Xwindow, Display中就可以使用新的分辨率了.

此时可以再看下xorg.conf文件:

Section 
"Monitor"
    Identifier   
"Monitor0"
    ModelName    
"LCD Panel 1280x800"
 ### Comment all HorizSync and VertSync values to use DDC:
    HorizSync    
31.5 - 50.0
    VertRefresh  
56.0 - 65.0
    Option        
"dpms"
EndSection

Section 
"Screen"
    Identifier 
"Screen0"
    Device     
"Videocard0"
    Monitor    
"Monitor0"
    DefaultDepth     
24
    SubSection 
"Display"
        Viewport   
0 0
        Depth     
24
        Modes    
"800x600" "640x480"
    EndSubSection
EndSection

posted @ 2010-04-15 11:59 shenglianfeng 阅读(1181) | 评论 (0)编辑 收藏