CODESHIF - 2019年8月 http://codeshif.com/2019/08/ zh-CN 最有灵魂的开发者 Sat, 24 Aug 2019 04:28:00 +0800 Sat, 24 Aug 2019 04:28:00 +0800 让aurman和makepkg在root下载运行 http://codeshif.com/archives/38.html http://codeshif.com/archives/38.html Sat, 24 Aug 2019 04:28:00 +0800 admin 1.先修改makepkg

直接贴办法 原文

vim /usr/bin/makepkg

加入asroot

OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg'
          'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild'
          'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'pkg:' 'repackage'
          'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps'
          'verifysource' 'version' 'asroot')

再修改EUID:

if (( ! INFAKEROOT )); then
    if (( EUID == 0 )); then
        error "$(gettext "Running %s as root is not allowed as it can cause permanent,\n\catastrophic damage to your system.")" "makepkg"
        #exit 1 # $E_USER_ABORT
 
    fi
fi

2.修改aurman

先搜索一下错误提示的文件再哪

grep -r "Do not run aurman" /usr

再修改源文件

vim /usr/lib/python3.7/site-packages/aurman/main.py

注释os.getuid下面的再加个pass

ef check_privileges() -> None:
    """
    checks the privileges and exists in case of aurman being executed with sudo
    """
    if os.getuid() == 0:
        pass
        #aurman_error("Do not run aurman with sudo")
        #sys.exit(1)

OK

]]>
0 http://codeshif.com/archives/38.html#comments http://codeshif.com/feed/2019/08/
ArchLinux GF119 GT620显卡驱动 http://codeshif.com/archives/34.html http://codeshif.com/archives/34.html Fri, 23 Aug 2019 01:53:00 +0800 admin 本来默认是有显卡驱动的【nouveau】,感觉不太好用的话就换官方的闭源网卡驱动,
通过这个列表查询型号在里面,

2019-08-23-015450_401x96_scrot.png

显示【The 390.xx driver supports the following set of GPUs.】

然后在搜索一下发现有:

pacman -Ss nvidia-390

结果

extra/nvidia-390xx 390.116-45 [已安装]
    NVIDIA drivers for linux, 390xx legacy branch
extra/nvidia-390xx-dkms 390.116-45
    NVIDIA driver sources for linux, 390xx legacy
    branch
extra/nvidia-390xx-lts 1:390.116-14
    NVIDIA drivers for linux-lts, 390xx legacy branch
extra/nvidia-390xx-settings 390.116-1
    Tool for configuring the NVIDIA graphics driver,
    390xx legacy branch
extra/nvidia-390xx-utils 390.116-1 [已安装]
    NVIDIA drivers utilities
extra/opencl-nvidia-390xx 390.116-1
    OpenCL implemention for NVIDIA

直接安装!

pacman -S nvidia-390xx
nvidia-xconfig

重启

pkill xinit
xinit

或者

reboot

OK

Wiki帮助文档

]]>
0 http://codeshif.com/archives/34.html#comments http://codeshif.com/feed/2019/08/
ArchLinux USB无线网卡8192CU上网 http://codeshif.com/archives/32.html http://codeshif.com/archives/32.html Fri, 23 Aug 2019 01:38:00 +0800 admin wpa_supplicant制作,详情可以参考ArchLinux Wiki传送

这里说一下简略步骤,首先弄一个文件:

vim /etc/wpa_supplicant/wpa_supplicant.conf

写入:

ctrl_interface=/run/wpa_supplicant
update_config=1

然后开刚,先弄个服务

wpa_supplicant -B -i interface -c /etc/wpa_supplicant/wpa_supplicant.conf

-B是后台运行,-i是指定你的网卡名称,可以用ip link查看,-c是上面wpa配置文件的地址。

完事之后啊,用wpa_cli开始连接:

wpa_cli
scan
scan_result
add_network
set_network 0 ssid "你要连接的无线名称(英文)"
set_network 0 psk "无线密码"
enable_network 0
save_config

保存配置到哪了?到刚才你创建的文件里面了:/etc/wpa_supplicant/wpa_supplicant.conf
然后启动服务:

dhcpcd 你的网卡名

这里注意点啊,如果你在装系统呢,可以在netctl下手,netctl咋弄?

cd /etc/netctl/examples
cp /etc/netctl/examples/wireless-wpa-config ../
vim wireless-wpa-config

将里面的interface的值改成你的网卡名称,然后

netctl enable wireless-wpa-config(配置文件名称)

然后就OK了,和dhcpcd性质差不多,详情看文档。

ArchLinux Wiki网络设置

]]>
0 http://codeshif.com/archives/32.html#comments http://codeshif.com/feed/2019/08/
ArchLinux安裝sogou输入法 http://codeshif.com/archives/31.html http://codeshif.com/archives/31.html Fri, 23 Aug 2019 01:10:00 +0800 admin 折腾1

现在的AUR上面安装不了sogou输入法不知道为什么,我看帖子这么说:
简书传送门
2019-08-23-010614_650x383_scrot.png

我曹啥玩意啊,行吧,爬了个百度帖子解决了:

贴吧传送门
说有个办法是这样的:

sogoupinyin 更到 2.3.0.0109,加了五笔,依赖qt5,不需要qt4了。但是新版目前没有deb包,不过可以从优麒麟镜像里面提取。
下载 ubuntukylin-19.04-enhanced-amd64.iso(为了一个输入法,下了一个镜像,也是蛮拼的),解压 filesystem.squashfs,打包 /var/lib/dpkg/info/sogoupinyin.list 里的文件(去掉目录)
改一下 aur上的 PKGBUILD,打包安装,测试可用

我没试,看了后面的办法,

2019-08-23-010945_546x184_scrot.png

这个就行了

完整步骤:

sudo pacman -S fcitx-lilydjwg-git fcitx-sogoupinyin

如果是i3-gaps或i3-wm,别忘了加在~/.config/i3/config中:

# fcitx
exec --no-startup-id fcitx

折腾2(继续折腾)

我又去试了试直接安装老版本的东西,
先去aur上面看评论了:

2019-08-24-041435_646x70_scrot.png

那就行了啊,直接开刚,他说加入他的repo,我们就跟着去呗!
AUR搜狗输入法信息他的repo他的博客说明

2019-08-24-041750_593x196_scrot.png

来吧,

vim /etc/pacman.conf

干进去这个:

[xuanrui]
Server = https://arch.xuanruiqi.com/repo/

然后导入这玩意:

pacman-key --recv-keys 6E06FBC8
pacman-key --lsign-key 6E06FBC8

安装,OK

pacman -S fcitx fcitx-im fcitx-sogoupinyin
]]>
0 http://codeshif.com/archives/31.html#comments http://codeshif.com/feed/2019/08/