My Ubuntu 18.04 laptop has a desktop shortcut link that opens my Google Calendar. Someone else set it up for me; I don't know how they did it. I installed Ubuntu 20.04 on my desktop computer and would like it there too. I can't find how to do it. I've had suggestions on how to sync entries with GNOME Calendar, but that's not the same. Is there that much difference between Bionic and Focal, or did I receive especially advanced help three years ago setting up my laptop?
You most certainly can ... though the method is not exactly the most intuitive.
Here's how to do it with Firefox:
Click on the icon to the immediate left of the URL you want to open. This will probably be a lock as Google Calendar uses SSL:
Drag that lock over to the desktop and let go. This will give you an ugly icon:
Note: If the ugly icon is "good enough", there's nothing more you need to do. Double-clicking the icon will open your preferred browser to the page that you have specified.
To make the icon less of an eye-sore, right click the item and choose "Properties"
Change the name to something you would prefer, and set an image if you have one that you'd like to see:
Note: You'll see the name on the desktop change as you change the name, but the icon will not update to the one you've specified. This is in the next step.
Click the "Permissions" tab, and check "Allow executing file as program":
Enjoy your desktop shortcut:
That's all there is to it.
I found an old askubuntu quistion with you answer :) You can create an HTML page on your desktop that refreshes to any website. The code you will need for AskUbuntu is:
<html> <head> <meta http-equiv="refresh" content="0; url=https://askubuntu.com" /> <!-- change the url flag to change the shortcut website --> </head> <body> </body> </html>
Source: Create a shortcut for URL?
Option 1: Application launcher
Application launchers in Linux are
.desktop text files. Unfortunatelly, graphical tools to create them are not anymore readily available. Since these are text files, you can easily create your own, however.
In this case, you easily can just modify an existing launcher forethe browser you use. Assuming you use the default browser Firefox, then copy the file
firefox.desktop in the system folder
/usr/share/applications/ (Look under "Other locations", "Computer" to find the folder
usr then navigate down to
share and next
applications) to the folder
.local/share/applications under your home directory. (
.local is a hidden folder in your home folder. Enable the display of hidden files to see them).
Open the file in your text editor, and find the line
%u by the URI of your calendar (i.e., while in your calendar, copy the URI that is displayed in the address bar of your browser), e.g.
If you wish a different icon, you can change the line
Icon=firefox, where you replace
firefox by the file path of your own icon, e.g.
Icon=/home/<yourlogin>/Pictures/calendar.svg, where you change by your own login name , and
Pictures/calendar.svg by the actual path and file name of your custom icon file.
Advanced tip: starter that switches to calendar if it is already running
You can create a
.desktop launcher on your desktop to start or switch to Google Calendar. Create a file
google-calendar.desktop with following content
[Desktop Entry] Version=1.0 Name=Google Calendar GenericName=Calendar Keywords=Mail;Email Exec=jumpapp -t "Google Calendar" firefox "https://calendar.google.com/calendar/r?pli=1" Terminal=false Type=Application Icon=google-calendar Categories=GNOME;GTK;Network;WebBrowser;
You could simply have an
Exec= line that reads like:
That would directly call Firefox and open a window with your calendar. Next time you click the launcher, it would launch a new window. I use
jumpapp (https://github.com/mkropat/jumpapp), a bash script that actually relies on
Exec=jumpapp -t "Google Calendar" firefox "https://calendar.google.com/calendar/r?pli=1"
This causes the launcher to first look if Calendar is already open. If it is open, it switches to the running instance. Else, it opens a new instance.
Option 2 - URL launcher
Another option is to use an URL launcher instead. This is also a
.desktop file. Depending on the Ubuntu version you have, these may easily be created by dragging the URL bar to the desktop. See the answer of matigo for detailed instructions.
- In addition to placing that
.desktopfile on your desktop, you can place it in your
~/.local/share/applicationsfolder. This way, it will be included in the application overview, from where you could pin it to the dock.
- In addition, you could assign a shortcut key. I launch or switch to Google Calendar using the shortcut key Super+L (where I disable the default binding, to lock the screen, first). To launch a
.desktopfile through a command, install
dexfrom the Ubuntu software repositories (
sudo apt install dex). The command for the shortcutkey is then
dex /home/<yourlogin>/.local/share/applications/google-calendar.desktop. (replace ` by your user name).