首页 > 系统相关 >创建桌面快捷方式 Add items to Ubuntu 12.04 Unity Launcher (quicklaunch)

创建桌面快捷方式 Add items to Ubuntu 12.04 Unity Launcher (quicklaunch)

时间:2023-03-28 22:33:28浏览次数:45  
标签:quicklaunch Launcher create Zend desktop Unity 快捷方式 icon


Add items to Ubuntu 12.04 Unity Launcher (quicklaunch)

The recent upgrade to Ubuntu 12.04 Precise Pangolin left me somewhat hanging when it comes to creating launchers on the desktop, and also in the Unity Launcher (also called quicklaunch in some places) for Zend Studio and PHPStorm. In Gnome prior to Unity in Ubuntu it was easy to right click the desktop and select Create Launcher to create icons on the desktop to launch applications or scripts, but in 12.04 that options is gone. So here is how I solved some of the issues.

Method 1

For Netbeans and Eclipse based editors like Zend Studio or Aptana it is not too bad. I created a *.desktop files for each one and put it in the /usr/share/applications/ folder. I believe you can also create a folder in /home/username/.local/applications/ and put it there instead, but I have not tested it. Here is how I created a zendstudio.desktop file:


[Desktop Entry] Version=1.0 Name=Zend Studio GenericName=Zend Studio X-GNOME-FullName=Zend Studio PHP IDE Comment=PHP IDE for PHP development Type=Application Categories=Application;Development;PHP;IDE;Programming Exec=/home/username/Zend/ZendStudio-9.0.2/ZendStudio TryExec=/home/username/Zend/ZendStudio-9.0.2/ZendStudio Terminal=false StartupNotify=true Icon=/home/username/Zend/ZendStudio-9.0.2/icon.xpm

 

After creating the file above I then launched Zend Studio by going to the Zend folder in my home directory and double clicking the ZendStudio executable. Once the application is running I right clicked the icon in the Unity Launcher and select “Lock to Launcher”. Now the application stays in the Unity Launcher.

The above worked for most applications, but did NOT work for PHPStorm which launches by using a shell script named PhpStorm.sh. I tried doing the method above, and I also tried creating the desktop file and then dragging and dropping it to the Launcher, and that did not work either.

Method 2

Another method I found was to install the ‘gnome-panel’ package. (Actually it was already installed on my system for some reason.)


sudo apt-get install --no-install-recommends gnome-panel

 

With the gnome-panel I was now able to create a launcher on the desktop using the command below.


gnome-desktop-item-edit ~/Desktop/ --create-new

 

In the create launcher dialog I filled it out as follows:
Type: Application
Name: PhpStorm
Command: /bin/bash /home/username/PhpStorm/PhpStorm-117.257/bin/phpstorm.sh

NOTE: You could use /bin/sh or whatever shell you use. I use bash so that is why I put /bin/bash.

To create a shortcut in the Unity Launcher I double clicked the new desktop launcher I created above. (NOTE: If you start PHPStorm by executing the phpstorm.sh you do not get any options at all when right clicking the icon in the Unity Launcher.) Then when PHPStorm was running I was then able to right click on the icon in the Unity Launcher and selected “Lock to Launcher”. Voila! Now I have phpstorm on the Unity Launcher.

Method 3

This option is built right into PHPStorm v4.0.1 (I am not sure about other versions). The wonderful people at JetBrains created a handy item in Tools to automatically create a menu item for you. Simply click on Tools->Create Desktop entry… and the IDE will create an icon in the Dash menu, but not in the Unity Launcher. However, by starting the JetBrains PhpStorm IDE from the Unity Dash you can then right click on the icon that shows up in the Unity Launcher and select “Lock to Launcher”. The icon now stays there, even after a reboot/logout.

Update:

Method 4

See comment to this post by Shinybird. (Not sure if it works, but it sounds good.)

Enjoy!!!

 

 


 

标签:quicklaunch,Launcher,create,Zend,desktop,Unity,快捷方式,icon
From: https://blog.51cto.com/u_8895844/6155510

相关文章

  • Fatal error in launcher: Unable to create process using '"d:\software\python\
    Fatalerrorinlauncher:Unabletocreateprocessusing'"d:\software\python\python.exe" 问题发生:是由于python切换环境导致的。本来python放在D盘software的......
  • Ubuntu给Appimage创建快捷方式
    下载AppImageLauncher2.安装3.选择要运行的Appimage双击运行即可。他会在home目录下创建一个applications文件夹,并且帮你自动创建快捷方式。......
  • 我每天使用的 Chrome 快捷方式
    我最喜欢的浏览器是谷歌浏览器。我想与您分享一些我每天使用的快捷方式。他们让我的生活变得更好。你会注意到很多这些快捷方式只是避免了相对容易的鼠标移动。例如,按下CTR......
  • 右键菜单添加exe快捷方式
    1.问题描述想要在右键菜单中添加快捷功能,如图中的GitBushHere,可以直接通过左键在当前路径(右键点击的位置)打开这个程序。2.添加过程2.1打开注册表编辑器通过Win......
  • Winform中实现程序初始化时在桌面创建快捷方式并设置图标(获取ico图片资源路径)
    场景Winform程序在双击exe启动之后需要在桌面创建快捷方式,并且设置快捷方式的名称图标等。注:博客:https://blog.csdn.net/badao_liumang_qizhi实现1、首先新建创建桌......
  • Ubuntu桌面新建快捷方式
    在Ubuntu系统中,一般而言softeware都安装在opt文件夹中,每次启动这些softeware,都需要在终端中键入cd/opt才能开始启动这些sofeware对于刚从windows转来的我而言,诸多不适…......
  • 在Launcher隐藏主菜单中某个应用
    在Launcher隐藏主菜单中某个应用修改LauncherModel.java的loadAllAppsByBatch()方法,如下:......if(!LauncherExtPlugin.getAllAppsListExt(mApp).isSh......
  • Home key点亮屏幕后, 使手机不自动回到 launcher 界面
    1:修改phonewindowmanager.java中interceptKeyBeforeQueueing方法的下面这段code:if(keyCode==KeyEvent.KEYCODE_POWER){policyFlags|=WindowMan......
  • Windows快捷方式备份还原脚本
    Windows快捷方式备份还原脚本适用场景单纯备份快捷方式安装程序迁移至其他磁盘(程序文件父子层级关系不变的情况下)安装程序还是在原来的磁盘的位置,重建快捷方式(重装系统......
  • [转]使用批处理文件启动快捷方式
    使用批处理文件启动快捷方式这是问题所在。我在大约260个位于以下同一文件夹中的计算机上都有一个快捷方式;“c:\documentsandsettings\allusers\desktop......