gentoo intel 安装桌面

首先增加 vim ~/.xinitrc

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

# dbus before fcitx
eval `dbus-launch --sh-syntax --exit-with-session`

# use gtk and qt
#export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export [email protected]=fcitx

# not use gtk and qt
export GTK_IM_MODULE=xim
#export QT_IM_MODULE=xim
#export [email protected]=fcitx

exec i3

然后 查找 i5 480m 属于 gen5, 所以在 make.conf 中增加 VIDEO_CARDS="intel i965", 增加 USE="glamor"

然后 vim /etc/X11/xorg.conf.d/20-modesetting.conf

Section "Device"
    Identifier "Intel Graphics"
    Driver  "modesetting"
    Option  "AccelMethod"   "glamor"
    Option  "DRI"   "3"
EndSection

增加用户到用户组: gpasswd -a ptz video

然后 vim /etc/X11/xorg.conf.d/modesetting.conf

Section "Device"
    Identifier  "modesetting"
    Driver      "modesetting"
EndSection

HTML5/VAAPI GPU hangs

Device Drivers --->

[*] IOMMU Hardware Support --->

[*] Support for Intel IOMMU using DMA Remapping Devices

[*] Enable Intel DMA Remapping Devices by default

安装 i3, dmenu, i3status, i3lock, uxvt-unicode, 设置 uxvt-unicode 的 USE=“x11-terms/rxvt-unicode 256-color perl wcwidth xft -vanilla”, google-chrome.

vim ~/.Xresources

! Using XLFD
! URxvt*font:   monospace:size=8
! Using Xft
!URxvt*font:    xft:wqy-microhei:size=10 monospace:size=8
!URxvt*font:    xft:wqy-microhei:size=10
!URxvt*font:    xft:Dejavu sans mono:size=10
!URxvt*font:    xft:Inconsolata:size=12
!URxvt*font:    xft:Inconsolata:size=12:style=Regular:antialias=true, xft:wqy-microhei:size=10:style=Regular:antialias=true
URxvt*font: xft:Inconsolata:size=12:style=Regular:antialias=true, xft:wqy-bitmapsong:size=10:style=Regular:antialias=true
!URxvt*font:    xft:Inconsolata:size=12:style=Regular:antialias=true
!URxvt*boldfont:    xft:Inconsolata:size=12:style=Bold:antialias=true, xft:wqy-microhei:size=10:style=Bold:antialias=true
URxvt*boldfont: xft:Inconsolata:size=12:style=Bold:antialias=true, xft:wqy-bitmapsong:size=10:style=Bold:antialias=true

Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight
Xft.autohint:   false
Xft.lcdfilter:  lcddefault

URxvt.scrollBar:true
URxvt.scrollBar_right:true
URxvt.scrollBar_floating:false
URxvt.scrollstyle:rxvt

! input method
URxvt.inputMethod:fcitx

!-*- Perl extensions -*-
URxvt.perl-ext-common: default,selection-to-clipboard,pasta,matcher,keyboard-select
URxvt.keysym.M-u:     perl:url-select:select_next
URxvt.url-launcher:   /usr/bin/google-chrome-stable
URxvt.underlineURLs:  True
URxvt.matcher.button: 1
URxvt.keysym.M-Escape:perl:keyboard-select:activate
URxvt.keysym.Control-Shift-V:     perl:pasta:paste
! Comment this if you dont want copy when text is selected
URxvt.clipboard.autocopy: true

! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
! black
URxvt*color0:  #000000
URxvt*color8:  #686868
! red
URxvt*color1:  #B21818
URxvt*color9:  #FF5454
! green
URxvt*color2:  #18B218
URxvt*color10: #54FF54
! yellow
URxvt*color3:  #B26818
URxvt*color11: #FFFF54
! blue
URxvt*color4:  #1818B2
URxvt*color12: #5454FF
! purple
URxvt*color5:  #B218B2
URxvt*color13: #FF54FF
! cyan
URxvt*color6:  #18B2B2
URxvt*color14: #54FFFF
! white
URxvt*color7:  #B2B2B2
URxvt*color15: #FFFFFF

vim ~/.config/i3/config

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
font pango:wqy-microhei 10
font pango:fontawesome 10

# mod
set $Mod Mod4

# mode
bindsym $Mod+o mode "$mode_launcher"

mode "$mode_launcher" {
    bindsym b mode "$mode_browser_launcher"
    bindsym e mode "$mode_edit_launcher"
    bindsym i mode "$mode_ide_launcher"
    bindsym r mode "$mode_read_launcher"
    bindsym n mode "$mode_net_launcher"
    bindsym f mode "$mode_finance_launcher"
    bindsym v mode "$mode_virtual_launcher"

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_browser_launcher" {
    bindsym c exec google-chrome-stable

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_input_launcher" {
    bindsym f exec fcitx

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_edit_launcher" {
    bindsym e exec emacs
    bindsym g exec gvim
    bindsym l exec libreoffice

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_ide_launcher" {
    bindsym e exec eclipse-cpp
    bindsym q exec qtcreator
    bindsym t exec true_studio

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_read_launcher" {
    bindsym z exec zathura

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_net_launcher" {
    bindsym i mode "$mode_im_launcher"

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_im_launcher" {
    bindsym p exec pidgin

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_finance_launcher" {
    bindsym g exec gnucash

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

mode "$mode_virtual_launcher" {
    bindsym v exec sudo virt-manager
    bindsym b exec sudo VirtualBox

    bindsym Escape mode "default"
    bindsym Return mode "default"
}

# compton
# work with i3 start
exec_always --no-startup-id compton -b
#exec --no-startup-id compton -b

# urxvt daemon
exec_always --no-startup-id urxvtd --quiet --opendisplay --fork
#exec --no-startup-id urxvtd --quiet --opendisplay --fork

# 0-100
bindsym $Mod+Return exec urxvtc -sh 50
#bindsym $Mod+Return exec urxvt

# picture
exec_always --no-startup-id feh --bg-scale "/home/ptz/picture/shortcut_key/emacs_scrot_1.png"

# input
exec_always --no-startup-id fcitx -r

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.

# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up l
set $down k
set $left j
set $right semicolon

#set $up k
#set $down j
#set $left h
#set $right l

# use Mouse+$Mod to drag floating windows to their wanted position
floating_modifier $Mod

# start a terminal
#bindsym $Mod+Return exec i3-sensible-terminal
#bindsym $Mod+Return exec urxvt

# kill focused window
bindsym $Mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $Mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $Mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $Mod+$left focus left
bindsym $Mod+$down focus down
bindsym $Mod+$up focus up
bindsym $Mod+$right focus right

# alternatively, you can use the cursor keys:
bindsym $Mod+Left focus left
bindsym $Mod+Down focus down
bindsym $Mod+Up focus up
bindsym $Mod+Right focus right

# move focused window
bindsym $Mod+Shift+$left move left
bindsym $Mod+Shift+$down move down
bindsym $Mod+Shift+$up move up
bindsym $Mod+Shift+$right move right

# alternatively, you can use the cursor keys:
bindsym $Mod+Shift+Left move left
bindsym $Mod+Shift+Down move down
bindsym $Mod+Shift+Up move up
bindsym $Mod+Shift+Right move right

# split in horizontal orientation
bindsym $Mod+h split h

# split in vertical orientation
bindsym $Mod+v split v

# enter fullscreen mode for the focused container
bindsym $Mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $Mod+s layout stacking
bindsym $Mod+w layout tabbed
bindsym $Mod+e layout toggle split

# toggle tiling / floating
bindsym $Mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $Mod+space focus mode_toggle

# focus the parent container
bindsym $Mod+a focus parent

# focus the child container
#bindsym $Mod+d focus child

# move the currently focused window to the scratchpad
bindsym $Mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $Mod+minus scratchpad show

# switch to workspace
bindsym $Mod+1 workspace 1
bindsym $Mod+2 workspace 2
bindsym $Mod+3 workspace 3
bindsym $Mod+4 workspace 4
bindsym $Mod+5 workspace 5
bindsym $Mod+6 workspace 6
bindsym $Mod+7 workspace 7
bindsym $Mod+8 workspace 8
bindsym $Mod+9 workspace 9
bindsym $Mod+0 workspace 10

# move focused container to workspace
bindsym $Mod+Shift+1 move container to workspace 1
bindsym $Mod+Shift+2 move container to workspace 2
bindsym $Mod+Shift+3 move container to workspace 3
bindsym $Mod+Shift+4 move container to workspace 4
bindsym $Mod+Shift+5 move container to workspace 5
bindsym $Mod+Shift+6 move container to workspace 6
bindsym $Mod+Shift+7 move container to workspace 7
bindsym $Mod+Shift+8 move container to workspace 8
bindsym $Mod+Shift+9 move container to workspace 9
bindsym $Mod+Shift+0 move container to workspace 10

# reload the configuration file
bindsym $Mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $Mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $Mod+Shift+e exec "i3-nagbar -t warning -m ‘You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.‘ -b ‘Yes, exit i3‘ ‘i3-msg exit‘"

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym $left       resize shrink width 10 px or 10 ppt
        bindsym $down       resize grow height 10 px or 10 ppt
        bindsym $up         resize shrink height 10 px or 10 ppt
        bindsym $right      resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left        resize shrink width 10 px or 10 ppt
        bindsym Down        resize grow height 10 px or 10 ppt
        bindsym Up          resize shrink height 10 px or 10 ppt
        bindsym Right       resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $Mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3status
}

#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard

vim ~/.bashrc

# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can‘t tolerate any output.  So make sure this doesn‘t display
# anything or bad things will happen !

# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it‘s important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
    # Shell is non-interactive.  Be done now!
    return
fi

# Put your fun stuff here.

export PATH="/home/ptz/bin:/home/ptz/opt/gcc-arm-none-eabi/bin:${PATH}"
#export PATH="/home/ptz/bin:${PATH}"

export jlink_path="/home/ptz/opt/JLink_Linux"

export LANG="en_US.UTF-8"
#export LANG="zh_CN.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"

alias rm=‘rm -i‘
alias cp=‘cp -i‘

HISTFILESIZE=2000
HISTSIZE=2000
HISTTIMEFORMAT=‘%F %T ‘
export HISTTIMEFORMAT

# Users that want bash completion with sudo need to run this once.
complete -cf sudo

exec zsh

vim ~/.zshrc

#!/bin/zsh

# https://wiki.gentoo.org/wiki/Zsh/Guide

# Completion
autoload -U compinit
compinit

# improve default completion
zstyle ‘:completion:*:descriptions‘ format ‘%U%B%d%b%u‘
zstyle ‘:completion:*:warnings‘ format ‘%BSorry, no matches for: %d%b‘

# Correction
setopt correctall

# Prompt
autoload -U promptinit
promptinit
prompt gentoo

#export PS1="[%* - %D] %[email protected]%[email protected]%l %d %% "

# History
# include command history support
export HISTSIZE=2000
export HISTFILE="$HOME/.history"
# History won‘t be saved without the following command:
export SAVEHIST=$HISTSIZE
# To prevent history from recording duplicated entries
setopt hist_ignore_all_dups
# A useful trick to prevent particular entries from being recorded into a history by preceding them with at least one space.
setopt hist_ignore_space
# The autocd option can be set to avoid tedious typing of cd command while changing current directory (for example /etc instead of cd /etc).
setopt autocd
# If standard bash-like globbing does not satisfy, extendedglob option may be set to enable extended globbing (one similar to regular expressions).
setopt extendedglob

# https://wiki.gentoo.org/wiki/Zsh

# Enabling Portage completions and Gentoo prompt for zsh
zstyle ‘:completion::complete:*‘ use-cache 1

autoload -U colors && colors

alias rm=‘rm -i‘
alias cp=‘cp -i‘

# https://www.cnblogs.com/bamanzi/p/colorful-shell.html
alias ls=‘ls --color=auto‘
alias grep=‘grep --color=auto‘

# sudo complete
zstyle ‘:completion:*:sudo:*‘ environ PATH="$SUDO_PATH:$PATH"

原文地址:https://www.cnblogs.com/ramlife/p/10046842.html

时间: 2024-11-09 00:13:04

gentoo intel 安装桌面的相关文章

Gentoo Linux安装详解--根据官方WiKi整理

1. 前期准备 远程登录: 开启ssh服务: /etc/init.d/sshd start 设置密码: passwd 以便使用putty.ssh client远程登录上传stage等(有时在线下载很慢,而局域网上传很快) 准备磁盘: 分区: fdisk /dev/sda /dev/sda1 : /boot 100M(32-100M) 设启动笔记-a/dev/sda2 : / 20G/dev/sda3 : /home 20G/dev/sda5 : /swap 1G (内存< 512 MB,分区分配

Gentoo Linux安装详解

1. 前期准备 远程登录: 开启ssh服务: /etc/init.d/sshd start 设置密码: passwd 以便使用putty.ssh client远程登录上传stage等(有时在线下载很慢,而局域网上传很快) 准备磁盘: 分区: fdisk /dev/sda /dev/sda1 : /boot 100M(32-100M) 设启动笔记-a/dev/sda2 : / 20G/dev/sda3 : /home 20G/dev/sda5 : /swap 1G (内存< 512 MB,分区分配

Linux6.5安装桌面环境

Linux6.5安装桌面环境 1.查看当前Linux运行级别 命令:runlevel 2.查看yum软件组件 命令:yum grouplist | more 3.安装桌面环境组件 命令:yum groupinstall -y   "Desktop"   "Desktop Platform"   "Desktop Platform Development" "Fonts" "General Purpose Deskto

Ubuntu 12.04 Server LTS下安装桌面及vncserver

亲测通过 1. 安装相关的包: apt-getupdate apt-get install ubuntu-desktop apt-getinstall vnc4server apt-get install x-window-system-core apt-get install gdm apt-get install gnome-panel 2. 设置vncserver Vncpasswd 以root身份chmod +x/etc/X11/xinit/xinitrc Vi /root/.vnc/x

linux安装桌面软件

CentOS 作为服务器的操作系统是很常见的,但是因为需要稳定而没有很时髦的更新,所以很少做为桌面环境.在服务器上通常不需要安装桌面环境,最小化地安装 CentOS(也就是 minimal CentOS) 就可以了.不过在最小化安装的 CentOS 中通过 YUM 来安装桌面环境也是非常方便的. 单位的那台服务器上就让我安装了最小化的 CentOS 操作系统.但是同事说操作不方便,所以我就试了试,顺便记录这个安装方法.使用 yum groupinstall 指令很容易就能安装上图形界面的桌面系统

在 Cent OS 6.5 中安装桌面环境

在 Cent OS 6.5 中,安装桌面环境,需要安装以下组 yum groupinstall -y   "Desktop"   "Desktop Platform"   "Desktop Platform Development" "Fonts" "General Purpose Desktop" "Graphical Administration Tools" "Graph

centos 6.5 安装桌面环境

1.yum –y groupinstall "X Window System" 可以先查看是否安装了:yum grouplist | more,分页查看已安装和有效的软件组 2.安装x window 后,再安装桌面套件,"Desktop"或"KED Desktop Environment" 两个任选其一,我认为"Desktop"更接近linux的习惯,我安装了kde后感觉不习惯就卸载了,看个人习惯. 也可以两个 都安装,切换也

CenOS 6X安装桌面环境

1.查看所有包 yum grouplist 因为我在装系统的时候是选的中文,所以看到的是中文件的字体 yum groupinstall -y "X 窗口系统" "桌面" "桌面平台" "通用桌面" 前面三个是必须安装的,通用桌面与KDE 桌面是可选的,通用桌面就是通常的Gnome桌面,两种看个人习惯安装一种即可 安装完成后执行 startx        ---进入桌面环境 如果想开机就自动进入桌面环境,修改下面的配置文件 v

linux Centos 6.5 安装桌面环境GNOME

一.首先查看系统的运行级别以及是否安装了桌面环境 1.使用命令 runlevel 查看当前的运行级别 ,如图所示 2.使用命令 yum grouplist | more 查看是否安装了桌面环境的组件,如图所示 二.再次从上面分析的结果看到,当前运行级别是3,而且也没有安装桌面环境的软件. 然后我们使用命令查看一下桌面有哪些桌面环境的软件,然后装显示出来的软件组件就可以了.例如: [[email protected] ~]#[[email protected] ~]# yum grouplist