This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Login script does not run in notifications

Tags: None
(comma "," separated)
User avatar
blue_bullet
Registered Member
Posts
87
Karma
0
OS
I have a rexx routine I like to run at login. A lady's voice tells me the date and time of login. I set up the command in
System Settings > Notifications > Event Source pull down > Plasma Workspace > login
Under login I enter the command:
/home/rob/Dropbox/shared_rcss_complex/create_sound_file.sh

The script calls a rexx routine by the same name and works fine in Konsole and works if invoked under
System Settings>Startup and Shutdown as a script file at startup. Under Event Notifications and Actions, Plasma Workspace, Login I have checked log to a file. Nothing is logged. If I check Play a Sound, Oxygen-Sys-Log-In-Short.ogg is played at login.

In summary Play a Sound works, Log to a File does not, and the sound script does not play sound but it does
play the sound if invoked as a startup script. Can anyone suggest how to get this working so I can get a log
file created? It worked fine under Linux Mint 17.3 KDE and Linux Mint 18.3 KDE but not KDE Neon 5.14-5.

inxi -F:
Code: Select all
System:    Host: sigma Kernel: 4.15.0-45-generic x86_64 bits: 64 Desktop: KDE Plasma 5.14.5
           Distro: Ubuntu 18.04.2 LTS
Machine:   Device: laptop System: ASUSTeK product: Strix 17 GL703GE v: 1.0 serial: N/A
           Mobo: ASUSTeK model: GL703GE v: 1.0 serial: N/A
           UEFI: American Megatrends v: GL703GE.310 date: 06/11/2018
Battery    BAT1: charge: 61.2 Wh 100.0% condition: 61.2/64.4 Wh (95%)
CPU:       6 core Intel Core i7-8750H (-MT-MCP-) cache: 9216 KB
           clock speeds: max: 4100 MHz 1: 1165 MHz 2: 3042 MHz 3: 3365 MHz 4: 3251 MHz 5: 3278 MHz 6: 3179 MHz
           7: 3102 MHz 8: 3232 MHz 9: 3173 MHz 10: 3463 MHz 11: 3253 MHz 12: 3158 MHz
Graphics:  Card-1: Intel Device 3e9b
           Card-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile]
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@120.00hz
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 version: 4.6.0 NVIDIA 390.77
Audio:     Card Intel Device a348 driver: snd_hda_intel Sound: ALSA v: k4.15.0-45-generic
Network:   Card-1: Intel Device a370 driver: iwlwifi
           IF: wlo1 state: up speed: N/A duplex: N/A mac: 94:b8:6d:2a:05:f8
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: enp2s0 state: down mac: 18:31:bf:97:1b:fd
Drives:    HDD Total Size: 1256.3GB (5.5% used)
           ID-1: /dev/sda model: Micron_1100_MTFD size: 256.1GB
           ID-2: /dev/sdb model: ST1000LM035 size: 1000.2GB
Partition: ID-1: / size: 55G used: 9.5G (19%) fs: ext4 dev: /dev/sda5
           ID-2: /home size: 119G used: 42G (37%) fs: ext4 dev: /dev/sdb2
           ID-3: swap-1 size: 15.00GB used: 0.00GB (0%) fs: swap dev: /dev/sdb3
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 63.0C mobo: 27.8C gpu: 44C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 357 Uptime: 2:47 Memory: 5473.5/15895.1MB Client: Shell (bash) inxi: 2.3.56


I realize this is kind of a nit, but it works in a different distribution and KDE is my go to environment because it is so customizable.


Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.
User avatar
blue_bullet
Registered Member
Posts
87
Karma
0
OS
I see that all the system settings notifications are stored in
/home/user/.config/plasma_workspace.notifyrc
I added a simple Kdialog popup, a sound, and a log to file request to the gui for a logout-cancel and it loaded the following lines to that file:
Code: Select all
[Event/cancellogout]
Action=Sound|Popup|Logfile|Execute
Execute=/home/rob/Dropbox/shared_rcss_complex/checkn_on_you.sh
Logfile=file:///home/rob/log/logout_canceled/logout_cancel.log
Sound=/home/rob/Dropbox/shared_rcss_complex/15336__Marec__flushing_toilet.ogg
TTS=



However when I cancel a logout nothing happens. Here's the contents of the entire file:
Code: Select all
[Event/Textcompletion: no match]
Execute=
Logfile=
TTS=

[Event/Textcompletion: partial match]
Execute=
Logfile=
TTS=

[Event/Textcompletion: rotation]
Execute=
Logfile=
TTS=

[Event/Trash: emptied]
Action=Sound
Execute=
Logfile=
TTS=

[Event/applicationcrash]
Execute=
Logfile=
Sound=
TTS=

[Event/beep]
Action=Sound
Execute=
Logfile=
TTS=

[Event/cancellogout]
Action=Sound|Popup|Logfile|Execute
Execute=/home/rob/Dropbox/shared_rcss_complex/checkn_on_you.sh
Logfile=file:///home/rob/log/logout_canceled/logout_cancel.log
Sound=/home/rob/Dropbox/shared_rcss_complex/15336__Marec__flushing_toilet.ogg
TTS=

[Event/catastrophe]
Action=Popup
Execute=
Logfile=
TTS=

[Event/exitkde]
Action=Sound|Logfile
Execute=
Logfile=file:///home/rob/log/logout/logout.log
Sound=/home/rob/Dropbox/shared_rcss_complex/calendar_sounds/system-messages/system-shutting-down.ogg
TTS=

[Event/fatalerror]
Action=Popup
Execute=
Logfile=
TTS=

[Event/messageCritical]
Action=Taskbar

[Event/messageInformation]
Action=Taskbar
Execute=
Logfile=
TTS=

[Event/messageWarning]
Action=Taskbar
Execute=
Logfile=
TTS=

[Event/messageboxQuestion]
Action=Taskbar
Execute=
Logfile=
TTS=

[Event/notification]
Action=Popup
Execute=
Logfile=
TTS=

[Event/plasmoidDeleted]
Execute=
Logfile=
Sound=
TTS=

[Event/plasmoidInstallationFailed]
Execute=
Logfile=
Sound=
TTS=

[Event/printerror]
Action=Popup

[Event/startkde]
Action=Logfile|Execute
Execute=/home/rob/Dropbox/shared_rcss_complex/create_sound_file.sh
Logfile=file:///home/rob/log/login/login.log
TTS=

[Event/warning]
Action=Popup



The exitkde event works fine. It plays a sound and logs the event properly. Is it possible the Execute= is not working? In Plasma 4 the gui accepted a command including arguments. In Plasma 5 the gui requires a path and does not accept arguments, a step backward in my view. It caused me to have to write a simple .sh script to invoke rexx.

Sorry, English is my first language.


Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.
amrose
Registered Member
Posts
1
Karma
0
Today I was asked to this exact thing to notify the company head when a particular user logs in/out cleanmaster. I suck at scripting; what changes would need to be made for this to also report logoff?

Last edited by amrose on Wed Mar 06, 2019 5:57 am, edited 2 times in total.
User avatar
blue_bullet
Registered Member
Posts
87
Karma
0
OS
amrose wrote:Today I was asked to this exact thing to notify the company head when a particular user logs in/out. I suck at scripting; what changes would need to be made for this to also report logoff?


System Settings > Notifications > Event Source pull down > Plasma Workspace > logout

Check the box on Log to a file line and provide a location for the log file. No script needed.


Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]