Fedora 23 配置
Linux下安装Fedora
刻到u盘上
下好iso后准备刻录到u盘...可是查了一下只能在用一个叫dd的东西刻= =于是学了下...然而就是一句话:
dd if=/path/xxx.iso of=/dev/sdx
其中前面是文件,后面是盘,注意是整个盘sdx而不是什么sdx1啥的,注意这样做会格式化整个盘...请不要乱实验...。
(听说dd是自动识别然后自动刻录的真是厉害啊...
在bios设置u盘优先启动然后安装即可
/home
vi /etc/fstab
/dev/sda5 /home ext4 defaults 0 2
折腾
显卡驱动 & 不能关机、重启、注销、待机等解决方法
原因在于linux自带的nouveau驱动对N卡支持不是很好(至少对于我的765m是不好的..),所以禁止nouveau驱动和使用去掉nouveau模块的内核镜像后就能重起能关机啦!所以我们blacklist了nouveau。
sudo gedit /etc/modprobe.d/blacklist.conf
加上
blacklist nouveau
options nouveau modeset=0
然后重启。
https://fedoraproject.org/wiki/Bumblebee
可是这样就不能用独显了,所以我们还要装一个bumblebee来切换独显。(内核版本4.0.6-300.fc22.x86_64,bumblebee-nvidia版本:bumblebee-nvidia-352.21-1.fc22.x86_64测试成功)
sudo dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora23/noarch/bumblebee-release-1.2-1.noarch.rpm
sudo dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora23/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm
sudo dnf install bumblebee-nvidia bbswitch-dkms primus kernel-devel
修改grub
缩短等待时间
编辑文件
sudo gedit /boot/grub2/grub.cfg
然后搜索timeout
,后面数字修改为1
再继续编辑
sudo gedit /etc/default/grub
改成GRUB_TIMEOUT=1
调节亮度 & 关掉蓝牙
(可能要先安装rfkill才能关掉蓝牙
sudo gedit /etc/rc.local
然后在exit(0)
前面加上
rfkill block bluetooth
echo 1580 > /sys/class/backlight/intel_backlight/brightness
dnf配置
sudo vim /etc/dnf/dnf.conf
加上fastestmirror=true
和keepcache=true
,分别表示选择最快镜像和保留缓存
更换源
cd /etc/yum.repos.d
然后选择其中一个国内源:
sudo wget http://mirrors.163.com/.help/fedora-163.repo
sudo wget http://mirrors.163.com/.help/fedora-updates-163.repo
sudo wget http://mirrors.sohu.com/help/fedora-sohu.repo
sudo wget http://mirrors.sohu.com/help/fedora-updates-sohu.repo
sudo wget http://mirror.bjtu.edu.cn/fedora-bjtu.repo
sudo wget http://mirror.bjtu.edu.cn/fedora-updates-bjtu.repo
加一个软件源,中文软件很实用的
sudo wget http://repo.fdzh.org/FZUG/FZUG.repo -P /etc/yum.repos.d/
加google-chrome的源:
sudo wget http://repo.fdzh.org/chrome/google-chrome-mirrors.repo -P /etc/yum.repos.d/
加rpmfusion的源:
sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
使用socks5代理
sudo http_proxy=socks5h://127.0.0.1:10808 dnf
主题
numix主题和图标
sudo dnf copr enable satya164/numix
sudo dnf install numix-gtk-theme
然后是图标:
git clone https://github.com/numixproject/numix-icon-theme-circle
将两个文件夹复制到/usr/share/icons/
目录下
打开tweak启用主题和图标即可
evopop主题
sudo dnf copr enable heikoada/gtk-themes
sudo dnf install evopop-gtk-theme-common.noarch evopop-gtk-theme-gtk3 evopop-gtk-theme-metacity evopop-gtk-theme-gtk2
arc主题
http://files.cnblogs.com/files/iwtwiioi/Arc-OSX-gnome3.18-1.5.tar.gz
软件
dnf install 清单
gnome-tweak-tool # tweak工具
kwplayer # 酷我
smplayer # 视频播放器
cherrytree # 必备树型笔记本
audacious # 音乐播放器
nautilus-open-terminal # 右键终端
vim # 没话说= =
texmaker # latex
texlive-* # latex
remarkable # markdown
gcc-c++ # = =
goldendict # 字典
unrar # rar
tsocks # socks5
fedy
http://folkswithhats.org/
迅雷(xware)
sudo dnf install xware-desktop
然后设置一下路径(不要登陆),详细看https://github.com/Xinkai/XwareDesktop/wiki/使用说明
然后我们可以用这个命令运行登陆下载拉~!
/usr/share/xware-desktop/xwared & xware-desktop
要是想方便的话做一个desktop咯
QQ7.5(最新版)
参考:http://kikyoulinux.info/wine-qq-6-7-and-7-x-refusing-to-annoying-fixme-output/
sudo dnf install wine
wget http://winetricks.org/winetricks
sudo mv winetricks /usr/bin/winetricks
sudo chmod +x /usr/bin/winetricks
winetricks riched20 gdiplus
至于某些地方中文显示为框框,把/usr/share/wine/fonts
中的两个Tahoma字体删掉或者移动到别处,再在注册表中找到[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
,里面建立Tahoma的替换项目,比如新建字符串Tahoma
,值为WenQuanYi Micro Hei
,就是说用某字体替换Tahoma,如果Wine没有simsun字体,Replacements里面也没有,就用同样的方法创建SimSun的替换项目(最好从windows种copy一个SimSun字体过来,否则有各种字体问题)。
然后运行qq7.5的安装包(可以在 点击打开 这里下载),按步骤安装即可。
无法登录的话,打开wine taskmgr,把txplatform进程给kill掉就行了。要一劳永逸的话,在Winecfg的函数库中添加txplatform.exe,并设置为“停用”就行了。
然后就大功告成拉~
VirtualBox
cd /etc/yum.repos.d/
sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
sudo dnf update
sudo dnf install gcc kernel-devel
sudo dnf install VirtualBox-4.3
sudo service vboxdrv setup
sudo usermod -a -G vboxusers $USER
深度截图
https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo/fedora-21-x86_64/
没办法fc22的版本没有= =因此强行安装了fc21的...没想到能用..
进入上面网址后依次下载并安装
deepin-gsettings, deepin-utils, deepin-ui, deepin-screenshot
wps
这个要去官网下载,而且下载完后将网络关掉,打开wps,将在线模板通通关掉。然后下载字体文件:http://files.cnblogs.com/files/iwtwiioi/symbol-fonts.zip,放到/usr/share/fonts
中即可。
acejudge(laekov写的评测机orz)
https://github.com/laekov/acejudge
gnome插件
https://extensions.gnome.org/extension/945/cpu-power-manager/
https://extensions.gnome.org/extension/358/activities-configurator/
终端启动的用户 @ 主机名消失的解决方法
编辑~/.bashrc
,加上:
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
sudo补全问题
sudo dnf install bash-completion
一些字体问题
只要安装一些windows字体就行拉,某度字体就不会调用那啥arial字体了..
一个简单的办法就是:
wget http://www.my-guides.net/en/images/stories/fedora12/msttcore-fonts-2.0-3.noarch.rpm
sudo dnf install ./msttcore-fonts-2.0-3.noarch.rpm
mkfontscale
mkfontdir
fc-cache -fv
更改fonts.conf
,默认的字体非常鬼畜,所以我们改一下,另存为.fonts.conf
放到~
目录下:
<!--?xml version="1.0"?>-->
<!--DOCTYPE fontconfig SYSTEM "fonts.dtd">-->
<!-- ~/.fonts.conf for per-user font configuration -->
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>SimHei</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>YaHei Consolas Hybrid</family>
</prefer>
</alias>
</fontconfig>
GoldenDict用mplayer播放卡顿问题
在设置里将Use external program
设置为aplay
即可。
chrome的一些卡顿问题(cpu100%)
一些书签、标签页、菜单卡顿问题原因在于字体,详见:http://suselinks.us/how-to-fix-slow-typing-in-chrome-addressbar-in-linux/]
解决方法就是换字体,经测试换成Source Han Sans CN Regular
是可以解决的。
同时在chrome的启动器添加--enable-harfbuzz-rendertext
参数即可解决。
gnome-terminal不能透明的问题
自己发现一个临时的办法:
在.bashrc
里加上
if [ -n "$WINDOWID" ]; then
TRANSPARENCY_HEX=$(printf 0x%x $((0xffffffff * 98 / 100)))
xprop -id "$WINDOWID" -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY "$TRANSPARENCY_HEX"
fi
gedit GBK 乱码
打开dconf-editor(如果没用,sudo dnf install dconf-tools),找到org/gnome/gedit/preferences/encodings
,在auto-detected
中加入GBK
。
unzip 解压乱码
似乎要重新编译?不过另有方法。我们写一个python脚本来实现解压就行了。
#!/usr/bin/python3
'''
Author:iwtwiioi
E-mail:iwtwiioi@gmail.com
version = 1.0
'''
IZIP_VERSION = 'izip 1.0'
import os, sys
import zipfile
import chardet
from optparse import OptionParser
is_replace = False
file_encoding = ""
file_password = ""
extract_path = ""
is_quite = False
class PasswordError(Exception):
pass
def getBytesEncoding(s):
return chardet.detect(s)['encoding']
def bytes2str(s):
encoding = getBytesEncoding(s)
if file_encoding:
return s.decode(file_encoding)
return s.decode(encoding)
def getZipfileBytes(s):
try:
by = s.encode('cp437')
except:
by = s.encode()
return by
def P(s):
if is_quite:
return
print(s)
def extract(file_name):
if not os.path.exists(file_name) or not zipfile.is_zipfile(file_name):
P('File "{0}" is not a zip file!'.format(sys.argv[i]))
return
if os.path.exists(extract_path) and os.path.isfile(extract_path):
P('Error ** : path "{0}" is a file.'.format(extract_path))
return
if not os.path.exists(extract_path):
os.makedirs(extract_path)
try:
open_file = zipfile.ZipFile(file_name, 'r');
open_file.setpassword(file_password.encode())
except Exception:
P('File "{0}" can not open!'.format(file_name))
raise Exception
P('Processing\t{0}'.format(file_name))
for name in open_file.namelist():
try:
utf8name = bytes2str(getZipfileBytes(name))
except Exception as e:
P(' Failed\tEncoding can not be identified.')
continue
P(' Extracting\t' + utf8name)
pathname = os.path.dirname(utf8name)
if pathname != '' and not os.path.exists(extract_path + pathname):
os.makedirs(extract_path + pathname)
continue
try:
data = open_file.read(name)
except Exception:
P('*** Wrong password ***')
raise PasswordError
if not os.path.exists(extract_path + utf8name) or os.path.isfile(extract_path + utf8name) and is_replace:
try:
fo = open(extract_path + utf8name, 'wb')
fo.write(data)
fo.close()
except Exception:
P(' Failed\tCan not write file "{0}".'.format(extract_path + utf8name))
continue
P(' Skipped\t' + utf8name)
open_file.close()
P('Done')
def main():
global is_replace
global file_encoding
global file_password
global extract_path
global is_quite
usage = 'usage: %prog [options] filename'
parser = OptionParser(usage=usage, version=IZIP_VERSION)
parser.add_option('-r', '--replace', dest='is_replace',
action='store_true', default=False,
help='if file already exisited, replace it')
parser.add_option('-e', '--encoding', dest='encoding',
action='store', metavar='ENCODING',
help='specify the encoding of the file')
parser.add_option('-p', '--password', dest='password',
action='store', default='',
help='password of the file')
parser.add_option('-d', '--dir', dest='path',
action='store', default='.',
help='the path of extracting')
parser.add_option('-q', '--quite', dest='is_quite',
action='store_true', default=False,
help='process quitely')
(options, args) = parser.parse_args()
is_replace = options.is_replace
file_encoding = options.encoding
file_password = options.password
extract_path = options.path + '/'
is_quite = options.is_quite
'''
P('is_replace\t: {0}'.format(is_replace))
P('file_encoding\t: {0}'.format(file_encoding))
P('file_password\t: {0}'.format(file_password))
P('extract_path\t: {0}'.format(extract_path))
'''
for name in args:
try:
extract(name)
except PasswordError:
raise PasswordError
except Exception:
pass
try:
main()
except PasswordError:
sys.exit(2)
except Exception:
sys.exit(1)
sys.exit(0)
想用右键?新建一个文件放到~/.local/share/nautilus/scripts/
文件夹里,内容如下
#!/bin/bash
(
for File in "$@"; do
if [ -d "$File" ]; then
zenity --error --title="Error" --text="'$File' is not a file."
continue
else
echo "# Extracting '$File'"
izip -r -e gbk -q $File
rt=$?
if [ $rt -eq 1 ]; then
zenity --error --title="Error" --text="'$File' failed to extract."
continue
elif [ $rt -eq 2 ]; then
while true; do
psw=$(zenity --entry --title="Enter password for '$File'" --text "" --hide-text)
if [ $? -ne 0 ]; then
break
fi
izip -r -e gbk -q -p $psw $File
zipret=$?
if [ $zipret -eq 0 ]; then
echo "# Right password! "
break
elif [ $zipret -eq 1 ]; then
zenity --error --title="Error" --text="'$File' failed to extract."
break
elif [ $zipret -eq 2 ]; then
echo "# Wrong password! "
fi
done
fi
fi
done
)|
zenity \
--progress \
--title="Extract files in GBK" \
--text="Extracting..." \
--percentage=0 \
--auto-close \
--pulsate
if [ "$?" = -1 ]; then
zenity --error \
--text="Failed."
fi
vim 配置
安装Vundle
配置文件
" autocomplete
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Bundle 'Valloric/YouCompleteMe'
call vundle#end()
filetype plugin indent on
let g:ycm_error_symbol = 'ER'
let g:ycm_warning_symbol = 'WA'
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
nmap <C-F11> :YcmDiags<CR>
" competition
set nu ru mouse=a sw=4 ts=4 sts=4 nobk autoindent incsearch hlsearch t_Co=256
set cindent
syntax on
" colorscheme koehler
colorscheme molokai " 考场就用 koehler
map <F2> : w <CR>
map <F3> : !./%< <CR>
map <F4> : !./%< < ./in > ./out <CR>
map <F5> : !g++ % -o %< -Wall -lm <CR>
map <C-F5> : !g++ % -o %< -O2 -Wall -lm <CR>
map <F6> : !g++ % -o %< -g -Wall -lm <CR>
map <C-F6> : !python3 % <CR>
map <F7> : !gdb %< <CR>
map <C-F9> : vs ./in <CR>
map <C-F10> : vs ./out <CR>
map <C-F7> : !astyle --style=java -p -H < % > hh.cpp <CR>
" Fold
function! CFoldText()
let sub = substitute(getline(v:foldstart), '\s*\(.*\){.*', '\1', 'g')
return sub . ' (' . (v:foldend - v:foldstart + 1) . ' lines)'
endfunction
set foldmethod=syntax
set foldtext=CFoldText()
set fillchars-=fold:-
set foldlevel=99
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zC' : 'zO') <CR>
然后看这里配置高亮.
如果上面运行出错(反正我是崩了),用这个方法:
重启X
按alt+F2
,输入r
重启桌面环境
Fedora 23 配置的更多相关文章
- fedora 23中配置nfs-server
fedora 23中配置nfs-server */--> fedora 23中配置nfs-server Table of Contents 1. 产考资料 2. NFS配置文件 2.1. /et ...
- fedora 23中配置tftp-server
fedora 23中配置tftp-server */--> fedora 23中配置tftp-server Table of Contents 1. 简介 2. tftp安装 3. 启动和允许 ...
- Fedora 23安装 NS2 (network simulator 2)
1 实验环境 OS: Fedora 23 workstation 2 实验步骤 ( 参考了:http://www.isi.edu/nsnam/ns/ns-build.html) 本次实验的实验环境: ...
- 在树莓派2代B型/3代 上安装Fedora23 - Installing Fedora 23 on Raspberry Pi 2 model B or Raspberry Pi 3
本文主要用于记录安装过程,以便日后查阅回顾. 之前在自己的树莓派上运行的一直是通过NOOB安装的Raspbian,但是本人平时更喜欢用Fedora作为开发和使用环境,而且Raspbian上的软件包通常 ...
- 安装Linux系统Fedora 23
搭建了一个Linux(Fedora 23)环境,用于学习.实验. [TOC] 1 安装Fedora 以前一直只会光盘安装,刻录了好多个版本的distros,用完即弃在一旁.很浪费. 此次学会了在Lin ...
- Fedora 14配置vsftp服务步骤
Fedora 14配置vsftp服务步骤:1:检查Fedora14是否安装了vsftp服务 用rpm -qa|grep vsftp命令检查是否安装了vsftp服务,如果安装了,会显示安装好的版本 ...
- Fedora 23如何安装LAMP服务器
LAMP 是开源系统上 Web 服务器的梦幻组合.LAMP 是 Linux. Apache HTTP 服务. MySQL/MariaDB 数据库和 PHP. Perl 或 Python 的简称. 下面 ...
- Fedora上配置一个安全FTP
现在流行的FTP服务器,比较著名的有WU-FTP(Washington University FTP)和VSFTP(Very Secure FTP 非常安全的FTP)以及Proftp,pureftp等 ...
- 在Fedora 23 Server和Workstation上安装LAMP(Linux, Apache, MariaDB和PHP)
在安装LAMP之前,建议先更新系统包$ sudo dnf update 第一步:安装Apache Web服务器1.在Fedora 23安装Apache,你可以运行下面的命令:$ sudo dnf in ...
随机推荐
- 在多台服务器上简单实现Redis的数据主从复制(3)(转载)
转载地址:http://www.cnblogs.com/liping13599168/archive/2011/04/14/2016226.html Redis的主从复制功能非常强大,一个master ...
- Delphi基本数据类型---枚举、子界、集合、数组
参考:http://blog.csdn.net/qustdong/article/details/9230743 参考:http://www.cnblogs.com/xumenger/p/440222 ...
- 11g Physical Standby配置
一,准备 Database DB_UNIQUE_NAME Oracle Net Service Name Primary PROD PROD Physical standby PRODDG PRO ...
- php重修
阅读顺序: http://www.laruence.com/2008/08/11/147.html 深入浅出php http://www.laruence.com/2008/06/18/221.ht ...
- java compiler level does not match the version of the installed java project
修改:工程/.settings/”目录下找到名为 org.eclipse.wst.common.project.facet.core.xml
- phpcms_v9 多图字段 内容页,首页,分页自定义字段调用
phpcms_v9 多图字段 内容页,首页,分页自定义字段调用 说明:自定义多图字段名 shigongtu 1 内容页调用 {loop $shigongtu $r} <img src= ...
- ubuntu wubi非在线快速安装
最近ubuntu更新了,就想把它重新装回来试一下,但是由于种种原因划分磁盘不太方便,很自然就想到了wubi,这个不仅仅安全性高,而且比直接装系统快多了,而且方便.但是在线安装实在是太慢了,所以就找到了 ...
- UDP通讯程序设计
UDP通讯程序设计 一.函数化 1.1服务器使用的函数 创建socket----->socket 绑定地址-------->bind 接受数据-------->recvfrom 发送 ...
- 数字信号处理实验(五)——IIR滤波器的设计
一.使用自编函数设计IIR滤波器 1.冲激响应法 (1)注给出的数字滤波器指标先化成模拟指标 (2)设计出模拟滤波器: (3)使用冲激响应法转化成数字滤波器 (4)一个demo clear all; ...
- 关于C/C++中数组元素的初始化
1.一维数组初始化 对于一维数组,其初始化有一个错误的观点是:一直以为 int a[256]={0};是把a的所有元素初始化为0,int a[256]={1};是把a所有的元素初始化为1. 数组可 ...