From f6aee427856b5a298205b573ae1f4e9dcbe8be51 Mon Sep 17 00:00:00 2001 From: lemke_h Date: Mon, 9 Nov 2020 12:55:53 +0100 Subject: [PATCH] modified startup sripts user stuff --- firefox_as | 8 +++++++- gnome-terminal_as | 19 +++++++++++++++++++ startup_bernina_terminal | 3 +++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 gnome-terminal_as diff --git a/firefox_as b/firefox_as index edd004c..979faf3 100755 --- a/firefox_as +++ b/firefox_as @@ -10,4 +10,10 @@ #gnome-terminal -x sh -c "export XDG_RUNTIME_DIR=/run/user/$UID; su - $1 -c chrome" -gnome-terminal -x sh -c "su - $1 -c /usr/bin/firefox" +if [ -z "$1" ] +then + USER=$(zenity --entry --text="Enter user name for opening firefox") +else + USER=$1 +fi +ssh -l $USER localhost /usr/bin/firefox diff --git a/gnome-terminal_as b/gnome-terminal_as new file mode 100755 index 0000000..3ebf3ad --- /dev/null +++ b/gnome-terminal_as @@ -0,0 +1,19 @@ +#!/bin/bash +#function set-title() { +# if [[ -z "$ORIG" ]]; then +# ORIG=$PS1 +# fi +# TITLE="\[\e]2;$*\a\]" +# PS1=${ORIG}${TITLE} +#} +#set-title "chrome terminal" + + +#gnome-terminal -x sh -c "export XDG_RUNTIME_DIR=/run/user/$UID; su - $1 -c chrome" +if [ -z "$1" ] +then + USER=$(zenity --entry --text="Enter user name for opening gnome-terminal") +else + USER=$1 +fi +ssh -Y -l $USER localhost gnome-terminal diff --git a/startup_bernina_terminal b/startup_bernina_terminal index d85c857..32ce005 100755 --- a/startup_bernina_terminal +++ b/startup_bernina_terminal @@ -4,6 +4,9 @@ set_gnome_keyboard_shortcut 'stop_fel' 'feloff' 'F12' set_gnome_keyboard_shortcut 'open_fel' 'felon' 'F12' set_gnome_keyboard_shortcut 'eco' 'gnome-terminal -- eco' 'c' set_gnome_keyboard_shortcut 'browser' 'firefox' 'b' +set_gnome_keyboard_shortcut 'browser-as' 'firefox_as' 'b' +set_gnome_keyboard_shortcut 'terminal-as' 'gnome-terminal_as' 't' +set_gnome_keyboard_shortcut 'winterm' 'winterm' 'w' set_gnome_keyboard_shortcut 'stop_laser' 'laseroff' 'F4' set_gnome_keyboard_shortcut 'open_laser' 'laseron' 'F4'