imx6q Xorg下Qt应用开机自启动及添加桌面快捷启动图标的方法

启动scene3d例子:

root@imx6qsabresd:/etc/X11/Xsession.d# ls -al
total 36
drwxr-xr-x 2 root root 4096 Mar 12 05:32 .
drwxr-xr-x 6 root root 4096 Mar 12 2018 ..
-rwxrwxrwx 1 root root 69 Mar 12 05:34 20test.sh
-rwxr-xr-x 1 root root 115 Mar 12 2018 30xinput_calibrate.sh
-rwxr-xr-x 1 root root 88 Mar 12 2018 60xXDefaults.sh
-rwxr-xr-x 1 root root 27 Mar 12 2018 70settings-daemon.sh
-rwxr-xr-x 1 root root 631 Mar 12 2018 80matchboxkeyboard.sh
-rwxr-xr-x 1 root root 191 Mar 12 2018 89xdgautostart.sh
-rwxr-xr-x 1 root root 181 Mar 12 2018 90xXWindowManager.sh

root@imx6qsabresd:/etc/X11/Xsession.d# cat 20test.sh

export DISPLAY=:0.0

/usr/share/qt5/examples/qt3d/scene3d/scene3d &

 

往X11桌面添加快捷启动图标的方法:
root@imx6qsabresd:/usr/share/applications# cat test.desktop
[Desktop Entry]
Name=test 3D app
Exec=/usr/share/qt5/examples/qt3d/scene3d/scene3d
Icon=hellowindow
Terminal=false
Type=Application
X-MB-SingleInstance=true
Comment=test 3D app
StartupNotify=false
root@imx6qsabresd:/usr/share/applications#

 

图标文件的存放位置:

root@imx6qsabresd:/usr/share/pixmaps# ls -al
total 348
drwxr-xr-x 2 root root 4096 Jul 6 2018 .
drwxr-xr-x 85 1001 pulse 4096 May 23 2018 ..
-rw-r--r-- 1 root root 937 Mar 12 2018 applet-screenshot.png
-rw-r--r-- 1 root root 33226 Mar 12 2018 cinematicexperience.png
-rw-r--r-- 1 root root 7581 Mar 12 2018 duck.png
-rw-r--r-- 1 root root 999 Mar 12 2018 emblem-symbolic-link.png
-rw-r--r-- 1 root root 2044 Mar 12 2018 gnome-fs-directory.png
-rw-r--r-- 1 root root 3220 Mar 12 2018 gnome-fs-regular.png
-rw-r--r-- 1 root root 2855 Mar 12 2018 gnome-mime-text-plain.png
-rw-r--r-- 1 root root 6875 Mar 12 2018 hellowindow.png
-rw-r--r-- 1 root root 2797 Jul 6 2018 imxcamera.png
-rw-r--r-- 1 root root 2797 Jul 6 2018 imxplayer.png
-rw-r--r-- 1 root root 2915 Mar 12 2018 l3afpad.png
-rw-r--r-- 1 root root 2308 Mar 12 2018 l3afpad.xpm
-rw-r--r-- 1 root root 368 Mar 12 2018 matchbox-keyboard.png
-rw-r--r-- 1 root root 18075 Mar 12 2018 qt5everywheredemo.png
-rw-r--r-- 1 root root 20649 Mar 12 2018 qt5nmapcarousedemo.png
-rw-r--r-- 1 root root 25774 Mar 12 2018 qt5nmapper.png
-rw-r--r-- 1 root root 16610 Mar 12 2018 qtledbillboard.png
-rw-r--r-- 1 root root 24452 Mar 12 2018 qtledcombo.png
-rw-r--r-- 1 root root 19986 Mar 12 2018 qtsmarthome.png
-rw-r--r-- 1 root root 16812 Mar 12 2018 quitbattery.png
-rw-r--r-- 1 root root 22063 Mar 12 2018 quitindicators.png
-rw-r--r-- 1 root root 59761 Mar 12 2018 xinput_calibrator.svg
-rw-r--r-- 1 root root 5956 Mar 12 2018 xinput_calibrator.xpm

posted on 2018-07-09 10:44  绿色star  阅读(608)  评论(0编辑  收藏  举报

导航