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" ]; thenTRANSPARENCY_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 OptionParseris_replace = False
file_encoding = ""
file_password = ""
extract_path = ""
is_quite = Falseclass PasswordError(Exception):passdef 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 bydef P(s):if is_quite:returnprint(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]))returnif os.path.exists(extract_path) and os.path.isfile(extract_path):P('Error ** : path "{0}" is a file.'.format(extract_path))returnif 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 ExceptionP('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.')continueP(' Extracting\t' + utf8name)pathname = os.path.dirname(utf8name)if pathname != '' and not os.path.exists(extract_path + pathname):os.makedirs(extract_path + pathname)continuetry:data = open_file.read(name)except Exception:P('*** Wrong password ***')raise PasswordErrorif 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))continueP(' Skipped\t' + utf8name)open_file.close()P('Done')def main():global is_replaceglobal file_encoding global file_passwordglobal extract_pathglobal is_quiteusage = '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_replacefile_encoding = options.encodingfile_password = options.passwordextract_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 PasswordErrorexcept Exception:passtry:main()
except PasswordError:sys.exit(2)
except Exception:sys.exit(1)sys.exit(0)
想用右键?新建一个文件放到~/.local/share/nautilus/scripts/
文件夹里,内容如下
#!/bin/bash
(
for File in "$@"; doif [ -d "$File" ]; thenzenity --error --title="Error" --text="'$File' is not a file."continueelseecho "# Extracting '$File'"izip -r -e gbk -q $Filert=$?if [ $rt -eq 1 ]; thenzenity --error --title="Error" --text="'$File' failed to extract."continueelif [ $rt -eq 2 ]; thenwhile true; dopsw=$(zenity --entry --title="Enter password for '$File'" --text "" --hide-text)if [ $? -ne 0 ]; thenbreakfiizip -r -e gbk -q -p $psw $Filezipret=$?if [ $zipret -eq 0 ]; thenecho "# Right password! "breakelif [ $zipret -eq 1 ]; thenzenity --error --title="Error" --text="'$File' failed to extract."breakelif [ $zipret -eq 2 ]; thenecho "# Wrong password! "fidonefifi
done
)|
zenity \--progress \--title="Extract files in GBK" \--text="Extracting..." \--percentage=0 \--auto-close \--pulsate
if [ "$?" = -1 ]; thenzenity --error \--text="Failed."
fi
vim 配置
安装Vundle
配置文件
" autocomplete
set nocompatible
filetype offset rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()Plugin 'VundleVim/Vundle.vim'Bundle 'Valloric/YouCompleteMe'call vundle#end()
filetype plugin indent onlet 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|endifnmap <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 " 考场就用 koehlermap <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)'
endfunctionset foldmethod=syntax
set foldtext=CFoldText()
set fillchars-=fold:-
set foldlevel=99
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zC' : 'zO') <CR>
然后看这里配置高亮.
如果上面运行出错(反正我是崩了),用这个方法:
重启X
按alt+F2
,输入r
重启桌面环境
转载于:https://www.cnblogs.com/iwtwiioi/p/4798643.html
Fedora 23 配置相关推荐
- Fedora下配置网卡
第一次在fedora下配置静态网卡,首先去网络管理里面添加并设置网卡的IP,子网掩码和默认网关出口,然后保存即可, 也可以在 /etc/sysconfig/network-scripts/ifcfg- ...
- Fedora 19配置KVM虚拟机的桥接网络
Fedora 19配置KVM虚拟机的桥接网络 本文讲述如何在Fedora 19下配置桥接网络,使得局域网中的其它机器能够访问KVM中的虚拟机.注:Fedora 19是宿主机器的操作系统 下面开始! 简 ...
- Fedora 23如何安装LAMP服务器
LAMP 是开源系统上 Web 服务器的梦幻组合.LAMP 是 Linux. Apache HTTP 服务. MySQL/MariaDB 数据库和 PHP. Perl 或 Python 的简称. 下面 ...
- Fedora 23 U盘启动出现“Failed to load ldlinux.c32”解决
利用UltraISO制作了Fedora 23的U盘启动,开机F12键USB启动时出现 Failed to load ldlinux.c32 Boot failed: please change dis ...
- pdo mysql fedora_在Fedora 23 Server和Workstation上安装LAMP(Linux, Apache, MariaDB和PHP)
在安装LAMP之前,建议先更新系统包 $ sudo dnf update 第一步:安装Apache Web服务器 1.在Fedora 23安装Apache,你可以运行下面的命令: $ sudo dnf ...
- Fedora上配置一个安全FTP
现在流行的FTP服务器,比较著名的有WU-FTP(Washington University FTP)和VSFTP(Very Secure FTP 非常安全的FTP)以及Proftp,pureftp等 ...
- PSP开发一 linux菜鸟fedora下配置psp开发环境
虽然从我去年拿到psp的时候就很想自己能写一个能在psp上运行的什么,之前也在windows上尝试过几次配置psp开发环境,但是都没有成功.十一放假,看了下运势,说这个星期适合学习第二专长,想想自己很 ...
- 在Fedora 23上安装多媒体解码器
在Fedora 23上安装多媒体解码器 时间:2016-06-25 来源:topspeedsnail.com 作者:斗大的熊猫 安装多媒体解码器允许你播放更多格式的音频和视频格式.大多数这些解码器都 ...
- Fedora 19配置心得
安装Fedora 19之后的一些配置 1.编辑sudoers文件,先备份/etc/sudoers,之后使用su - root切换到root下,在sudoers中,找到root ALL=(ALL) ...
最新文章
- exchange无法收发邮件_Python使用POP3和SMTP协议收发邮件!
- SAP Spartacus里的标准Banner设计
- python做硬件自动化测试仪器_基于Python PyVisa和GPIB的硬件测试仪器控制方法
- 【链接保存】十分钟上手sklearn:特征提取,常用模型,交叉验证
- h5引入json_Vue中如何使用本地Json文件?
- Online Coding开发模式 (通过在线配置实现一个表模型的增删改查功能,无需写任何代码)
- SIFT算法问题issue1
- mysql etc my.cnf_mysql配置文件/etc/my.cnf
- 小程序微信登陆及账号绑定功能开发笔记
- bSRVCC振铃前SRVCC信令流程
- RPL(4):RFC6550翻译(4)---RPL的通信流支持RPL实例
- Android 开发挑战赛 | 第 2 周: 倒计时器
- Qt的QVector类
- 数据结构之单链表 python实现
- 13-ZF标志位,JB和JNB跳转指令
- 尘埃粒子计数器帮助实时监测半导体车间空气中的粒子数
- unity3d坑收集
- 只有极少数人能通过的「超级多任务」测试(文末附测试地址) 1
- 个人对银行知识的几点认识和理解
- 3、ClickHouse表引擎-MergeTree引擎
热门文章
- linux字体颜色设置
- [转]Massively Multiplayer Middleware
- 刺激战场服务器无响应进不去游戏,刺激战场游戏进不去怎么办 进不去解决方法...
- 雅虎军规前端35条优化(css部分 js部分 图片 cookie 移动端 服务器)
- 购买阿里云服务器,先试试主机免费试用能抢到不 ...
- 从技术角度分析,一个女生不主动联系你还有机会吗?
- C语言程序设计-现代方法 第二版 2.1小节 显示双关语
- 非全日制研究生含金量低?全面解读来了!
- 【校园商铺 4章】:店铺注册--Service层的实现(后期还要改造,先前没实现)
- 给海归技术创业兄弟的九个忠告(转载)