command on vc switch

Re: command on vc switch

On Tuesday 21 November 2006 04:40, chris gareau stood up and addressed the
masses in /alt.os.linux.mandrake/ as follows...:
> how do I run a command or script on every vc switch

Perhaps if you told us what your objective is, we could be of more
assistance.

Switching between virtual terminals is something that requires special
privileges assigned to the console user only, but that can be triggered by
a root-only commandline command. Therefore it is important to know what
you have in mind before we can tell you how to do it. ;-)

--
With kind regards,

*Aragorn*
(registered GNU/Linux user #223157)

Re: command on vc switch

I want to run a command everytime the user changes from 1 vc to another.

the idea is to try to have the video card reset everytime I swich vcs
inorder to provent the dam thing locking my hole computer, if I swich to
a text consel then back to x the videocard locks the hole computer, same
thing if I switch from 1 x session to another x session.

I need a way to trap for this and interupt it maby, and trapint
keystrokes will not be enough because I can swich between x sessions on
the k menu to

Aragorn wrote:
> On Tuesday 21 November 2006 04:40, chris gareau stood up and addressed the
> masses in /alt.os.linux.mandrake/ as follows...:
>
>> how do I run a command or script on every vc switch
>
> Perhaps if you told us what your objective is, we could be of more
> assistance.
>
> Switching between virtual terminals is something that requires special
> privileges assigned to the console user only, but that can be triggered by
> a root-only commandline command. Therefore it is important to know what
> you have in mind before we can tell you how to do it. ;-)
>

Re: command on vc switch

On Tuesday 21 November 2006 06:38, chris gareau stood up and addressed the
masses in /alt.os.linux.mandrake/ as follows...:
> I want to run a command everytime the user changes from 1 vc to another.

Well, _that_ part was clear, yes, since you said that literally. ;-)
> the idea is to try to have the video card reset everytime I swich vcs
> inorder to provent the dam thing locking my hole computer, if I swich to
> a text consel then back to x the videocard locks the hole computer, same
> thing if I switch from 1 x session to another x session.

Then there is a problem with your video driver and you should install a more
recent version of it. It is not your videocard that's locking the
computer, it's the driver.
> I need a way to trap for this and interupt it maby, and trapint
> keystrokes will not be enough because I can swich between x sessions on
> the k menu to

As far as I know, the switching between virtual consoles is a kernel thing,
which can be triggered from userspace. However, userspace cannot trap a
kernel event. Others could prove me wrong here, but this is what I believe
to be the case.

Either way and as I said above, your main problem is your video driver. You
should fetch a more updated one, or if your problem is with the latest
driver, you should install a previous version of which you know that it
works.

Re: command on vc switch

the only problem with getting an older driver is that they all have the
same bug, I wish ati would just learn to make a Linux driver properly.

well with that sead is there an alternative to the fglrx driver for a
radeon x1300

Aragorn wrote:
> On Tuesday 21 November 2006 06:38, chris gareau stood up and addressed the
> masses in /alt.os.linux.mandrake/ as follows...:
>
>> I want to run a command everytime the user changes from 1 vc to another.
>
> Well, _that_ part was clear, yes, since you said that literally. ;-)
>
>> the idea is to try to have the video card reset everytime I swich vcs
>> inorder to provent the dam thing locking my hole computer, if I swich to
>> a text consel then back to x the videocard locks the hole computer, same
>> thing if I switch from 1 x session to another x session.
>
> Then there is a problem with your video driver and you should install a more
> recent version of it. It is not your videocard that's locking the
> computer, it's the driver.
>
>> I need a way to trap for this and interupt it maby, and trapint
>> keystrokes will not be enough because I can swich between x sessions on
>> the k menu to
>
> As far as I know, the switching between virtual consoles is a kernel thing,
> which can be triggered from userspace. However, userspace cannot trap a
> kernel event. Others could prove me wrong here, but this is what I believe
> to be the case.
>
> Either way and as I said above, your main problem is your video driver. You
> should fetch a more updated one, or if your problem is with the latest
> driver, you should install a previous version of which you know that it
> works.
>
> P.S.: Please do not top-post. See...
>
> http://www.netmeister.org/news/learn2quote2.html#toc1
>
> ... on how to correctly quote...
>

Re: command on vc switch

chris gareau wrote:
> the only problem with getting an older driver is that they all have the
> same bug, I wish ati would just learn to make a Linux driver properly.
>
> well with that sead is there an alternative to the fglrx driver for a
> radeon x1300
>
have you tried downgrading from fglrx to 'radeon' and if that doesn't
work (ulp!) 'ati' in your xorg.conf

the eliveCD beta 5 if you want to test it out, lets you pick radeon,
then fglrx, and finally if all else fails 'ati'. I find it convenient
to use, simply to try out different settings and resolutions (I have a
multihead setup). With repeated tests I was able to get dual working on
E17 and also AIGLX on MandrivaOneLive on a radeon 7000 VE.

Re: command on vc switch

unfortunitly the x1300 is just above what is supported by the radeon
driver, I checked on the dri website

the ati driver is for older ati hardware.

what about the gatos driver??

shedied@gmail.com wrote:
> chris gareau wrote:
>> the only problem with getting an older driver is that they all have the
>> same bug, I wish ati would just learn to make a Linux driver properly.
>>
>> well with that sead is there an alternative to the fglrx driver for a
>> radeon x1300
>>
> have you tried downgrading from fglrx to 'radeon' and if that doesn't
> work (ulp!) 'ati' in your xorg.conf
>
> the eliveCD beta 5 if you want to test it out, lets you pick radeon,
> then fglrx, and finally if all else fails 'ati'. I find it convenient
> to use, simply to try out different settings and resolutions (I have a
> multihead setup). With repeated tests I was able to get dual working on
> E17 and also AIGLX on MandrivaOneLive on a radeon 7000 VE.
>