... | @@ -561,4 +561,34 @@ You can also change the gnome background. (This is not needed in pureos-byzantiu |
... | @@ -561,4 +561,34 @@ You can also change the gnome background. (This is not needed in pureos-byzantiu |
|
|
|
|
|
`gsettings set org.gnome.desktop.background picture-uri file:///path/to/picture_file`
|
|
`gsettings set org.gnome.desktop.background picture-uri file:///path/to/picture_file`
|
|
|
|
|
|
e.g. `gsettings set org.gnome.desktop.background picture-uri file:///home/purism/Pictures/image.png` |
|
e.g. `gsettings set org.gnome.desktop.background picture-uri file:///home/purism/Pictures/image.png`
|
|
\ No newline at end of file |
|
|
|
|
|
### Creating a Shortcut to Execute a Terminal Command
|
|
|
|
|
|
|
|
As an [example](https://forums.puri.sm/t/tutorial-create-a-shortcut-to-modem-info/16886), the following will create a shortcut to modem info, similar to using Android's `*#*#INFO#*#*` service code.
|
|
|
|
|
|
|
|
First, find an appropriate icon, edit it if desired, name it (e.g. modem.png), and save it to `.local/share/icons`, creating the `icons` folder if it doesn't exist already.
|
|
|
|
|
|
|
|
Next, create the shortcut button in `.local/share/applications`, naming it e.g. `ModemInfo.desktop`. This will insert the icon/launcher into the home screen's app grid.
|
|
|
|
|
|
|
|
In the terminal, enter `mmcli -L` to retrieve the modem's single-digit identifier. In this example, the command returns `/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] 0`, which indicates "0" as the identifier. We can now run `mmcli --modem=0` to manually retrieve the detailed modem and mobile network information.
|
|
|
|
|
|
|
|
Next, to enable the app screen launcher to run `mmcli --modem=0`, copy the following text into the `ModemInfo.desktop` file, which was created previously in `.local/share/applications`:
|
|
|
|
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=ModemInfo
|
|
|
|
Exec=gnome-terminal -x bash -c “mmcli --modem=0 | tee modeminfo.txt; exec bash”
|
|
|
|
StartupNotify=true
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
Categories=Utilities;
|
|
|
|
Icon=/home/purism/.local/share/icons/modem.png
|
|
|
|
|
|
|
|
The above automates opening the terminal, running the command, and also saves the terminal output to a text file (`modeminfo.txt`) in the home folder, as well as setting the icon to use as the launcher, all from a single tap on the app icon. The text file will be overwritten every time.
|
|
|
|
|
|
|
|
At this point, either view the output in the terminal opened by the launcher, or close the terminal and view the text file instead.
|
|
|
|
|
|
|
|
For another example, see how to create a launcher to [quick-dial a frequent telephone number](https://forums.puri.sm/t/howto-make-a-quickdial-button/12560).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ No newline at end of file |