Skip to content

Commit aa222f8

Browse files
author
Andreas Poulsen
committed
Merge branch 'feature/51705_make_activate_shortcuts_not_need_dbus-launch' into 'master'
Make activate shortcuts not need dbus-launch See merge request os2borgerpc/os2borgerpc-scripts!181
2 parents 7de22c8 + c7e9c63 commit aa222f8

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ Lint python scripts:
4646
image: python:3.10-alpine
4747
before_script:
4848
- apk add --no-cache --virtual .deps gcc musl-dev
49-
- pip install black==22.12.0
49+
- pip install black
5050
script:
5151
- black --check --diff --exclude=migrations .

os2borgerpc/custom/kobenhavn/cicero_install_pam/raw_scripts/cicero_interface.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88

99
def cicero_validate(cicero_user, cicero_pass):
10-
1110
host_address = (
1211
check_output(["get_os2borgerpc_config", "admin_url"]).decode().strip()
1312
)

os2borgerpc/custom/kobenhavn/cicero_install_pam/raw_scripts/pam_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
def pam_sm_authenticate(pamh, flags, argv):
8-
98
# print(pamh.fail_delay)
109
# http://pam-python.sourceforge.net/doc/html/
1110
username_msg = pamh.Message(pamh.PAM_PROMPT_ECHO_OFF, "Lånernummer eller CPR")

os2borgerpc/desktop/desktop_activate_shortcuts.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ rm --force /home/$SHADOW/.config/autostart/gio-fix-desktop-file-permissions.desk
1616
cat << EOF > "$GIO_SCRIPT"
1717
#! /usr/bin/env sh
1818
19-
# gio needs to run as the user + dbus-launch, we have this script to create it and kill it afterwards
20-
export \$(dbus-launch)
21-
DBUS_PROCESS=\$\$
19+
# gio needs to run as the user with correct dbus settings
20+
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u user)/bus"
2221
2322
for FILE in /home/$USER/Skrivebord/*.desktop; do
2423
gio set "\$FILE" metadata::trusted true
2524
done
2625
27-
kill \$DBUS_PROCESS
2826
EOF
2927

3028
# Script to activate programs on the desktop
@@ -42,7 +40,9 @@ su --login user --command $GIO_SCRIPT
4240
# Now set the permissions back to their restricted form
4341
for FILE in /home/$USER/Skrivebord/*.desktop; do
4442
chown root:$USER "\$FILE"
45-
# Can't make sense of this as it already has execute permissions, but it won't work without it
43+
# In order for gio changes to take effect, it is necessary to update the file time stamp
44+
# This can be done with many commands such as chmod or simply touch
45+
# However, in some cases the files might not have execute permission so we add it with chmod
4646
chmod ug+x "\$FILE"
4747
done
4848
EOF

os2borgerpc_kiosk/os2borgerpc_kiosk/auto_activate_chromium.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
expected.visibility_of_element_located((By.CLASS_NAME, "default--full-screen"))
111111
)
112112
except: # noqa: E722 - TODO: next refactor: investigate which exceptions specifically
113-
114113
print("Exception occured while waiting for OS2display screen.")
115114

116115
token = browser.execute_script("return localStorage.getItem('indholdskanalen_token')")

tools/plyvel_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class PlyvelInterface:
2222
"""
2323

2424
def __init__(self):
25-
2625
# self.db = plyvel.DB('/home/' + user + '/snap/chromium/common/chromium/Default/Sync Data/LevelDB', create_if_missing=True, compression=None) # noqa E501
2726
self.db = plyvel.DB(
2827
"/home/"

0 commit comments

Comments
 (0)