我成功地在2台PC上安装了uniCenta POS :一台有Ubuntu15.10,另一台有Ubuntu16.04,都安装了西班牙语(Espa)(我下载并执行了以下安装: unicentaopos-3.91.3-linux-x64-installer.run)。程序在终端上正常运行: sudo ./start.sh
现在,我尝试为应用程序创建一个桌面条目:我创建了一个名为: Unicenta.desktop的文件,位于:/usr/share/application中,内容如下:
[Desktop Entry]  
Name=Unicenta 
Comment=Fires up Unicenta oPOS 
Type=Application 
Exec=/home/barmistias/unicentaopos-3.91.3/start.sh 
Icon=/home/barmistias/unicentaopos-3.91.3/unicentaopos.ico 
Terminal=false在这个阶段,它没有创建任何图标&启动程序(但是它已经创建了,对吗?)
可执行start.sh和图标文件的位置是正确的。现在,通过终端,我尝试将文件转换为可执行文件:当我位于文件夹/usr/share/application中时:
sudo chmod 775 ./Unicenta.desktop  with ls -l I get: -rwxrwxr-x当我位于文件夹中时: /home/barmistias/unicentaopos-3.91.3:
sudo chmod 775 ./start.sh  with ls -l I get: -rwxrwxr-x
sudo chmod 777 ./unicentaopos.jar with ls -l I get: -rwxrwxrwx此外,我在start.sh文件中放置了正确的路径:
启动uniCenta oPOS
java -cp $CP -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -jar /home/barmistias/unicentaopos-3.91.3/unicentaopos.jar "$@"因此,它应该可以工作,但它不能。此外,如果我通过在属性中激活:“允许以程序形式执行文件”将start.sh转换为可执行文件,则应用程序将以不同的方式启动(在derby数据库被停用,并且无法保存对此设置的更改时)。它只循环设置窗口,因此不允许访问程序的主窗口)。
因此,总之,我如何创建一个桌面图标,成功地正常启动uniCenta POS (3.91.3版)?谢谢你的帮助!
发布于 2016-10-03 04:38:35
如何创建一个成功正常启动uniCenta POS的桌面图标(3.91.3版)
试试这个:
/home/barmistias/Desktop)中创建Unicenta.desktop,就像上面所做的那样。start.sh从Exec=行更改为launcher.sh。launcher.sh;
#!bin/bash cd /home/barmistias/unicentaopos-3.91.3/ ./start.shlauncher.sh和Unicenta.desktop的执行权限指南是从这篇博客文章拿来的。
此外,搜索unicenta desktop shortcut not working solution会从Unicenta和其他博客文章中获得有用的文章。
https://stackoverflow.com/questions/39813104
复制相似问题