首页
游戏
影视
直播
广播
听书
音乐
图片
更多
看书
微视
主播
统计
友链
留言
关于
论坛
邮件
推荐
我的云盘
我的搜索
我的记录
我的文件
我的图书
我的笔记
我的音乐
我的影视
我的邮件
Search
1
科普:Memory Compiler生成的Register file和SRAM有何区别?
89 阅读
2
virtuoso和empyrean alps模拟仿真和混仿教程
87 阅读
3
在IC617中进行xa+vcs数模混仿
86 阅读
4
vcs debug rtl或者netlist 中的loop
52 阅读
5
文档内容搜索哪家强? 15款文件搜索软件横向评测
41 阅读
默认分类
芯片市场
数字电路
芯片后端
模拟电路
芯片验证
原型与样片验证
算法与架构
DFX与量产封装
PC&Server OS设置
移动OS设置
软件方案
新浪备份
有道备份
登录
Search
标签搜索
python
Docker
vcs
PyQT
STM32
cadence
linux
systemverilog
EDA
Alist
vscode
uos
package
MCU
C
QT
CXL
sed
sv
webdav
bennyhe
累计撰写
344
篇文章
累计收到
31
条评论
首页
栏目
默认分类
芯片市场
数字电路
芯片后端
模拟电路
芯片验证
原型与样片验证
算法与架构
DFX与量产封装
PC&Server OS设置
移动OS设置
软件方案
新浪备份
有道备份
页面
游戏
影视
直播
广播
听书
音乐
图片
看书
微视
主播
统计
友链
留言
关于
论坛
邮件
推荐
我的云盘
我的搜索
我的记录
我的文件
我的图书
我的笔记
我的音乐
我的影视
我的邮件
搜索到
34
篇与
的结果
2025-07-14
linux问题(1) (2008-06-08 09:31:53)
进入图形窗口的问题"login out" 就可以回到命令行, 进入图形窗口是:"startx" :loveliness:我安装的是Red Hat Linux 9(另一个系统是Windows Xp),安装时候无法进入图形界面,提示"注意:显示超出范围: H: xx KHz V: xxHz" ,然后黑屏,没有办法,只好使用文字界面安装,不过安装还是能成功的。采用grub登陆。之后进入Linux系统,在进入图形界面的时候,出现同样的提示,然后黑屏。 原因是默认显卡的驱动于显卡不符,我的显卡是GF FX5200 128M,找到驱动程序,但文件6MB多(NVIDIA-Linux-x86-1.0-5336-pkg1.run),没法用磁盘,因为我有Combo,所以,驱动程序刻在光盘上。(安装的时候参照http://www.nvidia.com/object/linux_display_ia32_1.0-5336.html) 具体解决过程: 1、在出现选择菜单时按e,然后选择第二行(kernel *那一行)再按e,在结尾处输入空格1.然后回车,按b引导. 2、出现提示符后,vi /etc/inittab把id:5:initdefault的5改成3。 (具体修改方法:用方向键找到要修改的地方,按键盘上的'Insert',向Word编辑一样修改,之后按ESC,再按:W,然后Ctrl-z即可) 3、reboot 4、启动后用root登陆 5、把刻好的光盘放进光驱,mount /mnt/cdrom cd /mnt/cdrom 6、cp NVIDIA-Linux-x86-1.0-5336-pkg1.run \root cd /root 7、sh NVIDIA-Linux-x86-1.0-5336-pkg1.run 8、依照驱动程序的说明修改ftp://download.nvidia.com/XFree86/Linux-x86/1.0-5336/README 主要的一步如下:__________________________________________________________________________ (sec-03) EDITING YOUR XF86CONFIG FILE __ When XFree86 4.0 was released, it used a slightly different XF86Config file syntax than the 3.x series did, and so to allow both 3.x and 4.x versions of XFree86 to co-exist on the same system, it was decided that XFree86 4.x was to use the configuration file "/etc/X11/XF86Config-4" if it existed, and only if that file did not exist would the file "/etc/X11/XF86Config" be used (actually, that is an over-simplification of the search criteria; please see the XF86Config man page for a complete description of the search path). Please make sure you know what configuration file XFree86 is using. If you are in doubt, look for a line beginning with "(==) Using config file:" in your XFree86 log file ("/var/log/XFree86.0.log"). This README will use "XF86Config" to refer to your configuration file, whatever it is named. If you do not have a working XF86Config file, there are several ways to start: there is a sample config file that comes with XFree86, and there is a sample config file included with the NVIDIA driver package (it gets installed in /usr/share/doc/NVIDIA_GLX-1.0/). You could also use a program like 'xf86config'; some distributions provide their own tool for generating an XF86Config file. For more on XF86Config file syntax, please refer to the man page. If you already have an XF86Config file working with a different driver (such as the 'nv' or 'vesa' driver), then all you need to do is find the relevant Device section and replace the line: Driver "nv" (or Driver "vesa") with Driver "nvidia" In the Module section, make sure you have: Load "glx" You should also remove the following lines: Load "dri" Load "GLcore" if they exist. There are also numerous options that can be added to the XF86Config file to fine-tune the NVIDIA XFree86 driver. Please see Appendix D for a complete list of these options. Once you have configured your XF86Config file, you are ready to restart X and begin using the accelerated OpenGL libraries. After you restart X, you should be able to run any OpenGL application and it will automatically use the new NVIDIA libraries. (用vi 命令,和vi /etc/inittab一样用) 9、reboot 10、再在出现选择BOOT OS菜单时按e,然后选择第二行(kernel *那一行)再按e,在结尾处输入空格1.然后回车,按b引导. 11、出现提示符后,vi /etc/inittab把id:5:initdefault的3改成5。 12、reboot 这12部结束后,我就看到了我的图形界面了 有的地方可能写得太详细,太弱智了,不过是为了方便第一次安装和第一次接触Linux的朋友,请大虾们不要笑我。 一、安装的过程中默认语言是英文,而不是中文简体(安装过程中有两次制定语言选项,起决定作用的是第二次) 二、切换控制台,由图形转换到控制台模式:ctrl+alt+f1(同时按下3秒钟不要马上松开)。由控制台转向图形模式是:alt+f7 三、修改默认的语言项(在控制台下):vi /etc/sysconfig/i18n中的LANG=zh_CN.GB18030(注意大小写,然后重启系统即可) 四、命令不会用,就在控制台下运行man ls就可以。(以ls命令为例)ctrl + alt + F1(F2;F3;F4;F5;F6)F7是图形界面了直到F12或者打开终端,也可以运行简单的命令分享:
2025年07月14日
5 阅读
0 评论
0 点赞
2025-07-14
Linux下 lsof 命令详解
lsof 是 List Open File 的缩写, 它主要用来获取被进程打开文件的信息,我们都知道,在Linux中,一切皆文件,lsof命令可以查看所有已经打开了的文件,比如: 普通文件,目录,特殊的块文件,管道,socket套接字,设备,Unix域套接字等等,同时,它还可以结合 grep 以及 ps 命令进行更多的高级搜索安装lsof 命令默认是没有安装的,而且它的使用需要有root权限或者赋予普通用于sudo权限lsof 命令有很多可选参数,本文根据我自己的使用经验整理了一些比较常用且重要的用法列出所有打开的文件不带任何参数执行 lsof 命令会输出当前所有活跃进程打开的所有文件[root@ecs-centos-7 ~]# lsof | more COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME systemd 1 root cwd DIR 253,1 4096 2 / systemd 1 root rtd DIR 253,1 4096 2 / systemd 1 root txt REG 253,1 1624520 530313 /usr/lib/systemd/systemd systemd 1 root mem REG 253,1 20064 528340 /usr/lib64/libuuid.so.1.3.0 systemd 1 root mem REG 253,1 265600 532853 /usr/lib64/libblkid.so.1.1.0 systemd 1 root mem REG 253,1 90248 525942 /usr/lib64/libz.so.1.2.7 systemd 1 root mem REG 253,1 157424 525955 /usr/lib64/liblzma.so.5.2.2 systemd 1 root mem REG 253,1 23968 526159 /usr/lib64/libcap-ng.so.0.0.0 systemd 1 root mem REG 253,1 19896 526135 /usr/lib64/libattr.so.1.1.0 systemd 1 root mem REG 253,1 19288 525996 /usr/lib64/libdl-2.17.so systemd 1 root mem REG 253,1 402384 525931 /usr/lib64/libpcre.so.1.2.0由于lsof命令会输出很多信息,所以上面例子中使用了 lsof | more 来分页显示命令输出结果输出结果中,第一列中 systemd 的进程ID是 1,它是一个守护进程其中列 COMMAND 、PID、USER 分别表示进程名、进程ID、所属用户列 FD 是文件描述符,下面是可能的类型以及说明FD 说明cwd 当前目录txt txt文件rtd root目录mem 内存映射文件列 TYPE 是文件类型,下面是可能的值以及说明TYPE 说明DIR 目录REG 普通文件CHR 字符a_inode Inode文件FIFO 管道或者socket文件netlink 网络unknown 未知列 DEVICE 表示设备ID列 SIZE/OFF 表示进程大小列 NODE 表示文件的Inode号列NAME 表示路径或者链接列出指定用户已打开的文件使用 -u 选项可以列出指定用户已经打开的文件,该选项后面可以接多个用户名,每个用户名之间用空格隔开,表示列出所有指定用户已打开的所有文件[root@ecs-centos-7 ~]# lsof -u tt | more COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 27789 tt cwd DIR 253,1 4096 131090 /home/tt bash 27789 tt rtd DIR 253,1 4096 2 / bash 27789 tt txt REG 253,1 964600 525779 /usr/bin/bash vim 27813 tt txt REG 253,1 2337192 531847 /usr/bin/vim vim 27813 tt 4u REG 253,1 12288 131167 /home/tt/.p.txt.swp上面的例子中,lsof -u tt 命令表示列出 tt 用户已经打开了的文件,从结果可以看出,用户打开了 /home/tt、/、/usr/bin/bash、/usr/bin/vim、/home/tt/.p.txt.swp 这几个文件如果要排除指定用户已经打开的文件,可以在用户名前加 ^ 符号,下面的命令会列出除tt用户外其他所有用户已打开了的文件lsof -u ^tt | more 找出打开着但已被删除了的文件有这样一种场景,有一个服务正在往日志文件中写日志,这个时候,不小心把正在写入的日志文件删除了上面的场景中,日志文件虽然被删除了,但是文件仍然是打开着的,它仍然占用文件系统的空间,我们可以结合 grep 命令找出这种打开着,但是已经被删除的文件[root@ecs-centos-7 ~]# lsof -u tt | grep deletedvim 27813 tt 4u REG 253,1 12288 131167 /home/tt/.p.txt.swp(deleted)上面例子中使用 lsof -u tt | grep deleted 命令查看用户 tt打开着的确被删除的文件从结果可以看出,在往 p.txt写入内容的时候,文件被删除了列出所有打开了的网络文件[root@ecs-centos-7 ~]# lsof -i COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ntpd 567 ntp 18u IPv4 12657 0t0 UDP localhost:ntp ntpd 567 ntp 22u IPv6 16095 0t0 UDP ecs-centos-7.4-64bit-20200212:ntp dhclient 651 root 6u IPv4 14594 0t0 UDP *:bootpc master 960 root 13u IPv4 15791 0t0 TCP localhost:smtp (LISTEN) master 960 root 14u IPv6 15792 0t0 TCP localhost:smtp (LISTEN) mysqld 1053 mysql 13u IPv6 15147 0t0 TCP *:mysql (LISTEN) sshd 1348 root 3u IPv4 16698 0t0 TCP *:ssh (LISTEN)列出所有 IPV4/6 网络文件列出所有已经打开了的 ipv4 网络文件[root@ecs-centos-7 ~]# lsof -i 4 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ntpd 567 ntp 16u IPv4 12651 0t0 UDP *:ntp ntpd 567 ntp 18u IPv4 12657 0t0 UDP localhost:ntp ntpd 567 ntp 21u IPv4 16094 0t0 UDP ecs-centos-7.4-64bit-20200212:ntp dhclient 651 root 6u IPv4 14594 0t0 UDP *:bootpc master 960 root 13u IPv4 15791 0t0 TCP localhost:smtp (LISTEN) sshd 1348 root 3u IPv4 16698 0t0 TCP *:ssh (LISTEN)所有已经打开了的 ipv6 网络文件[root@ecs-centos-7 ~]# lsof -i 6 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ntpd 567 ntp 17u IPv6 12652 0t0 UDP *:ntp ntpd 567 ntp 19u IPv6 12658 0t0 UDP localhost:ntp ntpd 567 ntp 22u IPv6 16095 0t0 UDP ecs-centos-7.4-64bit-20200212:ntp master 960 root 14u IPv6 15792 0t0 TCP localhost:smtp (LISTEN) mysqld 1053 mysql 13u IPv6 15147 0t0 TCP *:mysql (LISTEN) sshd 1348 root 4u IPv6 16700 0t0 TCP *:ssh (LISTEN)列出在指定端口上打开的文件使用 lsof -i:端口号 可以获得所有在指定端口号上打开的文件lsof -i:22上面例子列出了所有在22号端口上打开的文件在服务器开发中,经常会部署一个网关或者代理程序,用来和客户端通讯,网关或者代理程序需要开放一个固定的端口供客户端连接用如果客户端连接不上网关或者代理程序,我们可以用上述命令检查网关或代理程序的端口是否开启,来排除因为端口关闭了导致连接不上网关的情况列出使用了指定协议(TCP/UDP) 的文件使用 lsof -i TCP/UDP 列出使用了TCP 或 UDP 协议的文件 lsof -i TCP | more使用 lsof -i TCP:3306 列出使用了TCP 协议并且端口为3306的文件 使用 lsof -i TCP:1-1024 列出使用了TCP协议并且端口范围为 1 到 1024 的文件列出目录中所有打开的文件可以使用lsof命令列出指定目录中的所有打开文件现有一个data目录 ,结构如下:tree data/列出 data 目录中打开的文件[root@ecs-centos-7 tt]# lsof +D ./data/lsof +d ./data/上面例子中,+D 和 +d 选项都是列出目录中打开的文件+D 选项会列出一个目录和其子目录中打开的文件,而 +d 选项只会列出当前目录下已打开的文件列出指定进程ID打开的文件进程ID是操作系统进程的唯一标识,以下命令列出了进程ID为 1053 相关的文件, 从结果中可以知道这个进程ID对应的进程是MySQL lsof -p 1053上述命令中,-p 选项后面可以指定多个进程ID,每个进程ID之间用逗号分隔,如果想排除掉某个进程打开的文件,可以在该进程ID前面加上 ^符号lsof -p 1,2,3,^4上述命令会列出进程1,进程2,进程3打开的所有文件,同时忽略进程4打开的文件杀死指定用户的所有进程前面介绍了列出指定用户所有打开的文件,我们可以组合 kill 命令一起使用,实现杀死指定用户的所有进程的功能,具体的命令如下kill -9 lsof -t -u tt上述命令中,lsof -u tt 是列出tt用户所有打开的文件,加上 -t 选项之后表示结果只列出PID列,也就是进程ID列,其他列都忽略,前面的 kill -9 表示强制结束指定的进程ID小结本文介绍了 lsof 命令的一些常见用法,它还有很多其他的用法,请自行查看man文档https://www.cnblogs.com/wanng/p/lsof-cmd.html
2025年07月14日
11 阅读
0 评论
0 点赞
2025-06-20
Linux手工编译新版GLIBC库,解决低版本GLIBC库软件运行出错的问题
strings /lib/x86_64-linux-gnu/libc.so.6 |grep GLIBC_首先吐槽一下论坛发帖子的功能,以下原文无法直接发出,带图片的都显示图片格式不正确,无奈之下只能使用这种方式发帖 运行软件的错误信息: Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found 由于专业版1070自带的GLIBC库为2.28,而软件需要的版本是2.29,所以导致某些软件无法正常使用,可以使用以下方法处理: 1:下载所需版本的glic库源码: wget https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.bz2 2:安装源码编译所需要的环境: sudo apt install build-essential bison3:编译,安装glibc库: tar xvf glibc-2.29.tar.bz2 cd glibc-2.29 mkdir buildcd build ../configure --prefix=/opt/glibc-2.29 make -j4 sudo make install 4:使用LD_PRELOAD技术运行软件(使用这种方式可以单独指定软件使用指定的库) LD_PRELOAD=/opt/glibc-2.29/lib/libc.so.6 软件全路径 运行一切正常 5:如果需要在桌面或系统菜单中使用这种方法运行软件,需要修改desktop文件的内容,找到Exec一行修改为Exec=env LD_PRELOAD=/opt/glibc-2.29/lib/libm.so.6 软件全路径 运行一切正常编译其他项目时,发现需要更高版本的 glibc,所以尝试编译 glibc-2.40UOS版本:$ uname -aLinux athena-PC 4.19.0-amd64-desktop #7112 SMP Thu Jul 18 18:35:56 CST 2024 x86_64 GNU/Linux glibc版本:https://ftp.gnu.org/gnu/glibc/glibc-2.40.tar.gz 编译过程:$ tar xzvf glibc-2.40.tar.gz$ cd glibc-2.40/$ mkdir build$ cd build/$ ../configure --prefix=/usr/$ make 错误信息:gcc -nostdlib -nostartfiles -r -o /home/athena/glibc-2.40/build/elf/librtld.os '-Wl,-(' /home/athena/glibc-2.40/build/elf/dl-allobjs.os /home/athena/glibc-2.40/build/elf/rtld-libc.a -lgcc '-Wl,-)' \ -Wl,-Map,/home/athena/glibc-2.40/build/elf/librtld.os.mapgcc -nostdlib -nostartfiles -shared -o /home/athena/glibc-2.40/build/elf/ld.so.new \ -Wl,-z,relro -Wl,-z,defs \ \ /home/athena/glibc-2.40/build/elf/librtld.os -Wl,--version-script=/home/athena/glibc-2.40/build/ld.map \ -Wl,-soname=ld-linux-x86-64.so.2/usr/bin/ld: /home/athena/glibc-2.40/build/elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `__ehdr_start' can not be used when making a shared object/usr/bin/ld: final link failed: nonrepresentable section on outputcollect2: error: ld returned 1 exit statusmake[2]: * [Makefile:1380: /home/athena/glibc-2.40/build/elf/ld.so] Error 1make[2]: Leaving directory '/home/athena/glibc-2.40/elf'make[1]: * [Makefile:484: elf/subdir_lib] Error 2make[1]: Leaving directory '/home/athena/glibc-2.40'make: * [Makefile:9: all] Error 2 错误信息显示 ld 链接器有问题,__ehdr_start不能用于编译共享项目。 原因分析:通过查看GUN Binutils的版本发现,UOS系统默认安装的GUN Binutils版本为2.31.1,与glibc-2.40不匹配,是造成glib-2.40编译安装失败的主要原因。$ ld --version GNU ld (GNU Binutils for Uos) 2.31.1 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. 解决方法:编译安装合适的GUN Binutils 1.获取GUN Binutils$ git clone git://sourceware.org/git/binutils-gdb.git或$ wget https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.gz 2.编译安装GUN Binutils$ tar xzvf binutils-2.43.1.tar.gz$ cd binutils-2.43.1/$ ../configure --prefix=/usr/$ make$ make install 注意:如果出现binutils-2.43.1源码中定义的'lseek'与UOS系统/usr/include/unistd.h中定义的'lseek'冲突造成编译错误 libtool: compile: gcc -DHAVE_CONFIG_H -I. -U_ASM -I.. -I. -I./../common -I./../src -I./../../include -Wall -Wno-nonnull-compare -g -O2 -MT iotrace.lo -MD -MP -MF .deps/iotrace.Tpo -c iotrace.c -fPIC -DPIC -o .libs/iotrace.oIn file included from ./../src/collector_module.h:27, from collector.h:29, from iotrace.c:38:iotrace.c:2473:1: error: conflicting types for ‘lseek’ llseek (int fildes, offset_t offset, int whence) ^~/usr/include/unistd.h:338:16: note: previous definition of ‘lseek’ was here extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW; ^~~~~make[5]: * [Makefile:624: iotrace.lo] Error 1make[5]: Leaving directory '/home/athena/binutils-2.43.1/gprofng/libcollector'make[4]: * [Makefile:478: all] Error 2make[4]: Leaving directory '/home/athena/binutils-2.43.1/gprofng/libcollector'make[3]: * [Makefile:472: all-recursive] Error 1make[3]: Leaving directory '/home/athena/binutils-2.43.1/gprofng'make[2]: * [Makefile:404: all] Error 2make[2]: Leaving directory '/home/athena/binutils-2.43.1/gprofng'make[1]: * [Makefile:7318: all-gprofng] Error 2make[1]: Leaving directory '/home/athena/binutils-2.43.1'make: * [Makefile:1028: all] Error 2 可将/usr/include/unistd.h中335行16列的'lseek'暂时修改为'llseek'以规避编译错误修改时注意及时备份原文件# cp /usr/include/unistd.h /usr/include/unistd.h.bak修改完的unistd.h的335行应为define llseek llseek 3.编译安装完成后确认GNU Binutils版本信息$ ld --versionGNU ld (GNU Binutils) 2.43.1Copyright (C) 2024 Free Software Foundation, Inc.This program is free software; you may redistribute it under the terms ofthe GNU General Public License version 3 or (at your option) a later version.This program has absolutely no warranty. 至此,glibc-2.40可正常完成编译,编译后在glibc-2.40/build/elf目录下看到编译好的ldd,查看版本信息如下:$ ./ldd --versionldd (GNU libc) 2.40Copyright (C) 2024 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Written by Roland McGrath and Ulrich Drepper. 但继续安装时发现如下错误:Inconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion 'sym != NULL' failed! 目前还在继续研究中......
2025年06月20日
5 阅读
0 评论
0 点赞
2025-06-19
在deepin或者UOS下安装Uengine及自定义各个安卓app显示窗口的方法
之前一直不知道自行安装的安卓app如何设置界面,后来经deepin论坛“云的眼泪”大侠指导,终于学会了设置,然后就有了这个小白教程1、Uengine安装方法打开终端,输入sudo apt install uengine,回车,按照提示输入密码会进入下载安装过程,安装结束exit回车退出。 2、Uengine运行器安装在浏览器里面输入如下网址下载安装[https://gitee.com/gfdgd-xi-org/uengine-runner/releases](https://gitee.com/gfdgd-xi-org/uengine-runner/releases)3、非应用商店安卓app的安装先自行下载需要的安卓app,然后点击uengine运行器,选择该安卓app所在位置,点击“安装”及完成(以电视直播酒店版为例) 安装完成后默认点开是竖屏的,需要手动切换为横屏,且窗口大小不能调整,这样用起来很不爽,就需要我们后面的步骤来单独设置。4、安卓app默认窗口显示的设置(以电视直播酒店版为例)(1)首先在桌面上选择“电视直播酒店版”(如果没有桌面图标就从启动器里面右键发送图标到桌面),右键选择“属性”打开属性界面 然后把鼠标指针移动到“位置”,这时候就会显示如图,记住其中的”com.dianshijia.hoteltv”备用。(2)进入系统盘,鼠标选中“usr”文件夹。右键选择“以管理员身份打开”,在跳出来的框里输入密码后确认打开该文件夹 依次点击进入share\uengine\appetc文件夹。右键新建一个以”com.dianshijia.hoteltv”命名的文本文件。 在该文本文件里面输入如下内容:verticalWidth 540 //竖屏宽verticalHeighe 960 //竖屏高horizontaltWidth 960 //横屏宽,备选为1280horizontaltHeighe 540 //横屏高 ,备选为720verticalScreen 1 //设置默认横屏还是竖屏,1为竖屏,0为横屏 allowFullScreen 0 //设置是否允许全屏,1为允许,0为不允许 allowScreenSwitching 0 //设置是否允许横竖屏切换,1为允许,0为不允许 defaultFullScreen 0 //设置是否默认显示最大化,1为默认最大化,0为不是可以视需要自行修改默认横屏还是竖屏显示,默认显示分辨率等。如图: 注意:分辨率等设置要适当,不能超过显示器支持的范围。 其他自行安装的app参照示例设置即可。(用uengine运行器安装app建议卸载的时候也用uengine运行器来卸载,直接卸载会有残留。)
2025年06月19日
6 阅读
0 评论
0 点赞
2025-06-19
wsl 子系统安装QT
概述在《Win10的Linux子系统Ubuntu安装图形界面》https://zhuanlan.zhihu.com/p/393145947https://blog.csdn.net/chentuo2000/article/details/119104547一文中我们为WSL安装了图形界面。在本文中我们在WSL图形界面的基础上安装和使用Qt。安装Qt2.1 Qt和Qt Creator的区别Qt是C++的一个库,里面集成了一些库函数,提高开发效率。Qt Creator是一个集成了C++语言和CMake工具的IDE开发环境。2.2 安装Qt5在WSL终端创建目录hkmkdir hk进入hkcd hk安装Qt5sudo apt-get updatesudo apt-get install cmake qt5-default qtcreator出错,按照提示,输入:sudo apt-get install cmake qt5-default qtcreator --fix-missing验证安装是否成功qmake -versionOK!查看Qt目录:找qt5的安装目录sudo find / -name qt5ls -l /usr/lib/x86_64-linux-gnu/qt5查看配置文件qt.conf2.3 运行Qt Creator启动XLaunch看《Win10的Linux子系统Ubuntu安装图形界面》https://zhuanlan.zhihu.com/p/393145947https://blog.csdn.net/chentuo2000/article/details/119104547在terminal执行命令qtcreator启动Qt Creator出错,解决方法:[https://stackoverflow.com/questions/63627955/cant-load-shared-library-libqt5core-so-5]sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5再执行qtcreator有错误,但Qt Creator启动了:2.4 解决错误问题QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-ccdc'告知用户XDG_RUNTIME_DIR环境变量未设置,可以不管它,系统默认使用目录/tmp/runtime-ccdc:ccdc是我的用户名。XDG_RUNTIME_DIR给出用户运行时目录,如果不需要就不要定义这个变量。如果需要,在/etc/profile末尾增加一句:export XDG_RUNTIME_DIR=/your/dir/your/dir是你定义的目录。注意:这个目录对于执行qtcreator命令的用户一定要有读写权限。然后刷新全局变量:source /etc/profile解决libGL错误libGL error: No matching fbConfigs or visuals foundlibGL error: failed to load driver: swrast无匹配的帧缓存设置和视图,无对应swrast驱动。swrast主要用于图形渲染,其出现问题说明没有发现显卡的硬件驱动。解决方法参考文档:WSL下使用VcXsrv启动chromium browser及常见错误解析 (ubuntu18.04, 图形界面)[https://www.cnblogs.com/freestylesoccor/p/9630758.html]在启动XLaunch时关闭openGL 选项,该错误即消失,说明wgl(windows自带图像处理器)跟Qt存在兼容问题。取消Native opengl勾选。重新启动启动Qt Creatorqtcreator没有错误信息了,Qt Creator启动正常:QT项目测试创建项目File > New File or Project选择Qt Widgets Application,点击Choose。项目名称Name:hello创建目录:/home/ccdc/hkNext >默认,Next >默认,Next >默认,Next >默认,Next >Finish完成hello项目创建,进入代码编辑页面。出现错误:unkown type name ‘QApplication’unkown type name ‘MainWindow’解决办法:About > About Plugins > C++ 去掉ClangCodeModel的勾选。重新启动Qt Creator。打开我们之前创建的项目hello。错误信息没有了。界面设计双击mainwindow.ui打开UI设计窗口:拖拽一个Label组件到Type Here上。编辑text属性:OKCtrl+S保存。按F5或者点击左下角的Run按钮运行程序。参考文档.ubuntu 查找qt是否安装_ubuntu18.04 安装qt5.12.8及环境配置的详细教程https://blog.csdn.net/weixin_42352222/article/details/114472231?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase.安装QT5 出现错误 unkown type name ‘QApplication’ unkown type name ‘MainWindow’https://blog.csdn.net/u01478378
2025年06月19日
21 阅读
0 评论
0 点赞
1
2
3
4
...
7