哪些自定义启动器和Unity快速列表可用?


138

请注意,目前,下面包含的大多数信息已过时,无法更新。请注意,大多数功能在Ubuntu 12.04及更高版本上将不起作用。

为Unity创建自定义启动器很简单。快速列表为快速访问特定应用程序的常用任务提供了一种简便有效的方法。

注意:从Ubuntu 11.10开始,此弹出选项已消失。现在只能通过编辑主文件夹中的文本文件来创建启动器。

创建自定义启动器很容易。

  1. 右键单击您的桌面,然后单击创建启动器。
  2. 使用文本编辑器编辑.desktop文件。(可在此处和此处找到更多信息。)

那么,您在Unity上使用哪些自定义启动器?

注意:每个答案只能使用一个自定义启动器。另外,请提供实际操作的屏幕截图。

Answers:


68

主页图标快速列表

主页图标快速列表

  1. 将“主文件夹”启动器文件复制到您的主目录:

    mkdir ~/.local/share/applications
    cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications
    
  2. 在gedit中打开文件进行编辑:

    gedit ~/.local/share/applications/nautilus-home.desktop
    
  3. 从文件中删除以下行:

    OnlyShowIn=GNOME;
    
  4. 将此文本添加到文件底部,然后关闭并保存:

    X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads
    [Videos Shortcut Group]
    Name=Videos
    Exec=nautilus Videos
    TargetEnvironment=Unity
    
    [Documents Shortcut Group]
    Name=Documents
    Exec=nautilus Documents
    TargetEnvironment=Unity
    
    [Music Shortcut Group]
    Name=Music
    Exec=nautilus Music
    TargetEnvironment=Unity
    
    [Pictures Shortcut Group]
    Name=Pictures
    Exec=nautilus Pictures
    TargetEnvironment=Unity
    
    [Downloads Shortcut Group]
    Name=Downloads
    Exec=nautilus Downloads
    TargetEnvironment=Unity
    
  5. 注销并再次登录以查看更改。

资源


有什么方法可以添加一个快速列表项,以便通过Nautilus中的ssh连接到服务器?
— 汤米·布伦

2
看来这仅适用于英语语言环境,或者至少对我不起作用(德语)
— 2011年

2
@marto好评!!可以通过稍作修改来纠正。...您必须添加“ Name [de] =德语翻译” ....并为每个命令执行此操作。
— nik90 2011年

5
确保OnlyShowIn行中列出Unity:OnlyShowIn=GNOME;Unity; 直到我抓到这为止,它对我才起作用,因为原始文件仅列出了GNOME。
— keithjgrant

2
如果“ OnlyShowIn = GNOME; Unity;” 行未删除,您的“主文件夹启动器图标”将仅启动应用程序,而不对其进行控制(youtu.be/oS52pYNFZ6I)。将显示一个第二个图标,它负责控制部分。我学到了艰辛的道路,直到这个设定我的权利askubuntu.com/questions/35024/...
— B-AK

49

SSH启动器

快速访问您喜欢的SSH服务器列表。

SSH快速清单

  1. 在终端类型中使用gedit创建一个新文件:

    gedit ~/.local/share/applications/ssh-launcher.desktop
    
  2. 将此文本复制并粘贴到上述文件中:

    [桌面输入]
    版本= 1.0
    名称=远程服务器
    Comment =登录到我的服务器
    Exec = gnome-terminal --disable-factory --sm-client-disable --class = remoteserver -x ssh -t minibox.local 
    终端=假
    X-MultipleArgs = false
    类型=应用
    图标=实用程序终端
    StartupNotify = true
    StartupWMClass =远程服务器
    X-Ayatana-Desktop-Shortcuts =服务器1;
    
    [Server1快捷方式组]
    名称= SSH进入minibox.local
    Exec = gnome-terminal --disable-factory --sm-client-disable --class = remoteserver -x ssh -t minibox.local
    TargetEnvironment =团结
    
    Comment =您可以创建更多这些。只需在X-Ayatana-Desktop-Shortcuts中添加“ Server2”,“ Server3”等,然后将域名(在本例中为“ minibox.local”)更改为服务器的名称。您还会注意到,默认操作(当您单击启动器中的图标时)是SSH到minibox.local-您需要将其更改为最常用的服务器。
    
  3. 通过导航到Nautilus中的〜/ .local / share / applications /,将其拖放到启动器上。

来源1,来源2


另请参阅:askubuntu.com/questions/35488/…从~/.ssh/config
— con-f-use

1
目前,这实际上不能正常工作。gnome-terminal窗口出现在普通的gnome-terminal启动器图标下,而不是ssh-launcher图标。仅当您从快速列表启动第一个远程连接时,才会发生这种情况。如果您用鼠标左键打开一个窗口,它将正常工作,并且随后的所有窗口也将正常工作。
— 2012年

47

Ubuntu软件中心快速列表

通过软件属性UI快速添加PPA,并更新源。

软件经理快速清单

  1. 使用Terminal将原始.desktop文件复制到您的主文件夹中:

    cp /usr/share/applications/ubuntu-software-center.desktop ~/.local/share/applications/

  2. 使用gedit 打开文件进行编辑:

    gedit ~/.local/share/applications/ubuntu-software-center.desktop

  3. 在文件底部添加以下内容。这应该在X-Ubuntu-Gettext-Domain = software-center行之后输入

。

X-Ayatana-Desktop-Shortcuts=SoftwareUpdates;SoftwareProperties;Synaptic;

[SoftwareUpdates Shortcut Group]  
Name=Update Manager  
Exec=update-manager -c  
OnlyShowIn=Unity

[SoftwareProperties Shortcut Group]  
Name=Add/Edit PPAs  
Exec=gksu software-properties-gtk %u  
OnlyShowIn=Unity

[Synaptic Shortcut Group]  
Name=Synaptic Software Manager  
Exec=gksu synaptic %u  
OnlyShowIn=Unity

这很棒!!
— 弗罗林

很酷-如果您想要更多控制权,想必也可以添加一行来启动Synaptic?看来我应该能够按照您的模式进行操作。
— 肖恩·菲茨帕特里克

:) ..是的。此代码的最新更新有它!在easylinuxos.sourceforge.net上试用Easylinux OS 。
— Ubuntuser 2011年

伙计们,在最后一次编辑[SoftwareUpdates Shortcut Group]不在X-Ayatana-Desktop-Shortcuts行中,因此“更新管理器”将不会显示在列表中。以防万一其他人可能会感到困惑,为什么它错过了榜首。
— Marky

我可以在Oneiric 11.10中确认这项工作。
— jart 2011年

42

主页图标快速列表(从书签自动更新)

这是一个小的shell脚本,它会使用所有书签更新您的“家庭快速列表”。无需手动操作。它读取您的书签文件并从中创建菜单项。它还添加了“ Root Filemanager”菜单项。

运行中的快速列表的屏幕截图

  1. 将下面列出的脚本复制到一个空文件中,然后将其放入您的脚本文件夹(我们假设是,~/bin/并且您选择的脚本名称是unityhome.bash)。
  2. 运行脚本一次以添加条目:

    bash ~/bin/unityhome.bash
    
  3. 您可以选择让cron偶尔为您运行一次脚本。要将其添加到cron中,请在外壳中键入follwing命令:

    crontab -e
    

    将打开一个编辑器。那里添加一行像:

    @reboot /bin/bash/ $HOME/bin/unityhome.bash > /dev/null 2>&1
    

    如果不执行此步骤,则要更新快速清单,则每次更改nautilus书签时都必须手动运行脚本。

  4. 更改仅在您下次登录时或在Alt + F2之后生效

    unity --replace
    

    这样吧。注意:请勿unity --replace在终端中运行。如果您关闭该终端,它将破坏它的统一性。

  5. 欣赏并查看gnome-terminal的类似脚本,该脚本可解析ssh书签(在中~/.ssh/config)。

脚本:

这是脚本:

#!/bin/bash
# tabsize: 4, encoding: utf8
#
# © 2011 con-f-use@gmx.net. Use permitted under MIT license:
#     http://www.opensource.org/licenses/mit-license.php
# 
# CONTRIBUTORS: Chris Druif <cyber.druif@gmail.com>
#               Scott Severance <http://www.scottseverance.us/>
#               jacopoL <jacopo.jl@gmail.com>
# 
# This script updates the unity quicklist menu for nautilus to contain the user
# bookmarks. The updates will have efect after unity is restarted (either on
# the next login or by invoking 'unity --replace').

# location of template and unity bar launchers
nautempl="/usr/share/applications/nautilus-home.desktop"
target="$HOME/.local/share/applications/nautilus-home.desktop"
bookmarks="$HOME/.gtk-bookmarks"

# backup if file already exists
if [ -e "$target" ]; then
    echo "Creating backup of: $target."
    mv -n "$target" "$target.bak"
fi

# copy template
cp "$nautempl" "$target"

if ! grep -q 'OnlyShowIn=.*Unity' "$target"; then # add only if not already present
    sed -i "s/\(OnlyShowIn=.*\)/\1Unity;/" "$target"
fi

# due to a bug in Unity (Ubuntu 11.10+) we will have to completely remove the OnlyShowIn line:
# https://bugs.launchpad.net/ubuntu/+source/unity/+bug/842257/comments/6
sed -i '/^OnlyShowIn=/d' "$target"

if ! grep -q 'X-Ayatana-Desktop-Shortcuts=' "$target"; then # add only if not already present
    echo -e "\nX-Ayatana-Desktop-Shortcuts=\n" >> "$target"
else
    echo >> "$target"
fi
bmcount=0
while read bmline; do
    bmcount=$(($bmcount+1))     # number of current bookmark
    bmname=${bmline#*\ }        # name of the bookmark
    bmpath=${bmline%%\ *}       # path the bookmark leads to
    # deal with bookmarks that have no name
    if [ "$bmname" = "$bmpath" ]; then
        bmname=${bmpath##*/}
    fi
    # fix spaces in names and paths
    bmname="$(echo "$bmname" | sed 's/%20/ /g')"
    bmpath="$(echo "$bmpath" | sed 's/%20/ /g')"
    # fix accents in names and paths (for french users)
    bmname="$(echo "$bmname" | python -c 'import sys,urllib;sys.stdout.write(urllib.unquote(sys.stdin.read()))')"
    bmpath="$(echo "$bmpath" | python -c 'import sys,urllib;sys.stdout.write(urllib.unquote(sys.stdin.read()))')"
    # extend shortcut list with current bookmark, prepending a ; if needed
    sed -i "s/\(X-Ayatana-Desktop-Shortcuts=\(.*;$\|$\)\)/\1Scg${bmcount};/
            t
            s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1;Scg${bmcount};/" "$target"
    # write bookmark information
    cat - >> "$target" <<EOF

[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF
done < "$bookmarks"

# Add a root file manager entry
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1RootFM;/" "$target"
cat - >> "$target" <<EOF

[RootFM Shortcut Group]
Name=Root
Exec=gksudo nautilus
TargetEnvironment=Unity
EOF

exit 0

改进:不要重复“主文件夹”和“用户名”

如果您不想让两项都针对您的主文件夹(快速列表底部的“主文件夹”和可点击的用户名),则可以替换以下代码:

    # write bookmark information
    cat - >> "$target" <<EOF

[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF
done < "$bookmarks"

通过以下代码:

    # write bookmark information
    if [ "file://$HOME" != "$bmpath" ]; then
    cat - >> "$target" <<EOF

[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF
    fi
done < "$bookmarks"

2
基本上同样的事情存在,作为一个指标小程序的统一:askubuntu.com/questions/30334/list-of-application-indicators/...
— CON-F使用的

1
不要忘了转到〜/ .local / share / applications将文件nautilus-home.desktop拖到Unity栏中。
— Exeleration-G 2011年

该脚本也适用于Thunar。在上面刚刚替换nautilus-home.desktop用Thunar.desktop,并一路下跌gksudo nautilus的gksudo thunar
— MarkovCh1

1
现在,该脚本可以处理包含空格的名称和路径。
— Scott Severance

太好了,谢谢,我还有一点要改进的地方(至少对我来说):是否可以将您的快捷列表设置为不在启动器上打开新图标?一个非常好。
— Eugenio Perea

38

LibreOffice快速清单

这将为LibreOffice Start Center启动器创建一个快速列表。

LibreOffice快速清单

  1. 将原始.desktop文件复制到主目录中以进行编辑:

    cp /usr/share/applications/libreoffice-startcenter.desktop ~/.local/share/applications
    
  2. 在gedit中打开:

    gedit ~/.local/share/applications/libreoffice-startcenter.desktop
    
  3. 编辑MimeType行:

    找到以下行:

    MimeType=application/vnd.openofficeorg.extension;
    

    替换为:

    MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;
    
  4. 突出显示并复制下面的文本,然后将其粘贴到.desktop文件的底部:

    X-Ayatana-Desktop-Shortcuts=Writer;Impress;Calc;Math;Draw
    
    [Writer Shortcut Group]
    Name=Writer
    Exec=libreoffice -writer %U
    TargetEnvironment=Unity
    
    [Impress Shortcut Group]
    Name=Impress
    Exec=libreoffice -impress %U
    TargetEnvironment=Unity
    
    [Calc Shortcut Group]
    Name=Calc
    Exec=libreoffice -calc %U
    TargetEnvironment=Unity
    
    [Math Shortcut Group]
    Name=Math
    Exec=libreoffice -math %U
    TargetEnvironment=Unity
    
    [Draw Shortcut Group]
    Name=Draw
    Exec=libreoffice -draw %U
    TargetEnvironment=Unity
    

    注意:对于LibreOffice 3.4和3.4.1:在Exec中;libreoffice必须用`libreoffice3.4'代替,但是似乎在Oneiric中我们不需要添加版本号。我正在从Oneiric中对其进行测试,并且使默认设置运行良好,添加版本号使快速列表无法使用

  5. 导航到〜/ .local / share / applications并将LibreOffice Start Center桌面文件拖放到启动器上。

可以对LibreOffice Writer启动器进行类似的修改。

资源


我添加了如下所示
— Cas

不幸的是,这不再适用于LibreOffice 3.4
— scouser73 2011年

1
对于LibreOffice 3.4和3.4.1: 在Exec中;libreoffice必须用替换libreoffice3.4。
— Binarylife

33

终端机快速清单

终端img(更新)

  1. 使用Terminal 将原始的Terminal启动器复制到您的主目录中:

    cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applications
    
  2. 使用gedit仍然使用终端打开文件:

    gedit ~/.local/share/applications/gnome-terminal.desktop
    
  3. 从文件中找到以下行:

    OnlyShowIn=GNOME;
    

    将以上行替换为:

    OnlyShowIn=GNOME;Unity;
    
  4. 将此文本添加到文件底部,然后保存并关闭它:

    X-Ayatana-Desktop-Shortcuts=NewWindow;NewTab;Top;Root;
    
    [NewWindow Shortcut Group]
    Name=New Window
    Exec=gnome-terminal --window
    TargetEnvironment=Unity
    
    [NewTab Shortcut Group]
    Name=New Tab
    Exec=xdotool windowfocus gnome-terminal key ctrl+shift+t
    TargetEnvironment=Unity
    
    [Root Shortcut Group]
    Name=Root Terminal
    Exec=gksudo gnome-terminal
    TargetEnvironment=Unity
    
    [Top Shortcut Group]
    Name=Top
    Exec=gnome-terminal --command top
    TargetEnvironment=Unity
    
  5. 要启用“新建选项卡”选项,您需要从Ubuntu软件中心安装xdotool 安装xdotool

  6. 关闭所有终端窗口,右键单击其启动器图标,然后取消选中“保持启动器”

  7. 打开Dash,运行Terminal,出现带有快速列表的新启动器。


1
新的标签快捷方式将打开一个新窗口。该命令是正确的...
— Matteo Pagliazzi,2011年

@Cas:我遇到了同样的问题,所以我将研究一个解决方案。
— 罗兰迪克(RolandiXor)

做了一些测试,这似乎是gnome-terminal本身的错误。
— 罗兰迪克(RolandiXor)

1
我已经找到了使用bash脚本和xdotool的解决方案:DI只是对其进行测试,然后将添加说明。
— Cas

@Cas:\ o /甜!
— RolandiXor

32

Firefox快速清单

在启动器中添加方便的Firefox选项。

在此处输入图片说明

  1. 将您的原始.desktop文件复制到主目录中以进行编辑:

    cp /usr/share/applications/firefox.desktop ~/.local/share/applications
    
  2. 在gedit中打开:

    gedit ~/.local/share/applications/firefox.desktop 
    
  3. 查找并编辑以下行:

    X-Ayatana-Desktop-Shortcuts=NewWindow;
    

    匹配此行:

    X-Ayatana-Desktop-Shortcuts=NewWindow;SafeMode;ProfileManager;
    
  4. 将此文本添加到.desktop 的底部,然后保存文件:

    [SafeMode Shortcut Group]
    Name=Open Firefox in safe mode
    Exec=firefox -safe-mode
    TargetEnvironment=Unity
    
    [ProfileManager Shortcut Group]
    Name=Firefox Profile Manager
    Exec=firefox -ProfileManager
    TargetEnvironment=Unity
    

Firefox启动器对我来说有点“笨拙”。这会发生在别人身上吗?与其他文件不同,对其.desktop文件进行编辑不会实时更新更改。如果要查看更改,请关闭FF,将其从启动器中删除,然后将上面已编辑的.desktop文件拖到启动器中。有时,即使FF正在运行,该动作也会导致奇怪的行为,因为它不会在启动器中反映出来。快速解决方案是注销/登录。
— Marky

31

Google Services启动器

一个自定义启动器,用于gmail,日历等常见服务,撰写新邮件。

在此处输入图片说明

  1. 通过打开文本编辑器创建一个新文件,并将以下文本粘贴到其中:

    [Desktop Entry]
    Version=1.0
    Name=Google Services
    Exec=xdg-open https://accounts.google.com/
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=chrome-https___docs.google.com_
    Categories=Network;WebBrowser;
    StartupNotify=true
    StartupWMClass=docs.google.com
    
    X-Ayatana-Desktop-Shortcuts=Plus;Inbox;Compose;Voice;Contacts;Calendar;Documents;Photos;Maps;Sites;Reader;Bookmarks
    Name[en_US]=Google Services (Gmail)
    [Plus Shortcut Group]
    Name=Plus
    Exec=xdg-open 'https://plus.google.com/u/0/'
    TargetEnvironment=Unity
    [Inbox Shortcut Group]
    Name=InBox
    Exec=xdg-open 'https://mail.google.com/mail/u/0/?shva=1#inbox'
    TargetEnvironment=Unity
    [Compose Shortcut Group]
    Name=Compose
    Exec=xdg-open 'https://mail.google.com/mail/?shva=1#compose'
    TargetEnvironment=Unity
    [Voice Shortcut Group]
    Name=Voice
    Exec=xdg-open 'https://www.google.com/voice/b/0?pli=1#inbox'
    TargetEnvironment=Unity
    [Contacts Shortcut Group]
    Name=Contacts
    Exec=xdg-open 'https://www.google.com/contacts'
    TargetEnvironment=Unity
    [Calendar Shortcut Group]
    Name=Calendar
    Exec=xdg-open 'https://calendar.google.com'
    TargetEnvironment=Unity
    [Documents Shortcut Group]
    Name=Documents
    Exec=xdg-open https://docs.google.com/
    TargetEnvironment=Unity
    [Photos Shortcut Group]
    Name=Photos
    Exec=xdg-open 'https://plus.google.com/u/0/photos'
    TargetEnvironment=Unity
    [Maps Shortcut Group]
    Name=Maps
    Exec=xdg-open 'http://maps.google.com/maps?hl=en&tab=ml'
    TargetEnvironment=Unity
    [Sites Shortcut Group]
    Name=Sites
    Exec=xdg-open 'https://sites.google.com/?tab=m3&pli=1'
    TargetEnvironment=Unity
    [Reader Shortcut Group]
    Name=Reader
    Exec=xdg-open 'https://www.google.com/reader/view/?hl=en&tab=my'
    TargetEnvironment=Unity
    [Bookmarks Shortcut Group]
    Name=Bookmarks
    Exec=xdg-open 'https://www.google.com/bookmarks/l'
    TargetEnvironment=Unity
    
  2. 使用以下文件夹位置和名称保存文件:

     ~/.local/share/applications/google-services-launcher.desktop
    
  3. 通过~/.local/share/applications/在文件管理器中导航到,将文件拖放到启动 器上。

您可以在此处下载图标。

资源


1
为什么使用Google-chrome?我想这将是更好地使用默认的浏览器,通过执行gnome-www-browser link
— 拉法尔Cieślak

这是一个Google chrome桌面应用程序,仅用于检查邮件和日历。您当然可以创建.desktop快捷方式,以在默认浏览器中启动这些服务。
— nik90 2011年

25

女妖快速清单

女妖快速清单

  1. 将Banshee启动器复制到您的主目录,在终端中粘贴以下内容:

    cp /usr/share/applications/banshee.desktop ~/.local/share/applications
    
  2. 打开此新文件进行编辑:

    gedit ~/.local/share/applications/banshee.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到文件底部。

    X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;Preferences
    
    [Play Shortcut Group]
    Name=Play
    Exec=banshee --play
    TargetEnvironment=Unity
    
    [Pause Shortcut Group]
    Name=Pause
    Exec=banshee --pause
    TargetEnvironment=Unity
    
    [Stop Shortcut Group]
    Name=Stop
    Exec=banshee --stop
    TargetEnvironment=Unity
    
    [Previous Shortcut Group]
    Name=Previous
    Exec=banshee --previous
    TargetEnvironment=Unity
    
    [Next Shortcut Group]
    Name=Next
    Exec=banshee --next
    TargetEnvironment=Unity
    
    [Preferences Shortcut Group]
    Name=Preferences
    Exec=banshee --show-preferences
    TargetEnviroment=Unity
    

来源:1,2


我对此没有多大意义,我们有声音菜单!
— 8128年

24

Google文件快速清单

在此处输入图片说明

  1. 使用以下命令创建一个新文件:

    gedit ~/.local/share/applications/gdocs.desktop
    
  2. 粘贴以下文本:

    [Desktop Entry]
    Version=1.0
    Name=Google Docs
    Exec=xdg-open https://docs.google.com/
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=chrome-https___docs.google.com_
    Categories=Network;WebBrowser;
    StartupNotify=true
    StartupWMClass=docs.google.com
    
    X-Ayatana-Desktop-Shortcuts=Doc;Spreadsheet;Presentation;Drawing
    
    [Doc Shortcut Group]
    Name=New Document
    Exec=xdg-open https://docs.google.com/?action=newdoc
    TargetEnvironment=Unity
    
    [Spreadsheet Shortcut Group]
    Name=New Spreadsheet
    Exec=xdg-open https://spreadsheets.google.com/ccc?new
    TargetEnvironment=Unity
    
    [Presentation Shortcut Group]
    Name=New Presentation
    Exec=xdg-open https://docs.google.com/?action=new_presentation
    TargetEnvironment=Unity
    
    [Drawing Shortcut Group]
    Name=New Drawing
    Exec=xdg-open https://docs.google.com/drawings/create?hl=en
    TargetEnvironment=Unity
    

    请注意,这会在您的默认浏览器中打开。对于铬/ IUM全屏应用程序,查找和替换xdg-open用 chromium-browser和https:用 --app=https:。

  3. 将gdocs.desktop从〜/ .local / share / applications /拖到启动器中


很棒!除了图标没有显示得那么好之外,我只是在一个正方形中得到一个问号。还需要什么才能获得漂亮的图标?
— 罗德

嗯,我不确定...您安装了chrome / ium吗?我从铬生成的启动器中为Google docs复制了“ Icon =“属性,因此它可能依赖于此。
— Dorkus1218

您可以下载任何的这些,并在启动程序文件的顶部到该文件(/home/<user>/.icons/gdocs.png或其他)点“图标=”场
— Dorkus1218

24

添加/删除工作空间行/列的快速列表

预习

使用Unity图标/快速列表轻松添加或删除虚拟桌面或工作区,该选项目前在Ubuntu中很可能会丢失。唯一的选择似乎是进入gconf-editor并手动更改它们。
理想情况下,这将使其进入Workspace Switcher。

它依靠脚本来提取当前的行数和列数,并在再次设置之前添加或减去一个。它还会检查它是否不低于一行或一列。

  1. 在终端类型中使用gedit创建一个新的.desktop文件:

    gedit ~/.local/share/applications/workspaces.desktop
    
  2. 将此文本复制并粘贴到新创建的文件中:

    [Desktop Entry]
    Version=1.0
    Name=Workspaces
    Comment=Change Workspace Numbers
    GenericName=Workspace Editor
    Terminal=false
    Type=Application
    Icon=desktop
    X-Ayatana-Desktop-Shortcuts=AddRow;RmRow;AddColumn;RmColumn;
    
    [AddRow Shortcut Group]
    Name=Add Row
    Exec=workspaces-shortcuts rows +
    TargetEnvironment=Unity
    
    [AddColumn Shortcut Group]
    Name=Add Column
    Exec=workspaces-shortcuts cols +
    TargetEnvironment=Unity
    
    [RmRow Shortcut Group]
    Name=Remove Row
    Exec=workspaces-shortcuts rows -
    TargetEnvironment=Unity
    
    [RmColumn Shortcut Group]
    Name=Remove Column
    Exec=workspaces-shortcuts cols -
    TargetEnvironment=Unity
    
  3. 在终端类型中使用gedit创建一个新脚本:

    gksudo gedit /usr/bin/workspaces-shortcuts
    

    注意:使用gksudo的原因是我们将保存它的位置并且是图形应用程序。

  4. 将此文本复制并粘贴到新创建的文件中:

    #!/bin/bash
    
    case $1 in 
    rows)t=v;;
    cols)t=h;;
    esac;
    
    check=`gconftool-2 --get /apps/compiz-1/general/screen0/options/${t}size`
    
    if [[ ! ($2 = - && $check < 2 ) ]]
    then
        [[ $2 = [-+] ]] && gconftool-2 --set /apps/compiz-1/general/screen0/options/${t}size --type int $(( $check $2 1 ))
    fi
    
  5. 太使脚本可执行,在终端类型:

    sudo chmod a+x /usr/bin/workspaces-shortcuts

  6. 通过导航到Nautilus中的〜/ .local / share / applications /,将其拖放到启动器上。

    通过在.desktop文件中更改以下行,可以轻松完成排序:

    X-Ayatana-Desktop-Shortcuts=AddRow;RmRow;AddColumn;RmColumn;
    

    至

    X-Ayatana-Desktop-Shortcuts=AddRow;AddColumn;RmRow;RmColumn;
    

    例如。


23

铬快速清单

铬

  1. 将Chromium启动器复制到您的主目录,在终端中粘贴以下内容:

    cp /usr/share/applications/chromium-browser.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/chromium-browser.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到文件底部。

    X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito;
    
    [NewWindow Shortcut Group]
    Name=New Window
    Exec=chromium-browser
    TargetEnvironment=Unity
    
    [Incognito Shortcut Group]
    Name=New incognito window
    Exec=chromium-browser --incognito
    TargetEnvironment=Unity  
    

资源


2
记录在案,每天铬制PPA的铬包装都预先配置了Unity快速列表。
— Marius Gedminas

也作记录;现在在Chrome稳定版中。
— 但丁·阿什顿

21

Gedit快速清单

Gedit

  1. 使用终端将“ Gedit”启动器文件复制到您的主目录

    cp /usr/share/applications/gedit.desktop ~/.local/share/applications
    
  2. 在gedit中打开文件进行编辑:

    gedit ~/.local/share/applications/gedit.desktop
    
  3. 加入这个文本的底部的文件,并替换的<username>文字,以符合您的个人文件夹的用户名,然后保存并关闭:

    X-Ayatana-Desktop-Shortcuts=OpenDoc;OpenDocRoot;
    
    [OpenDoc Shortcut Group]
    Name=Open file...
    Exec=/home/<username>/.local/share/applications/scripts/gedit-shortcuts normal-mode
    TargetEnvironment=Unity
    
    [OpenDocRoot Shortcut Group]
    Name=Open file as root...
    Exec=/home/<username>/.local/share/applications/scripts/gedit-shortcuts root-mode
    TargetEnvironment=Unity
    
  4. 在〜/ .local / share / applications文件夹中创建一个“脚本”文件夹:

    mkdir ~/.local/share/applications/scripts
    
  5. 使用gedit创建脚本文件“ gedit-shortcuts”:

    gedit ~/.local/share/applications/scripts/gedit-shortcuts
    
  6. 将此文本添加到文件中,然后保存并关闭:

    #!/bin/bash
    
    case $1 in
    normal-mode) gedit $(zenity --title='Open file...' --file-selection);;
    root-mode) gksudo -u root -m "Running Gedit as user root allow you to modify some essential files of your system" "bash -c 'gedit \$(zenity --title=\'Open file as user root...\' --file-selection)'";;
    esac
    
  7. 使文件可执行:

    chmod +x ~/.local/share/applications/scripts/gedit-shortcuts
    
  8. 将gedit.desktop文件从nautilus中的〜/ .local / share / applications拖放到Unity Launcher Bar


由于桌面输入代码中存在错误,因此请在发布说明之前进行测试。
— Cas

抱歉,我不在我的ubuntu机器上,但是在工作,所以我写下了昨晚做过的事(因此不是复制/粘贴),所以可能在一两个学期就出现错误了:(
— Winael

21

Filezilla FTP快速清单

使用Filezilla启动器快速访问您喜欢的FTP服务器。

Filezilla快速清单

制作FileZille快速列表有两种选择。您可以在站点管理器中链接到站点(安全选项);或者,您可以直接在.desktop文件中输入连接信息(没有站点管理器的选项)。

链接到站点管理器(安全选项)

  1. 将Filezilla启动器复制到您的主目录,在终端中粘贴以下内容:

    cp /usr/share/applications/filezilla.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/filezilla.desktop
    
  3. 在.desktop文件底部添加以下文本,为要链接的每个站点添加一个“快捷方式组”。在Exec参数中,您应该将FTP站点的路径放在站点管理器中。2°快捷方式直接打开Filezilla Site Manager。

    X-Ayatana-Desktop-Shortcuts=Server1;sitemanager
    
    [Server1 Shortcut Group]
    Name=Site Name
    Exec=filezilla -c "0/Folder Name/Site Name"
    TargetEnvironment=Unity
    
    [sitemanager Shortcut Group]
    Name=Site Manager
    Exec=filezilla -s
    TargetEnvironment=Unity
    

有关详细信息,您应该查看Filezilla Wiki上的“ 命令行参数”页面。

资源


直接输入连接详细信息(快速但不安全的选项)

注意:此选项存在安全问题,因为您将以纯文本格式存储密码。仅在知道风险的情况下才执行此操作,这是一种非常“骇人听闻的”处理方式。如果在FileZilla中使用站点管理器,请使用上面的选项,该选项使用已经存储在Filezilla站点管理器配置中的信息。

  1. 将Filezilla启动器复制到您的主目录,在终端中粘贴以下内容:

    cp /usr/share/applications/filezilla.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/filezilla.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到.desktop文件的底部。编辑FTP服务器详细信息以匹配您自己的详细信息,然后保存文件。

    X-Ayatana-Desktop-Shortcuts=Server1;
    
    [Server1 Shortcut Group]
    Name=FTP into test server 
    Exec=filezilla ftp://test:test@ftp.secureftp-test.com:21
    TargetEnvironment=Unity
    

    您需要分别使用用户名/密码更改“ test:test”,并使用ftp服务器的域更改“ ftp.secureftp-test.com”。

资源


合并到其他FileZilla答案中以使更安全的选择引起更多关注。
— 洛德(Lode)

20

灯泡快速清单

屏幕截图

  1. 打开一个新文件:

    gedit ~/.local/share/applications/lamp.desktop
    
  2. 复制下面的文字

    [Desktop Entry]
    Name=LAMP
    GenericName=LAMP
    X-GNOME-FullName=LAMP
    Comment=Open services of your LAMP server
    Exec=gksu service apache2 start && gksu service mysql start
    Icon=emblem-web
    Terminal=false
    Type=Application
    StartupNotify=true
    
    X-Ayatana-Desktop-Shortcuts=Start;Stop;Restart
    
    
    [Start Shortcut Group]
    Name=Start
    Exec=gksu service apache2 start && gksu service mysql start
    TargetEnvironment=Unity
    
    [Stop Shortcut Group]
    Name=Stop
    Exec=gksu service apache2 stop && gksu service mysql stop
    TargetEnvironment=Unity
    
    [Restart Shortcut Group]
    Name=Restart
    Exec=gksu service apache2 restart && gksu service mysql restart
    TargetEnvironment=Unity
    
  3. 通过导航到Nautilus中的〜/ .local / share / applications /,将其拖放到启动器上。


20

Rhythmbox快速清单

屏幕截图

  1. 将Rhythmbox启动器复制到您的主目录,在Terminal中粘贴以下内容:

    cp /usr/share/applications/rhythmbox.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/rhythmbox.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到文件底部:

    X-Ayatana-Desktop-Shortcuts=Play;Pause;Previous;Next;Stop
    
    [Play Shortcut Group]  
    Name=Play  
    Exec=rhythmbox-client --play  
    TargetEnvironment=Unity  
    
    [Pause Shortcut Group]  
    Name=Pause  
    Exec=rhythmbox-client --pause  
    TargetEnvironment=Unity  
    
    [Previous Shortcut Group]  
    Name=Previous  
    Exec=rhythmbox-client --previous  
    TargetEnvironment=Unity  
    
    [Next Shortcut Group]  
    Name=Next  
    Exec=rhythmbox-client --next  
    TargetEnvironment=Unity  
    
    [Stop Shortcut Group]  
    Name=Stop  
    Exec=rhythmbox-client --stop  
    TargetEnvironment=Unity
    
  4. 保存文件。


@罗兰:固定。
— 内森·奥斯曼

17

Google Chrome浏览器快速列表

chrome快速清单

  1. 将Google Chrome启动器复制到您的主目录,在终端中粘贴以下内容:

    cp /opt/google/chrome/google-chrome.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/google-chrome.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到文件底部。

    X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito;
    
    [NewWindow Shortcut Group]
    Name=New Window
    Exec=google-chrome
    TargetEnvironment=Unity
    
    [Incognito Shortcut Group]
    Name=New incognito window
    Exec=google-chrome --incognito
    TargetEnvironment=Unity
    

资源


5
现在,这是稳定版本中的默认设置。
— 但丁·阿什顿

17

雷鸟快速清单

雷鸟拉努彻

  1. 将启动器文件复制到您的主目录:

    cp /usr/share/applications/thunderbird.desktop ~/.local/share/applications/thunderbird.desktop

  2. 使用文本编辑器打开文件

    gedit ~/.local/share/applications/thunderbird.desktop

  3. 在文件底部添加文本并保存。

    X-Ayatana-Desktop-Shortcuts=Compose;AddressBook;ProfileManager;

    [Compose Shortcut Group]
    Name=Compose
    Exec=thunderbird -compose
    TargetEnvironment=Unity
    
    [AddressBook Shortcut Group]
    Name=Address Book
    Exec=thunderbird -addressbook
    TargetEnvironment=Unity
    
    [ProfileManager Shortcut Group]
    Name=Profile Manager
    Exec=thunderbird -ProfileManager
    TargetEnvironment=Unity
    

16

地雷清单

从启动器快速启动Mine的新游戏。

地雷快速清单

  1. 将Mines启动器复制到您的主目录,在Terminal中粘贴以下内容:

    cp /usr/share/applications/gnomine.desktop ~/.local/share/applications
    
  2. 打开此文件进行编辑:

    gedit ~/.local/share/applications/gnomine.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到.desktop文件的底部。

    X-Ayatana-Desktop-Shortcuts=Small;Medium;Large;
    
    [Small Shortcut Group]
    Name=New Game (Small)
    Exec=gnomine -f 0
    TargetEnvironment=Unity
    
    [Medium Shortcut Group]
    Name=New Game (Medium)
    Exec=gnomine -f 1
    TargetEnviroment=Unity
    
    [Large Shortcut Group]
    Name=New Game (Large)
    Exec=gnomine -f 2
    TargetEnviroment=Unity
    

资源


15

DéjàDup快速清单

DéjàDup快速清单

  1. 使用Terminal 将DéjàDup启动器文件复制到您的主目录:

    cp /usr/share/applications/deja-dup.desktop ~/.local/share/applications
    
  2. 打开文件以在文本编辑器中进行编辑:

    gedit ~/.local/share/applications/deja-dup.desktop
    
  3. 将此文本添加到文件底部,然后关闭并保存:

    X-Ayatana-Desktop-Shortcuts=BackupNow;
    
    [BackupNow Shortcut Group]
    Name=Backup Now
    Exec=deja-dup --backup
    TargetEnvironment=Unity
    
  4. 从启动器中删除DéjàDup图标(取消选中“ 保持在启动器”),然后从Dash中打开该应用程序,新的快捷列表应会出现,您可以重新选中“ 保持在启动器”。


现在这是默认版本。
— jrg

14

Opera快速清单

在此处输入图片说明

  1. 将原始.desktop文件复制到主目录中以进行编辑:

    cp /usr/share/applications/opera-browser.desktop ~/.local/share/applications
    
  2. 打开终端并输入以下内容:

    gedit ~/.local/share/applications/opera-browser.desktop
    
  3. 在文件底部,添加以下行,然后保存并关闭:

    X-Ayatana-Desktop-Shortcuts=NewTab;NewPrivateTab;NewWindow;Mail;
    
    [NewTab Shortcut Group]
    Name=New Tab
    Exec=opera -newtab
    TargetEnvironment=Unity
    
    [NewPrivateTab Shortcut Group]
    Name=New Private Tab
    Exec=opera -newprivatetab
    TargetEnvironment=Unity
    
    [NewWindow Shortcut Group]
    Name=New Window
    Exec=opera -newwindow
    TargetEnvironment=Unity
    
    [Mail Shortcut Group]
    Name=Mail
    Exec=opera -mail
    TargetEnvironment=Unity
    
  4. 如果尚未将图标添加到启动器,则您的快速列表现在应该可以使用了。

温馨提示:

如果需要,还可以通过替换邮件的Exec命令(例如),使Mail在特定的地址处打开新标签页:

Exec=opera -newtab "http://www.gmail.com/"

源,1,2,3


截至2011年5月7日:kyleabaker.com/2011/05/07/unity-opera包含:下载进度,打开标签页数,显示紧急度,大量的快速列表。
— Rinzwind

请参阅下面的Opera快速列表(第2部分)以及更多内容。
— Rinzwind

14

Ubuntu One快速清单

连接到服务器,断开与服务器的连接,并快速停止Ubuntu One syncdaemon。

在此处输入图片说明

  1. 将原始的Ubuntu One Control Panel图标复制到您的主目录以进行编辑:

    cp /usr/share/applications/ubuntuone-control-panel-gtk.desktop ~/.local/share/applications/
    
  2. 使用gedit 打开文件进行编辑:

    gedit ~/.local/share/applications/ubuntuone-control-panel-gtk.desktop
    
  3. 突出显示并复制下面的文本,然后将其粘贴到.desktop文件的底部:

    X-Ayatana-Desktop-Shortcuts=Connect;Disconnect;Quit
    
    [Connect Shortcut Group]
    Name=Connect
    Exec=u1sdtool --connect
    TargetEnvironment=Unity
    
    [Disconnect Shortcut Group]
    Name=Disconnect
    Exec=u1sdtool --disconnect
    TargetEnvironment=Unity
    
    [Quit Shortcut Group]
    Name=Stop Ubuntu One
    Exec=u1sdtool --quit
    TargetEnvironment=Unity
    

1
谢谢您-有时同步可能会令人烦恼(例如,编辑和构建LaTeX文档),这提供了一种简便的方法来临时禁用U1,而无需打开程序。
— 肖恩·菲茨帕特里克

14

传输快速清单

在此处输入图片说明

  1. 将全局transmission-gtk.desktop文件复制到您的主目录:

    cp /usr/share/applications/transmission-gtk.desktop ~/.local/share/applications
    
  2. 编辑文件:

    gedit ~/.local/share/applications/transmission-gtk.desktop
    
  3. 将以下代码粘贴到文件的底部:

    X-Ayatana-Desktop-Shortcuts=Pause All;Start All;
    
    [Pause All Shortcut Group]
    Name=Pause All
    Exec=transmission-remote -tall --stop
    TargetEnvironment=Unity
    
    [Start All Shortcut Group]
    Name=Start All
    Exec=transmission-remote -tall --start
    TargetEnvironment=Unity
    

您还可以使用https://github.com/kriomant/transmission-unity-launcher中的脚本显示torrent的下载数量和总进度指示器


13

Firefox快速清单替代

将您喜欢的网站的列表放在Firefox快速列表中。

最终结果

  1. 将firefox.desktop复制到家里。

    cp /usr/share/applications/firefox.desktop ~/.local/share/applications
    
  2. 打开进行编辑

    gedit ~/.local/share/applications/firefox.desktop
    
  3. 添加到底部,将网站编辑为您的收藏夹

    X-Ayatana-Desktop-Shortcuts=OMGUbuntu;WebUpd8;UbuntuForums;AskUbuntu;UbuntuLaunchpad;NewWindow
    [OMGUbuntu Shortcut Group]
    Name=OMG! Ubuntu
    Exec=firefox -new-window 'http://www.omgubuntu.co.uk/'
    TargetEnvironment=Unity
    
    [WebUpd8 Shortcut Group]
    Name=WebUpd8
    Exec=firefox -new-window 'http://www.webupd8.org/'
    TargetEnvironment=Unity
    
    [UbuntuForums Shortcut Group]
    Name=Ubuntu Forums
    Exec=firefox -new-window 'http://ubuntuforums.org'
    TargetEnvironment=Unity
    
    [AskUbuntu Shortcut Group]
    Name=Ask Ubuntu
    Exec=firefox -new-window 'http://askubuntu.com/'
    TargetEnvironment=Unity
    
    [UbuntuLaunchpad Shortcut Group]
    Name=Ubuntu Launchpad
    Exec=firefox -new-window 'https://launchpad.net/ubuntu'
    TargetEnvironment=Unity
    
    [NewWindow Shortcut Group]
    Name=Open a New Window
    Exec=firefox -new-window about:blank
    TargetEnvironment=Unity
    

13

Gnome终端快速列表(从ssh配置自动更新)

这是一个小的Shell脚本,用于使用~/.ssh/config文件中的所有服务器条目更新Gnome-Terminal-Quicklist 。无需手动操作。它读取您的~/.ssh/config文件并从中创建菜单项。它还添加了“ Root Terminal”菜单项。

带有SSH条目的Gnome终端快速列表

  1. 将下面列出的脚本复制到一个空文件中,然后将其放入您的脚本文件夹(我们假设是,~/bin/并且您选择的脚本名称是unityterm.sh)。
  2. 运行脚本一次以添加条目:

    /bin/bash ~/bin/unityterm.sh
    
  3. 您可以选择让cron偶尔为您运行一次脚本。要将其添加到cron中,请在外壳中键入follwing命令:

    crontab -e
    

    将打开一个编辑器。那里添加一行像:

    @reboot /bin/bash/ $HOME/bin/unityterm.sh > /dev/null 2>&1
    

    如果不执行此步骤,则每次更改~/.ssh/config快捷方式时都必须手动运行脚本。

  4. 更改仅在您下次登录时或在Alt + F2ing之后生效

    unity --replace
    

    这样吧。注意:请勿unity --replace在终端中运行。如果您关闭该终端,它将破坏它的统一性。

  5. 欣赏并查看nautilus的类似脚本,该脚本解析您的nautilus书签。

脚本:

这是脚本:

#!/bin/bash
# indent-mode: spaces, tabsize: 4, encoding: utf8
#
# © 2011 con-f-use@gmx.net. Use under the MIT license:
#     http://www.opensource.org/licenses/mit-license.php
#
# CONTRIBUTORS: jacopoL <jacopo.jl@gmail.com>
#
# This script updates the unity quicklist menu for gnome-terminal to contain
#+the user's bookmarks. The updates will have efect after unity is restarted
#+(eigther after the next login or by invoking 'unity --replace').

# location of template, unity bar launchers and ssh config file
tertempl="/usr/share/applications/gnome-terminal.desktop"
target="$HOME/.local/share/applications/gnome-terminal.desktop"
bookmarks="$HOME/.ssh/config"

# backup if file allready exists
if [ -e "$target" ]; then
    echo "Creating backup of: $target."
    mv -n "$target" "$target.bak"
fi

# copy template
cp "$tertempl" "$target"
if ! grep -q 'OnlyShowIn=.*Unity' "$target"; then # add only if not already present
    sed -i "s/\(OnlyShowIn=.*\)/\1Unity;/" "$target"
fi

# add entries to template
if ! grep -q 'X-Ayatana-Desktop-Shortcuts=' "$target"; then # add only if not already present
    echo -e "\nX-Ayatana-Desktop-Shortcuts=\n" >> "$target"
else
    echo >> "$target"
fi
bmcount=0        # number of current bookmark
while read bmline; do # walk lines in ssh config file
    # when a new host is found, write the data collected in previous loops
    test=$(echo "$bmline" | grep -oE 'Host[[:space:]]')
    if [ -n "$test" ]; then
        ishost=$(echo "$bmline" | sed -e 's/[ ^I]*Host[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1/g')
    fi
    if [ -n "$ishost" ]; then
        if [ -n "$hostname" ]; then
            # write bookmark information
            cat - >> "$target" <<____________EOF
                [Scg$bmcount Shortcut Group]
                Name=SSH into $oldhost
                Exec=gnome-terminal -x ssh $sshuser$hostname
                TargetEnvironment=Unity

____________EOF
            # extend shortcut list with current bookmark, prepending a ; if needed
            sed -i "s/\(X-Ayatana-Desktop-Shortcuts=\(.*;$\|$\)\)/\1Scg${bmcount};/
                    t
                    s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1;Scg${bmcount};/" "$target"
            bmcount=$(($bmcount+1))
        fi
        hostname=""
        sshuser=""
        oldhost="$ishost"
        ishost=""
    fi
    # collect data: hostname
    test=$(echo "$bmline" | grep -oE 'HostName[[:space:]]')
    if [ -n "$test" ]; then
        hostname=$(echo "$bmline" | sed -e 's/[ ^I]*HostName[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1/g')
    fi
    # collect data: ssh user
    test=$(echo "$bmline" | grep -oE 'User[[:space:]]')
    if [ -n "$test" ]; then
        sshuser=$(echo "$bmline" | sed -e 's/[ ^I]*User[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1@/g')
    fi
done < "$bookmarks"
# write bookmark information of last bookmark
#+and add a root file manager entry
cat - >> "$target" <<EOF
    [Scg$bmcount Shortcut Group]
    Name=SSH into $oldhost
    Exec=gnome-terminal -x ssh $sshuser$hostname
    TargetEnvironment=Unity

    [RootTM Shortcut Group]
    Name=Root Terminal
    Exec=gksudo gnome-terminal
    TargetEnvironment=Unity
EOF
# extend shortcut list with last bookmark and root file manager
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1Scg${bmcount};/" "$target"
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1RootTM;/" "$target"

# Cleanup extra whitespaces
sed -i 's/^[[:space:]]\+//g' "$target"

exit 0

12

Opera启动器和快速列表(第2部分)

  • 标签计数器

    您打开的选项卡总数显示在启动器图标上,并在您打开和关闭选项卡时实时更新;

  • 紧急程度

    当Opera不在焦点上并打开一个新选项卡时,启动器中的Opera图标现在进入紧急模式并摆动一次。

  • 快速清单

    (目前)对Opera内置邮件客户端(M2)的支持有限。

    快速清单 紧急程度 标签数

安装

  1. 从此zip中解压缩脚本到您的主文件夹中。

  2. 打开启动应用程序,并使用上述脚本添加条目,如下所示:

    命令: python unity-opera.py

    启动

资源

荣誉去凯尔贝克!


12

DeaDBeeF快速列表

DeaDBeeF快速列表

  1. 将启动器文件复制到您的主目录:

    cp /usr/share/applications/deadbeef.desktop ~/.local/share/applications
    
  2. 在gedit中打开文件进行编辑:

    gedit ~/.local/share/applications/deadbeef.desktop
    
  3. 将此文本添加到文件底部,然后关闭并保存:

    X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Next;Prev
    [Play Shortcut Group]
    Name=Play
    Exec=deadbeef --play
    TargetEnvironment=Unity
    
    [Pause Shortcut Group]
    Name=Pause
    Exec=deadbeef --pause
    TargetEnvironment=Unity
    
    [Stop Shortcut Group]
    Name=Stop
    Exec=deadbeef --stop
    TargetEnvironment=Unity
    
    [Next Shortcut Group]
    Name=Next
    Exec=deadbeef --next
    TargetEnvironment=Unity
    
    [Prev Shortcut Group]
    Name=Prev
    Exec=deadbeef --prev
    TargetEnvironment=Unity
    
  4. 可选:更改启动器的拖放功能,以便将文件追加到播放列表中而不是将其清除:

    查找 Exec=deadbeef %F并替换为Exec=deadbeef --queue %F


还有一些其他命令,deadbeef -h但是这些命令在快速列表中似乎唯一有用。


12

带GUI的自定义脚本快速列表

为您的脚本创建快速列表启动器。具有用于添加条目的自动和手动选项的嵌入式GUI。自动选项只能添加,使用手册可以直接修改文件。

1.为启动器创建自定义.desktop文件

gedit ~/.local/share/applications/my_scripts.desktop

2.粘贴以下代码并编辑以下内容:(第5行是使用脚本文件夹的方式,在本示例中,这是名称为的文件夹Scripts,您需要更改其位置。还可以更改第6行,是一个图标,最后更改<username>文本以匹配您的主文件夹用户名。

[Desktop Entry]
Name=My Scripts Folder
Comment=Open your scripts folder
TryExec=nautilus
Exec=xdg-open /home/<username>/Scripts
Icon=ibus-engine
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-Ubuntu-Gettext-Domain=nautilus

X-Ayatana-Desktop-Shortcuts=AddScript

[AddScript Shortcut Group]
Name=Add New Script
Exec=/home/<username>/.local/share/applications/scripts/addscript
TargetEnvironment=Unity

3.在〜/ .local / share / applications文件夹中创建一个“脚本”文件夹(如果不存在):

mkdir ~/.local/share/applications/scripts

4.使用gedit创建脚本文件“ addscript”(这是用于将条目添加到快速列表的GUI):

gedit ~/.local/share/applications/scripts/addscript

5.将此文本添加到文件中,然后保存并关闭

#!/bin/bash
menuitem=`zenity --list --title="My Scripts Launcher Manager" \
--width=300 --height=150 \
--text="Select action" \
--column="Pick" --column="Action" \
--radiolist TRUE Add-Script-Automatically FALSE Add/Edit/Delete-Manually`
case $menuitem in
Add-Script-Automatically )
hkey=$(zenity --entry --text "Set  name for your script" --entry-text "" --title "Set name")
if [ -z "$hkey" ]; then
zenity --error --title "Set  name for your script "   --text="The script name is empty. Exiting ..."
exit 0
fi
ay=$(sed -n '/X-Ayatana-Desktop-Shortcuts/p' /$HOME/.local/share/applications/my_scripts.desktop)
shortname2=$(echo "$hkey" | sed 's/\///g')
shortname=$(echo "$shortname2" | sed 's/ /_/g')

hkey3=$(zenity --entry --text "Set command for your script" --entry-text "" --title "Set command")
if [ -z "$hkey3" ]; then
zenity --error --title "Set command "   --text="The command is empty. Exiting ..."
exit 0
fi

sed -i "s/$ay/$ay;$shortname/g" /$HOME/.local/share/applications/my_scripts.desktop
echo "" >>  /$HOME/.local/share/applications/my_scripts.desktop
echo "[$shortname Shortcut Group]" >>  /$HOME/.local/share/applications/my_scripts.desktop
echo "Name=$hkey" >>  /$HOME/.local/share/applications/my_scripts.desktop
echo "Exec=$hkey3" >>  /$HOME/.local/share/applications/my_scripts.desktop
echo "TargetEnvironment=Unity" >> /$HOME/.local/share/applications/my_scripts.desktop


zenity --info --title "New entry added" --text "Changes only take effect on next login"
;;
Add/Edit/Delete-Manually)
zenity --text-info --filename=/$HOME/.local/share/applications/my_scripts.desktop > /tmp/my_scripts.desktop.edited  --title "Add/Edit/Delete Script"  --editable --width 850 --height 480
cp /tmp/my_scripts.desktop.edited /$HOME/.local/share/applications/my_scripts.desktop
rm /tmp/my_scripts.desktop.edited
zenity --info --title "New entry added" --text "Changes only take effect on next login"
;;
esac

6.使文件可执行:

chmod +x ~/.local/share/applications/scripts/addscript

7,将my_scripts.desktop文件从Nautilus中拖放~/.local/share/applications到Unity Launcher栏中

8.您可以通过单击“ Add New Script”菜单项开始向快速列表添加条目


12

扩展主页图标快速列表

快速清单

  1. 使用终端将“主文件夹”启动器文件复制到您的主目录:

    cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications
    
  2. 在gedit中打开文件进行编辑:

    gedit ~/.local/share/applications/nautilus-home.desktop
    
  3. 从文件中删除以下行:

    OnlyShowIn=GNOME;
    
  4. 将此文本添加到文件底部,然后关闭并保存:

    X-Ayatana-Desktop-Shortcuts=Amazon;Backgrounds;CD Covers;Documents;Downloads;Dropbox;DVD Projects;Google Earth;Listings;Music;Notes;Photographs;Podcasts;Public;Templates;Themes;Transmission;Videos
    
    [Amazon Shortcut Group]
    Name=Amazon
    Exec=nautilus Amazon
    TargetEnvironment=Unity
    
    [Backgrounds Shortcut Group]
    Name=Backgrounds
    Exec=nautilus Backgrounds
    TargetEnvironment=Unity
    
    [CD Covers Shortcut Group]
    Name=CD Covers
    Exec=nautilus CDCovers
    TargetEnvironment=Unity
    
    [Documents Shortcut Group]
    Name=Documents
    Exec=nautilus Documents
    TargetEnvironment=Unity
    
    [Dropbox Shortcut Group]
    Name=Dropbox
    Exec=nautilus Dropbox
    TargetEnvironment=Unity
    
    [Downloads Shortcut Group]
    Name=Downloads
    Exec=nautilus Downloads
    
    [DVD Projects Shortcut Group]
    Name=DVD Projects
    Exec=nautilus DVDProjects
    TargetEnvironment=Unity
    
    [Google Earth Shortcut Group]
    Name=Google Earth
    Exec=nautilus GoogleEarth
    TargetEnvironment=Unity
    
    [Listings Shortcut Group]
    Name=Listings
    Exec=nautilus Listings
    TargetEnvironment=Unity
    
    [Notes Shortcut Group]
    Name=Notes
    Exec=nautilus Notes
    TargetEnvironment=Unity
    
    [Photographs Shortcut Group]
    Name=Photographs
    Exec=nautilus Photographs
    TargetEnvironment=Unity
    
    [Podcasts Shortcut Group]
    Name=Podcasts
    Exec=nautilus Podcasts
    TargetEnvironment=Unity
    
    [Public Shortcut Group]
    Name=Public
    Exec=nautilus Public
    TargetEnvironment=Unity
    
    [Templates Shortcut Group]
    Name=Templates
    Exec=nautilus Templates
    TargetEnvironment=Unity
    
    [Themes Shortcut Group]
    Name=Themes
    Exec=nautilus Themes
    TargetEnvironment=Unity
    
    [Transmission Shortcut Group]
    Name=Transmission
    Exec=nautilus Transmission
    TargetEnvironment=Unity
    
    [Videos Shortcut Group]
    Name=Videos
    Exec=nautilus Videos
    TargetEnvironment=Unity
    
  5. 注销并再次登录以查看更改。


2
请使用与其他答案相同的格式和布局。
— Cas

哇,这太过分了。超过五个或六个选项,您花费在菜单搜索上的时间与导航到文件夹所花费的时间一样多。
— keithjgrant

好吧,这是一个很好的评论,但是它可以更快地访问特定的文件夹。我认为这只是获取书签的一种方式。试试看,您可能会喜欢。
— scouser73 2011年

但是它对其他人没有用,因为该脚本是专门为您的Homefolder编写的。
— jsterr 2011年

4
@Pablo您可以将其定制为您的主文件夹。
— scouser73 2011年

11

VirtualBox快速清单

这将为您的Virtualbox虚拟机添加一个快速列表条目。以下示例使用“ Windows XP”,因此需要进行编辑以匹配您自己的VM详细信息。

  1. 将文件复制到您的主目录

    cp /usr/share/applications/virtualbox.desktop ~/.local/share/applications/virtualbox.desktop
    
  2. 使用文本编辑器打开文件

    gedit ~/.local/share/applications/virtualbox.desktop
    
  3. 在文件底部添加文本并保存。

    X-Ayatana-Desktop-Shortcuts=WindowsXP
    
    [WindowsXP Shortcut Group]
    Name=Start Windows XP
    Exec=/usr/lib/virtualbox/VirtualBox --comment "Windows XP" --startvm "Windows XP"
    TargetEnvironment=Unity
    
  4. 将virtualbox.desktop文件从nautilus中的〜/ .local / share / applications拖放到Unity Launcher Bar


仅当您有一个名为“ Windows XP”的VM时,此方法才有效。幸运的是,通过自己编辑文件,您可以添加自己的VM。
— Clay Smalley

可以创建自定义启动器以列出虚拟机,例如Virtualbox Indicator当前所做的。
— Cas
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.