-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac1ee89
commit f53e60c
Showing
18 changed files
with
1,312 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: "Chromium - Skift startside" | ||
parent: "Kiosk" | ||
source: os2borgerpc-scripts/os2borgerpc/os2borgerpc_kiosk/chromium_change_homepage.sh | ||
parameters: | ||
- name: "URL" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
compatibility: | ||
- "22.04" | ||
- "Kiosk" | ||
--- | ||
|
||
## Beskrivelse | ||
Skifter startside i Chromium. | ||
|
||
Hvis du oplever scriptet fejle, genkør da OS2borgerPC Kiosk - Autostart Chromium før dette. | ||
|
||
Dette script er blevet testet og virker på Ubuntu 22.04. | ||
|
||
## Parametre | ||
1: Hvilken URL der skal være den nye startside. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "Chromium Ryd Cache NU" | ||
parent: "Kiosk" | ||
source: os2borgerpc-scripts/os2borgerpc/os2borgerpc_kiosk/chromium_delete_profile.sh | ||
parameters: | ||
compatibility: | ||
- "22.04" | ||
- "Kiosk" | ||
--- | ||
|
||
## Beskrivelse | ||
Dette script sletter Chromiums profil (inkl. cache) ÉN GANG, hvilket nulstiller browserens historik. | ||
|
||
Dette script er blevet testet og virker på Ubuntu 22.04. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Genvej til program fra skrivebordet" | ||
parent: "Desktop" | ||
source: os2borgerpc-scripts/os2borgerpc/desktop/desktop_program_shortcut.sh | ||
parameters: | ||
- name: "Tilføj programmet?" | ||
type: "boolean" | ||
default: null | ||
mandatory: false | ||
- name: "Program" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
compatibility: | ||
- "22.04" | ||
- "BorgerPC" | ||
--- | ||
|
||
## Beskrivelse | ||
Tilføjer/Fjerner en genvej til/fra et program på skrivebordet. | ||
|
||
Log ud efter kørsel. | ||
|
||
BEMÆRK: Før genveje på skrivebordet fungerer, skal scriptet "Desktop - Aktiver genveje" også være kørt. Dette script er dog allerede indbygget i de nyere images. | ||
|
||
Dette script er blevet testet og virker på Ubuntu 22.04. | ||
|
||
## Parametre | ||
1: Tilføj programmet: | ||
Sæt hak: Programmet tilføjes til Skrivebordet | ||
Fjern hak: Programmet fjernes fra Skrivebordet (hvis det ligger der) | ||
2: Programnavn: Det program du ønsker at tilføje eller slette fra skrivebordet. Programnavnet skal matche navnet på en genvej til et installeret program. | ||
Navnet er næsten altid med små bogstaver, og mellemrum erstattet af bindestreg. | ||
Eksempler: firefox, google-chrome, microsoft-edge, simple-scan, yelp, libreoffice-impress, libreoffice-writer, libreoffice-calc | ||
|
||
Hvis du ikke kender program-navnet præcist, kan du bruge scriptet "Desktop - Vis programliste". | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: "Genvej til valgfri mappe fra skrivebordet" | ||
parent: "Desktop" | ||
source: os2borgerpc-scripts/os2borgerpc/desktop/desktop_shortcut_to_directory.sh | ||
parameters: | ||
- name: "Tilføj?" | ||
type: "boolean" | ||
default: null | ||
mandatory: false | ||
- name: "Sti til mappe" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "Navn på genvej" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
compatibility: | ||
- "22.04" | ||
- "BorgerPC" | ||
--- | ||
|
||
## Beskrivelse | ||
Opretter en genvej til en valgfri mappe på Skrivebordet. | ||
Dette script er blevet testet og virker på Ubuntu 22.04. | ||
|
||
## Parametre | ||
1. Stien til mappen (eksempelvis: "/home/user/Dokumenter" ) | ||
2. Navnet på genvejen (eksempelvis: "Skannede filer" ) | ||
...begge uden citationstegnene rundt om. | ||
|
||
Bemærk at ift. stien, så har store og små bogstaver en betydning! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: "Tilføj netværksprinter" | ||
parent: "Printer" | ||
source: os2borgerpc-scripts/os2borgerpc/printer/network_printer_add_no_ppd.sh | ||
parameters: | ||
- name: "Navn (OBS: INGEN ÆØÅ, mellemrum eller apostrofer)" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "IP-adresse" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "Beskrivelse / Placering (INGEN ÆØÅ)" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "Protokol" | ||
type: "string" | ||
default: "ipp" | ||
mandatory: false | ||
- name: "Sæt som standard?" | ||
type: "boolean" | ||
default: null | ||
mandatory: false | ||
compatibility: | ||
- "22.04" | ||
- "BorgerPC" | ||
--- | ||
|
||
## Beskrivelse | ||
Tilføjer en netværksprinter. | ||
|
||
Dette script er blevet testet og virker på Ubuntu 22.04. | ||
|
||
## Parametre | ||
* Printernavn - ingen Æ, Ø og Å, ingen mellemrum og ingen apostrofer | ||
* IP-adresse | ||
* Beskrivelse / Placering - denne kan godt indeholde mellemrum | ||
* Protokol - vi anbefaler at afprøve ipp først, medmindre du ved, at denne protokol ikke er understøttet. Andre muligheder er eksempelvis "socket". | ||
* Sæt som standard? Afgører om printeren også sættes som standard-printer eller ej. Det vil typisk sige, om den er forvalgt i diverse programmer, når der printes. | ||
|
||
EFTER kørsel af dette script, kan du evt. ændre indstillinger på printeren med scriptet "Printer - Sæt printer-indstillinger". | ||
|
||
NÆRMERE INFO OMKRING PROTOKOLLER: | ||
Scriptet "Vis printer-liste" kan give en idé om hvilke protokoller en printer understøtter, men det er ikke altid, de er til at identificere. Den sikreste metode for at afgøre hvilke protokoller der understøttes, er derfor at kigge i printerens dokumentation. | ||
|
||
IPP: | ||
IPP kører over TCP og bruger normalt port 631. | ||
Nærmere info: https://en.wikipedia.org/wiki/Internet_Printing_Protocol | ||
|
||
Socket/Appscoket/Jetdirect | ||
http://www.cups.org/doc/network.html | ||
https://wiki.debian.org/CUPSPrintQueues#appsock | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: "Tilføj netværksprinter (PPD-fil skal angives)" | ||
parent: "Printer" | ||
source: os2borgerpc-scripts/os2borgerpc/printer/network_printer_add_ppd.sh | ||
parameters: | ||
- name: "Navn (OBS: INGEN ÆØÅ, mellemrum eller apostrofer)" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "IP-adresse" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "Beskrivelse / Placering (INGEN ÆØÅ)" | ||
type: "string" | ||
default: null | ||
mandatory: true | ||
- name: "PPD-fil" | ||
type: "file" | ||
default: null | ||
mandatory: true | ||
- name: "Protokol" | ||
type: "string" | ||
default: "ipp" | ||
mandatory: false | ||
- name: "Sæt som standard?" | ||
type: "boolean" | ||
default: null | ||
mandatory: false | ||
compatibility: | ||
- "22.04" | ||
- "BorgerPC" | ||
--- | ||
|
||
## Beskrivelse | ||
Tilføj ny netværksprinter. | ||
|
||
Dette script er blevet testet og virker på Ubuntu 22.04. | ||
|
||
BEMÆRK: Medmindre du har særlige grunde, der kræver en PPD, anbefaler vi i stedet at tilføje printere med scriptet "Tilføj netværksprinter", som ikke kræver en PPD. | ||
|
||
## Parametre | ||
* Printernavn - ingen Æ, Ø og Å og ingen mellemrum | ||
* IP-adresse | ||
* Beskrivelse / placering - denne kan godt indeholde mellemrum | ||
* Printer-driver (PPD-fil) | ||
* Protokol - protokollen "socket", også kaldet "appsocket" og "jetdirect" er forvalgt, da det er den protokol dette script historisk har brugt. | ||
Hvis scriptet "Tilføj netværksprinter", som har IPP-protokollen forvalgt, ikke virker for den pågældende printer, anbefaler vi at afprøve at køre dette script med "socket". | ||
* Sæt som standard? Afgører om printeren også sættes som standard-printer eller ej. Det vil typisk sige, om den er forvalgt i diverse programmer, når der printes. | ||
|
||
EFTER kørsel af dette script, kan du evt. ændre indstillinger på printeren med scriptet "Printer - Sæt printer-indstillinger". | ||
|
||
NÆRMERE INFO OMKRING PROTOKOLLER: | ||
Scriptet "Vis printer-liste" kan give en idé om hvilke protokoller en printer understøtter, men det er ikke altid, de er til at identificere. Den sikreste metode for at afgøre hvilke protokoller der understøttes, er derfor at kigge i printerens dokumentation. | ||
|
||
IPP: | ||
IPP kører over TCP og bruger normalt port 631. | ||
Nærmere info: https://en.wikipedia.org/wiki/Internet_Printing_Protocol | ||
|
||
Socket/Appscoket/Jetdirect | ||
http://www.cups.org/doc/network.html | ||
https://wiki.debian.org/CUPSPrintQueues#appsock | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /usr/bin/env sh | ||
|
||
NEW_URL="$1" | ||
|
||
if ! get_os2borgerpc_config os2_product | grep --quiet kiosk; then | ||
echo "Dette script er ikke designet til at blive anvendt på en regulær OS2borgerPC-maskine." | ||
exit 1 | ||
fi | ||
|
||
CHROMIUM_SCRIPT='/usr/share/os2borgerpc/bin/start_chromium.sh' | ||
sed --in-place --regexp-extended "s%(IURL=\").*%\1$NEW_URL\"%" $CHROMIUM_SCRIPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
if ! get_os2borgerpc_config os2_product | grep --quiet kiosk; then | ||
echo "Dette script er ikke designet til at blive anvendt på en regulær OS2borgerPC-maskine." | ||
exit 1 | ||
fi | ||
|
||
rm -r /home/chrome/snap/chromium/common/chromium/Default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#! /usr/bin/env sh | ||
|
||
# Adds/Removes programs from the desktop in Ubuntu 20.04 | ||
# Author: [email protected] | ||
# | ||
# This script has been updated to automatically detect the name of | ||
# the 'Desktop' directory in the chosen locale. | ||
# | ||
# Arguments: | ||
# 1: Use a boolean to decide whether to add or remove the program shortcut | ||
# 2: This argument should specify the name of a program (.desktop-file) | ||
# under /usr/share/applications/ or /var/lib/snapd/desktop/applications/ | ||
# This parameter IS case-sensitive as some applications have | ||
# capitalized characters in their filename. | ||
|
||
ADD="$1" | ||
PROGRAM="$2" | ||
|
||
if get_os2borgerpc_config os2_product | grep --quiet kiosk; then | ||
echo "Dette script er ikke designet til at blive anvendt på en kiosk-maskine." | ||
exit 1 | ||
fi | ||
|
||
# Determine the name of the user desktop directory. This is done via xdg-user-dir, | ||
# which checks the /home/user/.config/user-dirs.dirs file. To ensure this file exists, | ||
# we run xdg-user-dirs-update, which generates it based on the environment variable | ||
# LANG. This variable is empty in lightdm so we first export it | ||
# based on the value stored in /etc/default/locale | ||
export "$(grep LANG= /etc/default/locale | tr -d '"')" | ||
runuser -u user xdg-user-dirs-update | ||
DESKTOP=$(basename "$(runuser -u user xdg-user-dir DESKTOP)") | ||
|
||
SHADOW_DESKTOP="/home/.skjult/$DESKTOP" | ||
SNAP_DESKTOP_FILE_PATH="/var/lib/snapd/desktop/applications" | ||
APT_DESKTOP_FILE_PATH="/usr/share/applications" | ||
|
||
# TODO?: Make it replace all desktop icons which are copies with symlinks? | ||
|
||
mkdir --parents "$SHADOW_DESKTOP" | ||
|
||
# They can type in chrome, but the desktop file is called google-chrome | ||
# They can type in edge, but the desktop file is called microsoft-edge | ||
# They can also type in okular, but the desktop file is called okularApplication_kimgio | ||
if [ "$PROGRAM" = "chrome" ]; then | ||
PROGRAM="google-chrome" | ||
elif [ "$PROGRAM" = "edge" ]; then | ||
PROGRAM="microsoft-edge" | ||
elif [ "$PROGRAM" = "okular" ]; then | ||
PROGRAM="okularApplication_kimgio" | ||
fi | ||
|
||
if [ "$ADD" = 'True' ]; then | ||
if [ -f "$SNAP_DESKTOP_FILE_PATH/${PROGRAM}_$PROGRAM.desktop" ]; then | ||
ORIGINAL_FILE=$SNAP_DESKTOP_FILE_PATH/${PROGRAM}_$PROGRAM.desktop | ||
else | ||
ORIGINAL_FILE=$APT_DESKTOP_FILE_PATH/$PROGRAM.desktop | ||
fi | ||
# Check that the program actually exists and exit if it doesn't | ||
if [ ! -f "$ORIGINAL_FILE" ]; then | ||
echo "The chosen program name did not match any installed programs. Exiting." | ||
exit 1 | ||
fi | ||
# Remove it first as it may be a copy and not symlink (ln --force can't overwrite regular files) | ||
rm --force "$SHADOW_DESKTOP/$(basename "$ORIGINAL_FILE")" | ||
|
||
# Ensure that the local copy exists | ||
LOCAL_FILE_COPY="/home/.skjult/.local/share/applications/$(basename "$ORIGINAL_FILE")" | ||
mkdir --parents "$(dirname "$LOCAL_FILE_COPY")" | ||
if [ ! -f "$LOCAL_FILE_COPY" ]; then | ||
cp "$ORIGINAL_FILE" "$LOCAL_FILE_COPY" | ||
fi | ||
|
||
ln --symbolic --force "$LOCAL_FILE_COPY" "$SHADOW_DESKTOP"/ | ||
else | ||
if [ -f "$SHADOW_DESKTOP/${PROGRAM}_$PROGRAM.desktop" ]; then | ||
PROGRAM=${PROGRAM}_$PROGRAM | ||
fi | ||
rm --force "$SHADOW_DESKTOP/$PROGRAM.desktop" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#! /usr/bin/env sh | ||
|
||
# Places a shortcut on the Desktop to any directory on the file system | ||
# | ||
# Parameters: | ||
# 1: Whether to add or remove the shortcut | ||
# 2: The path to the directory you want a shortcut to | ||
# 3: The name of the shortcut on the Desktop | ||
|
||
set -ex | ||
|
||
if get_os2borgerpc_config os2_product | grep --quiet kiosk; then | ||
echo "Dette script er ikke designet til at blive anvendt på en kiosk-maskine." | ||
exit 1 | ||
fi | ||
|
||
ADD="$1" | ||
DIRECTORY="$2" | ||
SHORTCUT_NAME="$3" | ||
|
||
# Determine the name of the user desktop directory. This is done via xdg-user-dir, | ||
# which checks the /home/user/.config/user-dirs.dirs file. To ensure this file exists, | ||
# we run xdg-user-dirs-update, which generates it based on the environment variable | ||
# LANG. This variable is empty in lightdm so we first export it | ||
# based on the value stored in /etc/default/locale | ||
export "$(grep LANG= /etc/default/locale | tr -d '"')" | ||
runuser -u user xdg-user-dirs-update | ||
DESKTOP=$(basename "$(runuser -u user xdg-user-dir DESKTOP)") | ||
|
||
SHADOW_DESKTOP="/home/.skjult/$DESKTOP" | ||
|
||
mkdir --parents "$SHADOW_DESKTOP" | ||
|
||
if [ "$ADD" = "True" ]; then | ||
# Note: "ln" doesn't care if the destination ($DIRECTORY) exists | ||
ln --symbolic --force "$DIRECTORY" "$SHADOW_DESKTOP/$SHORTCUT_NAME" | ||
else | ||
rm "$SHADOW_DESKTOP/$SHORTCUT_NAME" | ||
fi |
Oops, something went wrong.