Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GELÖST Script beim Wechsel der Konsole automatisch ausführen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Sat May 06, 2006 3:42 pm    Post subject: GELÖST Script beim Wechsel der Konsole automatisch ausführ Reply with quote

Hi

Ich möchte gerne wenn ich über die f-tasten die
Konsole Wechsel das automatisch ein Script
ausgeführt wird auf der neuen Konsole. Habe
aber bisher nichts gefunden wie ich das
anstellen kann. Kann mir jemand auf die Sprünge
helfe?

MfG


Last edited by fuchur on Sat May 13, 2006 6:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2616
Location: Konradsreuth (Germany)

PostPosted: Sat May 06, 2006 4:31 pm    Post subject: Reply with quote

Wird nicht die ~/.bashrc beim Öffnen einer neuen Konsole und ~/.bash_logout beim Schließen ausgeführt? Also ich hab zumindest in meiner ~/.bash_logout "clear" drinstehen, was auch immer gemacht wird, wenn ich "logout" eingebe.
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Sat May 06, 2006 5:33 pm    Post subject: Reply with quote

Hi
Libby wrote:
Wird nicht die ~/.bashrc beim Öffnen einer neuen Konsole und ~/.bash_logout beim Schließen ausgeführt? Also ich hab zumindest in meiner ~/.bash_logout "clear" drinstehen, was auch immer gemacht wird, wenn ich "logout" eingebe.


Danke für die Antwort aber da habe ich mich wohl nicht richtig ausgedrückt.
Zur besserem verständnis:
Für meine Matrox Grafikkarten gibt es ein Programm
das nennt sich "maven-prog" damit kann ich die Helligkeit/Kontrast usw.
auf der Konsole einstellen. Wenn ich aber die Konsole wechsel werden
die Einstellungen wider vergessen. Auch bin ich nicht immer als Benutzer
auf jeder Konsole angemeldet da das für Multimedia ist (Freevo usw.)
Das heißt ich suche eine Möglichkeit das sobald die Konsole gewechselt/zurück gewechselt
ob angemeldet oder nicht das Script ausgeführt wird. Hoffe es ist nun verständlicher.

MfG
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2616
Location: Konradsreuth (Germany)

PostPosted: Sun May 07, 2006 9:02 am    Post subject: Reply with quote

Also, wie man das Login-unabhängig machen kann ... keine Ahnung ... aber das müßte ja dann ein Programm übernehmen, was danach Ausschau hält, was du für Tasten drückst -- vielleicht gibt's ja sowas?
Back to top
View user's profile Send private message
Qubit
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 136
Location: /dev/urandom

PostPosted: Sat May 13, 2006 9:20 am    Post subject: Reply with quote

Hi,

evtl. kannst Du Dir eine eigene Keymap erstellen...

Qubit.
_________________
©Qubit
Back to top
View user's profile Send private message
Fauli
l33t
l33t


Joined: 24 Apr 2004
Posts: 760
Location: Moers, Germany

PostPosted: Sat May 13, 2006 12:23 pm    Post subject: Reply with quote

Am besten googlest du mal nach VT_WAITACTIVE.

Hier ein kleines Python-Skript zum "Spielen". Als Parameter erwartet das Skript die Nr. des Terminals, auf dessen Aktivierung gewartet werden soll.
Code:
#!/usr/bin/python

import fcntl, os, sys
VT_WAITACTIVE = 0x5607

tty_nr = int(sys.argv[1])
ctl_tty = os.open("/dev/tty", os.O_RDWR)

fcntl.ioctl(ctl_tty, VT_WAITACTIVE, tty_nr)
print "VT %d wurde aktiviert!" % tty_nr

_________________
Do your part to beautify the web! Turn off link underlining!
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Sat May 13, 2006 6:23 pm    Post subject: Reply with quote

Hi

Fauli wrote:
Am besten googlest du mal nach VT_WAITACTIVE.

Hier ein kleines Python-Skript zum "Spielen". Als Parameter erwartet das Skript die Nr. des Terminals, auf dessen Aktivierung gewartet werden soll.
Code:
#!/usr/bin/python

import fcntl, os, sys
VT_WAITACTIVE = 0x5607

tty_nr = int(sys.argv[1])
ctl_tty = os.open("/dev/tty", os.O_RDWR)

fcntl.ioctl(ctl_tty, VT_WAITACTIVE, tty_nr)
print "VT %d wurde aktiviert!" % tty_nr


Danke das wird mir sicher weiterhelfen.

MfG
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum