Script Chiusura sopcast-player
Script Chiusura sopcast-player
Salve a tutti, avrei bisogno di un aiutino semplice semplice (per molti, ma non per me :'()
Al momento sto utilizzando sopcast-player ma ho un problema, per funzionare ha bisogno del pacchetto sp-sc che è stato da poco rinominato dall'autore sp-sc-auth. Sono riuscito ad aggirare il problema in qualche modo (creando un "link" al file in questione) e quindi non ho nessun problema all'avvio. Il problema si pone alla chiusura in quanto sopcast-player va a chiudere il "link" (sp-sc) ma non sp-sc-auth, che rimane quindi in esecuzione.
Mi servirebbe quindi uno scriptino che chiuda sp-sc-auth alla chiusura di sopcast-player. Immagino che sia una cosa semplicissima per chi conosce un minimo di bash, ma così non è per me. Qualcuno ha 2 secondi per spiegarmelo?
Grazie
Al momento sto utilizzando sopcast-player ma ho un problema, per funzionare ha bisogno del pacchetto sp-sc che è stato da poco rinominato dall'autore sp-sc-auth. Sono riuscito ad aggirare il problema in qualche modo (creando un "link" al file in questione) e quindi non ho nessun problema all'avvio. Il problema si pone alla chiusura in quanto sopcast-player va a chiudere il "link" (sp-sc) ma non sp-sc-auth, che rimane quindi in esecuzione.
Mi servirebbe quindi uno scriptino che chiuda sp-sc-auth alla chiusura di sopcast-player. Immagino che sia una cosa semplicissima per chi conosce un minimo di bash, ma così non è per me. Qualcuno ha 2 secondi per spiegarmelo?
Grazie
-
ciaccaro85
- Scoppiettante Seguace

- Messaggi: 736
- Iscrizione: mercoledì 28 ottobre 2009, 16:00
Re: Script Chiusura sopcast-player
sp-sc-auth è un processo? cioè, se sopcast-player è in esecuzione, e da terminale digiti ps -A ti compare sp-sc-auth tra i programmi in esecuzione?MrMela ha scritto: Salve a tutti, avrei bisogno di un aiutino semplice semplice (per molti, ma non per me :'()
Al momento sto utilizzando sopcast-player ma ho un problema, per funzionare ha bisogno del pacchetto sp-sc che è stato da poco rinominato dall'autore sp-sc-auth. Sono riuscito ad aggirare il problema in qualche modo (creando un "link" al file in questione) e quindi non ho nessun problema all'avvio. Il problema si pone alla chiusura in quanto sopcast-player va a chiudere il "link" (sp-sc) ma non sp-sc-auth, che rimane quindi in esecuzione.
Mi servirebbe quindi uno scriptino che chiuda sp-sc-auth alla chiusura di sopcast-player. Immagino che sia una cosa semplicissima per chi conosce un minimo di bash, ma così non è per me. Qualcuno ha 2 secondi per spiegarmelo?
Grazie
Make me a sandwich... What??? Make it yourself !
sudo make me a sandwich... OK!
sudo make me a sandwich... OK!
Re: Script Chiusura sopcast-player
Esatto, è un processo che viene avviato all'avvio di sopcast-player
-
ciaccaro85
- Scoppiettante Seguace

- Messaggi: 736
- Iscrizione: mercoledì 28 ottobre 2009, 16:00
Re: Script Chiusura sopcast-player
fai una cosa, apri sopcast-player, mentre è aperto digita sul terminaleMrMela ha scritto: Esatto, è un processo che viene avviato all'avvio di sopcast-player
Codice: Seleziona tutto
ps -AMake me a sandwich... What??? Make it yourself !
sudo make me a sandwich... OK!
sudo make me a sandwich... OK!
Re: Script Chiusura sopcast-player
Eccolo
Codice: Seleziona tutto
andrea@andrea-desktop:~$ ps -A
PID TTY TIME CMD
1 ? 00:00:00 init
2 ? 00:00:00 kthreadd
3 ? 00:00:00 ksoftirqd/0
4 ? 00:00:00 migration/0
5 ? 00:00:00 watchdog/0
6 ? 00:00:00 migration/1
7 ? 00:00:00 ksoftirqd/1
8 ? 00:00:00 watchdog/1
9 ? 00:00:00 migration/2
10 ? 00:00:00 ksoftirqd/2
11 ? 00:00:00 watchdog/2
12 ? 00:00:00 migration/3
13 ? 00:00:00 ksoftirqd/3
14 ? 00:00:00 watchdog/3
15 ? 00:00:00 events/0
16 ? 00:00:00 events/1
17 ? 00:00:00 events/2
18 ? 00:00:00 events/3
19 ? 00:00:00 cpuset
20 ? 00:00:00 khelper
21 ? 00:00:00 netns
22 ? 00:00:00 async/mgr
23 ? 00:00:00 pm
25 ? 00:00:00 sync_supers
26 ? 00:00:00 bdi-default
27 ? 00:00:00 kintegrityd/0
28 ? 00:00:00 kintegrityd/1
29 ? 00:00:00 kintegrityd/2
30 ? 00:00:00 kintegrityd/3
31 ? 00:00:00 kblockd/0
32 ? 00:00:00 kblockd/1
33 ? 00:00:00 kblockd/2
34 ? 00:00:00 kblockd/3
35 ? 00:00:00 kacpid
36 ? 00:00:00 kacpi_notify
37 ? 00:00:00 kacpi_hotplug
38 ? 00:00:00 ata_aux
39 ? 00:00:00 ata_sff/0
40 ? 00:00:00 ata_sff/1
41 ? 00:00:00 ata_sff/2
42 ? 00:00:00 ata_sff/3
43 ? 00:00:00 khubd
44 ? 00:00:00 kseriod
45 ? 00:00:00 kmmcd
71 ? 00:00:00 khungtaskd
72 ? 00:00:00 kswapd0
73 ? 00:00:00 ksmd
74 ? 00:00:00 aio/0
75 ? 00:00:00 aio/1
76 ? 00:00:00 aio/2
77 ? 00:00:00 aio/3
78 ? 00:00:00 ecryptfs-kthrea
79 ? 00:00:00 crypto/0
80 ? 00:00:00 crypto/1
81 ? 00:00:00 crypto/2
82 ? 00:00:00 crypto/3
98 ? 00:00:00 kstriped
99 ? 00:00:00 kmpathd/0
100 ? 00:00:00 kmpathd/1
101 ? 00:00:00 kmpathd/2
102 ? 00:00:00 kmpathd/3
103 ? 00:00:00 kmpath_handlerd
104 ? 00:00:00 ksnapd
105 ? 00:00:01 kondemand/0
106 ? 00:00:01 kondemand/1
107 ? 00:00:00 kondemand/2
108 ? 00:00:00 kondemand/3
109 ? 00:00:00 kconservative/0
110 ? 00:00:00 kconservative/1
111 ? 00:00:00 kconservative/2
112 ? 00:00:00 kconservative/3
292 ? 00:00:01 scsi_eh_0
303 ? 00:00:00 scsi_eh_1
331 ? 00:00:00 scsi_eh_2
332 ? 00:00:00 scsi_eh_3
333 ? 00:00:00 scsi_eh_4
334 ? 00:00:00 scsi_eh_5
335 ? 00:00:00 scsi_eh_6
336 ? 00:00:00 scsi_eh_7
370 ? 00:00:01 v86d
371 ? 00:00:00 cqueue
377 ? 00:00:00 usbhid_resumer
427 ? 00:00:00 jbd2/sdb5-8
428 ? 00:00:00 ext4-dio-unwrit
429 ? 00:00:00 ext4-dio-unwrit
430 ? 00:00:00 ext4-dio-unwrit
431 ? 00:00:00 ext4-dio-unwrit
464 ? 00:00:00 flush-8:16
493 ? 00:00:00 upstart-udev-br
495 ? 00:00:00 udevd
759 ? 00:00:00 edac-poller
903 ? 00:00:00 hd-audio0
1011 ? 00:00:00 hd-audio1
1068 ? 00:00:00 smbd
1080 ? 00:00:00 rsyslogd
1090 ? 00:00:00 dbus-daemon
1111 ? 00:00:00 smbd
1116 ? 00:00:00 NetworkManager
1121 ? 00:00:00 gdm-binary
1123 ? 00:00:00 avahi-daemon
1126 ? 00:00:00 avahi-daemon
1133 ? 00:00:00 cupsd
1138 ? 00:00:00 modem-manager
1143 ? 00:00:00 dhclient
1144 ? 00:00:00 console-kit-dae
1148 ? 00:00:00 wpa_supplicant
1215 ? 00:00:00 gdm-simple-slav
1254 tty7 00:15:52 Xorg
1257 tty4 00:00:00 getty
1261 tty5 00:00:00 getty
1268 tty2 00:00:00 getty
1269 tty3 00:00:00 getty
1271 tty6 00:00:00 getty
1275 ? 00:00:00 acpid
1279 ? 00:00:00 cron
1282 ? 00:00:00 atd
1382 ? 00:00:00 firegl
1383 ? 00:00:00 master
1526 tty1 00:00:00 getty
1596 ? 00:00:00 pickup
1597 ? 00:00:00 qmgr
1608 ? 00:00:00 nmbd
1636 ? 00:00:00 dbus-launch
1656 ? 00:00:00 gdm-session-wor
1663 ? 00:00:00 rtkit-daemon
1668 ? 00:00:00 upowerd
1670 ? 00:00:00 polkitd
1778 ? 00:00:00 gnome-session
1818 ? 00:00:00 ssh-agent
1819 ? 00:00:00 gpg-agent
1822 ? 00:00:00 dbus-launch
1823 ? 00:00:04 dbus-daemon
1828 ? 00:00:00 gconfd-2
1834 ? 00:00:00 gnome-power-man
1835 ? 00:00:00 gnome-keyring-d
1839 ? 00:00:03 gnome-settings-
1844 ? 00:00:00 gvfsd
1849 ? 00:00:00 gvfs-fuse-daemo
1855 ? 00:00:58 compiz
1885 ? 00:00:06 empathy
1887 ? 00:00:00 evolution-alarm
1889 ? 00:00:05 tracker-miner-f
1890 ? 00:00:00 nm-applet
1891 ? 00:00:00 freepopsd
1893 ? 00:00:00 gvfs-gdu-volume
1895 ? 00:00:04 nautilus
1896 ? 00:00:08 gnome-panel
1898 ? 00:00:00 udisks-daemon
1900 ? 00:00:01 udisks-daemon
1902 ? 00:00:52 skype
1903 ? 00:00:00 mail-start
1905 ? 00:00:00 e-calendar-fact
1908 ? 00:00:00 bluetooth-apple
1912 ? 00:00:00 gvfs-afc-volume
1916 ? 00:00:00 gvfs-gphoto2-vo
1917 ? 00:01:16 tracker-store
1919 ? 00:00:00 polkit-gnome-au
1921 ? 00:00:09 transmission
1923 ? 00:00:00 tracker-status-
1925 ? 00:00:00 e-addressbook-f
1930 ? 00:01:37 pulseaudio
1932 ? 00:00:00 mission-control
1944 ? 00:00:02 dropbox
1952 ? 00:00:00 bonobo-activati
1955 ? 00:00:00 gvfsd-trash
1965 ? 00:00:00 telepathy-logge
1971 ? 00:00:12 wnck-applet
1973 ? 00:00:00 trashapplet
1990 ? 00:00:00 indicator-apple
1991 ? 00:00:00 clock-applet
1994 ? 00:00:00 notification-ar
1995 ? 00:00:02 cpufreq-applet
1996 ? 00:00:00 gweather-applet
1997 ? 00:00:00 tracker-search-
1998 ? 00:00:01 indicator-apple
1999 ? 00:00:06 multiload-apple
2018 ? 00:00:06 notify-osd
2036 ? 00:00:00 sh
2037 ? 00:00:03 gtk-window-deco
2058 ? 00:00:00 gvfsd-metadata
2061 ? 00:00:00 indicator-me-se
2069 ? 00:00:00 indicator-appli
2070 ? 00:00:00 indicator-sound
2071 ? 00:00:00 indicator-sessi
2079 ? 00:00:00 indicator-messa
2084 ? 00:00:00 telepathy-gabbl
2085 ? 00:00:02 telepathy-butte
2086 ? 00:00:00 telepathy-salut
2101 ? 00:00:00 gvfsd-burn
2115 ? 00:00:00 gconf-helper
2128 ? 00:00:00 ubuntu-sso-logi
2147 ? 00:00:00 gnome-screensav
2157 ? 00:00:00 gdu-notificatio
2164 ? 00:00:00 applet.py
2165 ? 00:00:04 gwibber-service
2184 ? 00:00:00 gwibber-service
2185 ? 00:00:00 gwibber-service
2186 ? 00:00:00 gwibber-service
2187 ? 00:00:00 gwibber-service
2191 ? 00:00:09 ubuntuone-syncd
2228 ? 00:00:00 mail-notificati
2249 ? 00:00:00 udevd
2250 ? 00:00:00 udevd
3442 ? 00:00:00 hald
3443 ? 00:00:00 hald-runner
3472 ? 00:00:00 hald-addon-inpu
3486 ? 00:00:00 hald-addon-stor
3490 ? 00:00:00 hald-addon-stor
3495 ? 00:00:00 hald-addon-cpuf
3496 ? 00:00:00 hald-addon-acpi
3973 ? 00:00:00 sh <defunct>
4253 ? 00:00:09 chromium-browse
4255 ? 00:00:00 chromium-browse
4257 ? 00:00:00 chromium-browse
4291 ? 00:00:00 chromium-browse
4313 ? 00:00:00 chromium-browse
4334 ? 00:00:04 chromium-browse
4337 ? 00:00:00 chromium-browse
4340 ? 00:00:00 chromium-browse
4375 ? 00:00:00 chromium-browse
4388 ? 00:00:03 npviewer.bin
4420 ? 00:00:08 chromium-browse
4424 ? 00:00:07 chromium-browse
4460 ? 00:00:00 sopcast-player
4461 ? 00:00:00 python
4466 ? 00:00:00 sp-sc
4467 ? 00:00:00 sp-sc-auth
4469 ? 00:00:01 vlc
4502 ? 00:00:00 xdg-screensaver
4507 ? 00:00:00 sleep
4511 ? 00:00:00 xdg-screensaver
4515 ? 00:00:00 xprop
4519 ? 00:00:00 gnome-terminal
4522 ? 00:00:00 gnome-pty-helpe
4523 pts/0 00:00:00 bash
4542 pts/0 00:00:00 ps
-
ciaccaro85
- Scoppiettante Seguace

- Messaggi: 736
- Iscrizione: mercoledì 28 ottobre 2009, 16:00
Re: Script Chiusura sopcast-player
ciao, vedi se questo scriptino può andare bene:
fammi sapere...
Codice: Seleziona tutto
#!/bin/bash
spa="sp-sc-auth"
n_spa_p=$(ps -A | grep "sopcast-player" | awk '{print $1}' | wc -l )
pid=$(ps -A | grep $spa | awk '{print $1}' )
n_running=$(ps -A | grep $spa | awk '{print $1}' | wc -l)
if [ $n_spa_p -gt 0 ]
then
if [ $n_running -gt 0 ]
then
kill -9 $pid
fi
fi
Ultima modifica di ciaccaro85 il domenica 28 novembre 2010, 15:46, modificato 1 volta in totale.
Make me a sandwich... What??? Make it yourself !
sudo make me a sandwich... OK!
sudo make me a sandwich... OK!
Re: Script Chiusura sopcast-player
Grazie, così va bene, ancora meglio sarebbe uno script che posso avviare all'avvio del sistema e che stia fermo in attesa finchè non chiudo sopcast-player. Non so se può essere un'idea o se rallenterebbe il sistema. Comunque adesso vedo se ci capisco qualcosa
Chi c’è in linea
Visualizzano questa sezione: Google [Bot] e 8 ospiti