随笔分类 -  Linux

摘要:可能是少了这个依赖 librime-lua sudo yum install librime-lua 阅读全文
posted @ 2024-11-11 00:20 皮豪 阅读(5) 评论(0) 推荐(0) 编辑
摘要:# Debian配置Fcitx5输入法 ```sh sudo apt install fcitx5 fcitx5-rime ``` 放到 `~/.profile` 的配置 ```sh export LC_CTYPE="zh_CN.UTF-8" export GTK_IM_MODULE=fcitx e 阅读全文
posted @ 2023-08-04 21:28 皮豪 阅读(359) 评论(0) 推荐(0) 编辑
摘要:基于tiny-httpd的一个http server,可处理 GET和POST请求。 知识范围: ## POSIX接口 **pipe(int arr[2])** pipe(int arr[2]); 使用pipe会创建通道,arr[0]为读,arr[1]为写。 **dup2 - 复制文件描述符** 这 阅读全文
posted @ 2023-07-11 22:33 皮豪 阅读(14) 评论(0) 推荐(0) 编辑
摘要:在操作文件的时候,或者处理 http 请求时,可能需要处理文件的类型 这里我的需求是获取文件后缀 使用的方法是 strrchr ``` /* char *strrchr(const char *s, int c); The strrchr() function returns a pointer t 阅读全文
posted @ 2023-07-10 08:51 皮豪 阅读(55) 评论(0) 推荐(0) 编辑
摘要:实际是要判断 numbytes 是否等于-1,而不是要判断结果赋给numbytes ``` if((numbytes = recv(sockfd, buf, sizeof buf,0)) == -1) if(numbytes = recv(sockfd, buf, sizeof buf,0) == 阅读全文
posted @ 2023-06-23 00:47 皮豪 阅读(7) 评论(0) 推荐(0) 编辑
摘要:``` #include #include #include #include // 使用inet_ntoa 需要 引包 #include int main(int argc,char *argv[]){ struct hostent *host; char hostname[]="www.kbug 阅读全文
posted @ 2023-06-20 22:53 皮豪 阅读(85) 评论(0) 推荐(0) 编辑
摘要:可能是你没有设置好连接 step.1 step.2 这里需要选择你电脑硬件的网卡,选其他的没用。 阅读全文
posted @ 2023-04-19 13:56 皮豪 阅读(85) 评论(0) 推荐(0) 编辑
摘要:记 su vi /etc/sudoers 默认权限是只读的 # 等下要改回去 chmod 777 /etc/sudoers 把root 那一行复制 保存后 # 等下要改回去 chmod 440 /etc/sudoers 阅读全文
posted @ 2023-04-19 13:53 皮豪 阅读(301) 评论(0) 推荐(0) 编辑
摘要:需求: 需要虚拟机能够访问公网 需要虚拟机能够被主机使用(使用基本的IP进行连接) 软件: VirtualBox 7.0 系统: Win7 ,Debian 11 前提: 创建Nat网络,创建Host-only网络 原理: 为每个虚拟机添加两个网卡 网卡1: 设置Nat网络 网卡2:设置Host-on 阅读全文
posted @ 2023-02-18 16:36 皮豪 阅读(296) 评论(0) 推荐(0) 编辑
摘要:vi /etc/apt/sources.list deb http://mirrors.ustc.edu.cn/debian/ bullseye main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian/ bullseye mai 阅读全文
posted @ 2022-06-12 11:28 皮豪 阅读(4206) 评论(0) 推荐(0) 编辑
摘要:https://www.wyr.me/post/623 https://www.leonlu.cc/hobby/note006-rtl8188gu-linux/ 亲测:debian11,manjaro xfce 22能装 manjaro需要把内核版本改成510 # 执行下面的命令 sudo mhwd 阅读全文
posted @ 2022-03-18 13:46 皮豪 阅读(2427) 评论(0) 推荐(0) 编辑
摘要:更换教程 https://blog.csdn.net/qq_39683682/article/details/113801632 安装后需要换个默认用户 https://blog.csdn.net/qq_39683682/article/details/113801428 阅读全文
posted @ 2022-03-11 10:15 皮豪 阅读(98) 评论(0) 推荐(0) 编辑
摘要:前言 我通过配置成fcitx进行服务进行,但其权限是root,在普通模式下无法使用 我用的是xserver ( moba xterm),我要在gtk mode 下启动fcitx,其实 不用这么写 操作 直接在.profile如下命令 fcitx >/dev/null 2>&1 fcitx启动是单例, 阅读全文
posted @ 2022-01-17 08:29 皮豪 阅读(451) 评论(0) 推荐(0) 编辑
摘要:安装输入法 sudo apt install dbus-x11 im-config fonts-noto fcitx fcitx-pinyin fcitx-sunpinyin fitx-googlepinyin 设置自动启动 命令行执行 fcitx-autostart 编辑 ​​~/.profile 阅读全文
posted @ 2022-01-16 21:43 皮豪 阅读(172) 评论(0) 推荐(0) 编辑
摘要:使用最新版本, 当前是 16.x 的版本。 这里我使用了 LTS 版本。 curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - sudo apt-get install nodejs 阅读全文
posted @ 2022-01-15 22:18 皮豪 阅读(708) 评论(0) 推荐(0) 编辑
摘要:首先得下载 最新的驱动,我之前因为自己的下载的驱动不够新,导致我的驱动一直装不上去 https://github.com/tomaspinho/rtl8821ce 这个是最新的驱动的下载 地址,建议从这里下载最新的 RTL 8821ce驱动 然后解压包, 修改Makefile文件 在当前的文件夹下面 阅读全文
posted @ 2020-10-20 10:01 皮豪 阅读(574) 评论(0) 推荐(0) 编辑