public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] where to place command to be executed on X.org start
@ 2007-07-31 10:23 Alex V. Fansky
  2007-07-31 10:31 ` Anders Trobäck
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Alex V. Fansky @ 2007-07-31 10:23 UTC (permalink / raw
  To: gentoo-user

Hello,
I want command "xmodmap ~/.Xmodmap" to be executed on my X.org start and even 
restart. Where is the best place to put it?

-- 
Alex V. Fansky
Minsk, BSU
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 10:23 [gentoo-user] where to place command to be executed on X.org start Alex V. Fansky
@ 2007-07-31 10:31 ` Anders Trobäck
  2007-07-31 11:08 ` Peter Ruskin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Anders Trobäck @ 2007-07-31 10:31 UTC (permalink / raw
  To: gentoo-user

On Tue, 31 Jul 2007 13:23:04 +0300
"Alex V. Fansky" <garen@tut.by> wrote:

> Hello,
> I want command "xmodmap ~/.Xmodmap" to be executed on my X.org start
> and even restart. Where is the best place to put it?
> 

How do you start X, XDM, GDM, KDM or maybe startx?

-- 

============================================
Microsoft is not the answer.
Microsoft is the question.
And 'No' is the answer!
--------------------------------------------
Anders Trobäck
http://www.troback.com
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 10:23 [gentoo-user] where to place command to be executed on X.org start Alex V. Fansky
  2007-07-31 10:31 ` Anders Trobäck
@ 2007-07-31 11:08 ` Peter Ruskin
  2007-07-31 12:19   ` Dan Keder
  2007-07-31 13:05 ` Tim Allingham
  2007-07-31 14:26 ` Albert Hopkins
  3 siblings, 1 reply; 16+ messages in thread
From: Peter Ruskin @ 2007-07-31 11:08 UTC (permalink / raw
  To: gentoo-user

On Tuesday 31 July 2007, Alex V. Fansky wrote:
> Hello,
> I want command "xmodmap ~/.Xmodmap" to be executed on my X.org
> start and even restart. Where is the best place to put it?
>
~/.bashrc

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.1.3_rc9		kernel-2.6.22-gentoo-r1
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
KDE: 3.5.7					Qt: 3.3.8
========================================================================
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 11:08 ` Peter Ruskin
@ 2007-07-31 12:19   ` Dan Keder
  2007-07-31 13:04     ` Neil Bothwick
  2007-07-31 13:33     ` Peter Ruskin
  0 siblings, 2 replies; 16+ messages in thread
From: Dan Keder @ 2007-07-31 12:19 UTC (permalink / raw
  To: gentoo-user

Peter Ruskin wrote:
> On Tuesday 31 July 2007, Alex V. Fansky wrote:
> > Hello,
> > I want command "xmodmap ~/.Xmodmap" to be executed on my X.org
> > start and even restart. Where is the best place to put it?
> >
> ~/.bashrc

AFAIK .bashrc is sourced even when no X is running (e.g. when logging in
via ssh).
 

-- 
Dan Keder
http://www.fi.muni.cz/~xkeder/
------------------------------------------------
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 12:19   ` Dan Keder
@ 2007-07-31 13:04     ` Neil Bothwick
  2007-07-31 13:09       ` Arturo 'Buanzo' Busleiman
  2007-07-31 13:58       ` Peter Ruskin
  2007-07-31 13:33     ` Peter Ruskin
  1 sibling, 2 replies; 16+ messages in thread
From: Neil Bothwick @ 2007-07-31 13:04 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Tue, 31 Jul 2007 14:19:29 +0200, Dan Keder wrote:

> > > I want command "xmodmap ~/.Xmodmap" to be executed on my X.org
> > > start and even restart. Where is the best place to put it?
> > >  
> > ~/.bashrc  
> 
> AFAIK .bashrc is sourced even when no X is running (e.g. when logging in
> via ssh).

More importantly, it is not sourced when X starts up.


-- 
Neil Bothwick

*Libra*: /(Sept 23--Oct 23)/ An unfortunate typo on your application
results in your being accepted into the Legion Of Superherpes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 10:23 [gentoo-user] where to place command to be executed on X.org start Alex V. Fansky
  2007-07-31 10:31 ` Anders Trobäck
  2007-07-31 11:08 ` Peter Ruskin
@ 2007-07-31 13:05 ` Tim Allingham
  2007-07-31 14:38   ` Alex V. Fansky
  2007-07-31 14:26 ` Albert Hopkins
  3 siblings, 1 reply; 16+ messages in thread
From: Tim Allingham @ 2007-07-31 13:05 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

On Tue, 2007-07-31 at 13:23 +0300, Alex V. Fansky wrote:
> Hello,
> I want command "xmodmap ~/.Xmodmap" to be executed on my X.org start and even 
> restart. Where is the best place to put it?
> 
> -- 
> Alex V. Fansky
> Minsk, BSU

can't you use .xinitrc for this?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:04     ` Neil Bothwick
@ 2007-07-31 13:09       ` Arturo 'Buanzo' Busleiman
  2007-07-31 13:44         ` Neil Bothwick
  2007-07-31 13:58       ` Peter Ruskin
  1 sibling, 1 reply; 16+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-31 13:09 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Neil Bothwick wrote:
> More importantly, it is not sourced when X starts up.

Try ~/.xinitrc

- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGrzR7AlpOsGhXcE0RChmdAJ9OhtxZowOi0dpCBdzHy6E342bGcACeLiAU
ClXy8Zjk3PM6nFrF5GTCCBk=
=nRwL
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 12:19   ` Dan Keder
  2007-07-31 13:04     ` Neil Bothwick
@ 2007-07-31 13:33     ` Peter Ruskin
  2007-07-31 13:37       ` Arturo 'Buanzo' Busleiman
  1 sibling, 1 reply; 16+ messages in thread
From: Peter Ruskin @ 2007-07-31 13:33 UTC (permalink / raw
  To: gentoo-user

On Tuesday 31 July 2007, Dan Keder wrote:
> Peter Ruskin wrote:
> > On Tuesday 31 July 2007, Alex V. Fansky wrote:
> > > Hello,
> > > I want command "xmodmap ~/.Xmodmap" to be executed on my
> > > X.org start and even restart. Where is the best place to put
> > > it?
> >
> > ~/.bashrc
>
> AFAIK .bashrc is sourced even when no X is running (e.g. when
> logging in via ssh).
>
Yes, but but when you log in to a non-X terminal you can still log 
in - all you get is a message like "xmodmap:  unable to open 
display ''".

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.1.3_rc9		kernel-2.6.22-gentoo-r1
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
KDE: 3.5.7					Qt: 3.3.8
========================================================================
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:33     ` Peter Ruskin
@ 2007-07-31 13:37       ` Arturo 'Buanzo' Busleiman
  0 siblings, 0 replies; 16+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2007-07-31 13:37 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Peter Ruskin wrote:
> Yes, but but when you log in to a non-X terminal you can still log 
> in - all you get is a message like "xmodmap:  unable to open 
> display ''".

Then execute those commands with a conditional test of the $DISPLAY env var...

test -n "$DISPLAY" && some_command_to_run_if_$DISPLAY_has_content

- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
SHOW DE FUTURABANDA - Sabado 18 de Agosto 2007 (Speed King, Capital Federal)
Entradas anticipadas a traves de www.futurabanda.com.ar - Punk Rock Melodico


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGrzsKAlpOsGhXcE0RCgYFAJ0cgUsOKM1OPqndRZyaHiaXBYabegCfURrF
BB0+BtLtMTsKMepBZ5j/lEA=
=ThOQ
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org  start
  2007-07-31 13:09       ` Arturo 'Buanzo' Busleiman
@ 2007-07-31 13:44         ` Neil Bothwick
  0 siblings, 0 replies; 16+ messages in thread
From: Neil Bothwick @ 2007-07-31 13:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

On Tue, 31 Jul 2007 10:09:24 -0300, Arturo 'Buanzo' Busleiman wrote:

> > More importantly, it is not sourced when X starts up.  
> 
> Try ~/.xinitrc

That may work, it depends on how the OP is starting X, which he hasn't
said, despite being asked. It could be .xinitrc, .Xsession
or .kde/Autostart/


-- 
Neil Bothwick

Top Oxymorons Number 24: New classic

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:04     ` Neil Bothwick
  2007-07-31 13:09       ` Arturo 'Buanzo' Busleiman
@ 2007-07-31 13:58       ` Peter Ruskin
  2007-07-31 14:23         ` Neil Bothwick
  2007-07-31 15:08         ` Tim Allingham
  1 sibling, 2 replies; 16+ messages in thread
From: Peter Ruskin @ 2007-07-31 13:58 UTC (permalink / raw
  To: gentoo-user

On Tuesday 31 July 2007, Neil Bothwick wrote:
> > AFAIK .bashrc is sourced even when no X is running (e.g. when
> > logging in via ssh).
>
> More importantly, it is not sourced when X starts up.

Works for me.

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.1.3_rc9		kernel-2.6.22-gentoo-r1
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
KDE: 3.5.7					Qt: 3.3.8
========================================================================
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:58       ` Peter Ruskin
@ 2007-07-31 14:23         ` Neil Bothwick
  2007-07-31 15:08         ` Tim Allingham
  1 sibling, 0 replies; 16+ messages in thread
From: Neil Bothwick @ 2007-07-31 14:23 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

On Tue, 31 Jul 2007 14:58:28 +0100, Peter Ruskin wrote:

> > More importantly, it is not sourced when X starts up.  
> 
> Works for me.

Which proves nothing more than you are starting bash with X. .bashrc is
for Bash, .xinitrc is for X. .bashrc running when X starts for you is a
by-product of your setup, not the way it is intended to be used.


-- 
Neil Bothwick

Macro: (n.) a series of keystrokes used to simulate a missing but
essential command.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 10:23 [gentoo-user] where to place command to be executed on X.org start Alex V. Fansky
                   ` (2 preceding siblings ...)
  2007-07-31 13:05 ` Tim Allingham
@ 2007-07-31 14:26 ` Albert Hopkins
  3 siblings, 0 replies; 16+ messages in thread
From: Albert Hopkins @ 2007-07-31 14:26 UTC (permalink / raw
  To: gentoo-user

On Tue, 2007-07-31 at 13:23 +0300, Alex V. Fansky wrote:
> Hello,
> I want command "xmodmap ~/.Xmodmap" to be executed on my X.org start
> and even 
> restart. Where is the best place to put it? 

Kinda depends on how you start your X session.  I'll talk about the ones
I know about:

      * If you use "startx" or "xinit" to start your X session, then you
        probably already have an ~/.xinitrc. You can put it there.
      * If you use a xdm or similar then you can put it in ~/.xsession.
        By default, though GDM, for example, does not read your
        ~/.xsession, however...
      * GNOME automatically reads your ~/.Xmodmap on startup unless told
        otherwise.  You could also put it in "Control
        Center/Sessions/Startup Programs"
      * I would *not* put it in ~/.bashrc for remote X stuff. the reason
        is that your local machine may, e.g. have a different keyboard
        layout than the remote machine and when you ssh into the remote
        machine it will use the local .Xmodmap.  This is also a problem
        with GNOME's automatic reading of .Xmodmap too, unfortunately.
        If you are using xdm but not GNOME you can probably get around
        it by checking to see if the DISPLAY variable points to a remote
        (or ssh-forwarded) display.

I don't know KDE or other DE's/DM's so cannot say. 

--
Albert W. Hopkins

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:05 ` Tim Allingham
@ 2007-07-31 14:38   ` Alex V. Fansky
  0 siblings, 0 replies; 16+ messages in thread
From: Alex V. Fansky @ 2007-07-31 14:38 UTC (permalink / raw
  To: gentoo-user

В сообщении от Tuesday 31 July 2007 16:05:54 Tim Allingham написал(а):
> On Tue, 2007-07-31 at 13:23 +0300, Alex V. Fansky wrote:
> > Hello,
> > I want command "xmodmap ~/.Xmodmap" to be executed on my X.org start and
> > even restart. Where is the best place to put it?
> >
> > --
> > Alex V. Fansky
> > Minsk, BSU
>
> can't you use .xinitrc for this?

Thanks for your reply. Adding my command to .xinitrc helped

-- 
Alex V. Fansky
Minsk, BSU
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 13:58       ` Peter Ruskin
  2007-07-31 14:23         ` Neil Bothwick
@ 2007-07-31 15:08         ` Tim Allingham
  2007-07-31 15:14           ` Peter Ruskin
  1 sibling, 1 reply; 16+ messages in thread
From: Tim Allingham @ 2007-07-31 15:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

On Tue, 2007-07-31 at 14:58 +0100, Peter Ruskin wrote:
> On Tuesday 31 July 2007, Neil Bothwick wrote:
> > > AFAIK .bashrc is sourced even when no X is running (e.g. when
> > > logging in via ssh).
> >
> > More importantly, it is not sourced when X starts up.
> 
> Works for me.
> 
> -- 
> Peter
> ========================================================================
> Gentoo Linux: Portage 2.1.3_rc9		kernel-2.6.22-gentoo-r1
> AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
> KDE: 3.5.7					Qt: 3.3.8
> ========================================================================

but if you restart X with ctrl-alt-backspace does it continue working?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] where to place command to be executed on X.org start
  2007-07-31 15:08         ` Tim Allingham
@ 2007-07-31 15:14           ` Peter Ruskin
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Ruskin @ 2007-07-31 15:14 UTC (permalink / raw
  To: gentoo-user

On Tuesday 31 July 2007, Tim Allingham wrote:
> On Tue, 2007-07-31 at 14:58 +0100, Peter Ruskin wrote:
> > On Tuesday 31 July 2007, Neil Bothwick wrote:
> > > > AFAIK .bashrc is sourced even when no X is running (e.g.
> > > > when logging in via ssh).
> > >
> > > More importantly, it is not sourced when X starts up.
> >
> > Works for me.
> >
>
> but if you restart X with ctrl-alt-backspace does it continue
> working?

Yes.

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.1.3_rc9			kernel-2.6.22-gentoo-r1
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
KDE: 3.5.7					Qt: 3.3.8
========================================================================
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-07-31 15:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31 10:23 [gentoo-user] where to place command to be executed on X.org start Alex V. Fansky
2007-07-31 10:31 ` Anders Trobäck
2007-07-31 11:08 ` Peter Ruskin
2007-07-31 12:19   ` Dan Keder
2007-07-31 13:04     ` Neil Bothwick
2007-07-31 13:09       ` Arturo 'Buanzo' Busleiman
2007-07-31 13:44         ` Neil Bothwick
2007-07-31 13:58       ` Peter Ruskin
2007-07-31 14:23         ` Neil Bothwick
2007-07-31 15:08         ` Tim Allingham
2007-07-31 15:14           ` Peter Ruskin
2007-07-31 13:33     ` Peter Ruskin
2007-07-31 13:37       ` Arturo 'Buanzo' Busleiman
2007-07-31 13:05 ` Tim Allingham
2007-07-31 14:38   ` Alex V. Fansky
2007-07-31 14:26 ` Albert Hopkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox