Mailing List Archive

Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[.Mandrake Cooker system, although I'm not sure that this is a
Mandrake Cooker specific problem]

I've got the following ~/.xinitc:

xset -dpms s off &
irxevent &
mythfrontend &
blackbox

And autologin is set. When the box reboots it automatically starts
as the mythtv user, and mythfrontend comes up. The issue is that the
fonts for the opening screen (and others) are _tiny_.

Now, if I exit out of mythfrontend, then exit out of blackbox, I get
taken to the KDM login screen. If I login as mythtv with blackbox as
the WM, open a terminal session and type the above commands,
mythfrontend comes up in all of its beautiful glory.

I've tried to add:
export QTDIR=/usr/lib/qt3
PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/usr/lib/q
t3/bin:/home/mythtv/bin
export QT_XFT=1

to the top of the file, but it's still not looking right. Any
thoughts / suggestions?

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPsJUMfc1NpCTlP0JEQLPRACg7js0bOkdmOBt3FjRc9JMr2XgSsMAn3Fq
3rLNCFlA6VI5FoklEOw0nNaV
=CFzf
-----END PGP SIGNATURE-----
RE: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
Hmmm... I'm not exactly sure why the font problem, but here's a couple of
little things:

- get rid of the '&' at the end of your 'xset' command, it's not needed
- make mythfrontend the last thing (no '&'), add a '&' to blackbox, so:

xset -dpms s off
irxevent &
blackbox &
mythfrontend

like so. I suppose it might be possible that if you start mythfrontend
before the window manager, weird things could happen. It's certainly worth
a try. Plus, this has the added feature of terminating your X session if
mythfrontend dies. If this is not desired, you can tweak the script to
respawn mythfrontend in an infinite loop, or something like that.

Incidentally, I have a similar setup (using fvwm) with no font problems.
However, my script, instead of living as .xinitrc, lives as
/etc/X11/gdm/Sessions/MythSession. I have gdm set up to auto-login the 'tv'
user, with the default session for the 'tv' user defined to be MythSession.
Works fine, except it seems the minimum login delay is 5 seconds for gdm
(but that's only annoying if mythfrontend crashes & the session restarts).

-JAC

> -----Original Message-----
> From: mythtv-users-bounces@snowman.net
> [mailto:mythtv-users-bounces@snowman.net]On Behalf Of Robert Kulagowski
> Sent: Wednesday, May 14, 2003 10:35 AM
> To: 'Discussion about mythtv'
> Subject: [mythtv-users] Crappy looking fonts when run from
> autologin/.xinitrc, beautiful fonts when run from KDM/terminal session
>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [.Mandrake Cooker system, although I'm not sure that this is a
> Mandrake Cooker specific problem]
>
> I've got the following ~/.xinitc:
>
> xset -dpms s off &
> irxevent &
> mythfrontend &
> blackbox
>
> And autologin is set. When the box reboots it automatically starts
> as the mythtv user, and mythfrontend comes up. The issue is that the
> fonts for the opening screen (and others) are _tiny_.
>
> Now, if I exit out of mythfrontend, then exit out of blackbox, I get
> taken to the KDM login screen. If I login as mythtv with blackbox as
> the WM, open a terminal session and type the above commands,
> mythfrontend comes up in all of its beautiful glory.
>
> I've tried to add:
> export QTDIR=/usr/lib/qt3
> PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/usr/lib/q
> t3/bin:/home/mythtv/bin
> export QT_XFT=1
>
> to the top of the file, but it's still not looking right. Any
> thoughts / suggestions?
RE: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> - get rid of the '&' at the end of your 'xset' command, it's
> not needed - make mythfrontend the last thing (no '&'), add a '&'
> to blackbox, so:
>
> xset -dpms s off
> irxevent &
> blackbox &
> mythfrontend
>
> like so. I suppose it might be possible that if you start
> mythfrontend before the window manager, weird things could happen.
> It's certainly worth a try. Plus, this has the added feature of
> terminating your X session if mythfrontend dies. If this is not
> desired, you can tweak the script to respawn mythfrontend in an
> infinite loop, or something like that.

Didn't work, I'm going to try the gdm method.

Thanks.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPsJ44vc1NpCTlP0JEQJ6hACfQtUtfDSGIVYnf93tG34OESpSLwYAoK0Z
BA3bwCtT9vn0LiH7Gqo6n+lZ
=k+b4
-----END PGP SIGNATURE-----
RE: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Incidentally, I have a similar setup (using fvwm) with no
> font problems.
> However, my script, instead of living as .xinitrc, lives as
> /etc/X11/gdm/Sessions/MythSession. I have gdm set up to
> auto-login the 'tv' user, with the default session for the 'tv'
> user defined to be MythSession. Works fine, except it seems the
> minimum login delay is 5 seconds for gdm (but that's only annoying
> if mythfrontend crashes & the session restarts).

Can you post the MythSession? I've created one, configured gdm to
autologin the "mythtv" user; blackbox starts, but mythfrontend
doesn't come up. I've moved my .xinitrc out of the way for now.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPsKAHPc1NpCTlP0JEQKbnACeNp5sqg111tqhIikutXgnVymx+uwAoIeq
66YuonfE6R+XpFBNn+SYe9BC
=Pifr
-----END PGP SIGNATURE-----
Re: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
(Just some guesses here.) I believe MythTV uses the Arial
font. Do you have the MS fonts installed? Maybe KDE adds the
appropriate font path? You can compare the result of "xset q" in both
sessions.

What's your desktop size? If it's 800x600 or larger, you can
also try running X with "-dpi 100". I don't know where the right
place to do this would be with autologin but if it's using startx I
guess you could create a .xserverrc which contained:

#!/bin/sh
DISPLAY=${DISPLAY:-:0}
export DISPLAY
exec X -dpi 100 $*

I've also run into a problem with Qt not using TrueType fonts
(no anti-aliasing) and found out that it had been set up to substitute
Helvetica for Arial. I fixed this by running "qtconfig".
--
Gregorio Gervasio, Jr.
gtgj@pacbell.net
Re: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
> Can you post the MythSession? I've created one, configured gdm to
> autologin the "mythtv" user; blackbox starts, but mythfrontend
> doesn't come up. I've moved my .xinitrc out of the way for now.


********** BEGIN File /etc/X11/gdm/Sessions/MythTv ******
#!/bin/bash

# Start the window manager first
/usr/X11R6/bin/fvwm2 &

# We're using LIRC
/usr/local/bin/irxevent &

# Disable DPMS & screensaver
xset -dpms s off s noblank s noexpose

# This is just for me, so I can use my wife's
# iBook as a wireless keyboard using osx2x :-)
xhost +

# Used to have some problems where mythfrontend would hang/die
# if it started too quickly -- I think it was device permissions, now fixed.
# Should remove this.
sleep 5

# Startup mythfrontend, redirect stdou & stderr to a logfile
/usr/local/bin/mythfrontend 2>&1 > ${HOME}/.mythtv/mythfrontend.log

# If mythfrontend dies, kill irxevent.
# Session will exit, gdm will auto login again
killall irxevent

********** END File /etc/X11/gdm/Sessions/MythTv ******

-JAC
Re: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
Joseph A. Caputo wrote:

>xhost +
>
Don't do that, you disable *any* security. If you ever enter a password
on X or write an email, anybody able to connect to your computer can
read it. Granted, it's unlikely that you'll enter passwords in your
MythTV session, but just in case anybody copies that for other purposes.
Always use specific hostnames or IP addresses on your local network, e.g.
xhost +joeyosx
xhost +192.168.1.2
RE: Crappy looking fonts when runsession [ In reply to ]
I know; I got lazy b/c I'm behind a firewall.

> -----Original Message-----
> From: mythtv-users-bounces@snowman.net
> [mailto:mythtv-users-bounces@snowman.net]On Behalf Of Ben Bucksch
> Sent: Wednesday, May 14, 2003 3:39 PM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Crappy looking fonts when run
> fromautologin/.xinitrc, beautiful fonts when run from KDM/terminal
> session
>
>
> Joseph A. Caputo wrote:
>
> >xhost +
> >
> Don't do that, you disable *any* security. If you ever enter a password
> on X or write an email, anybody able to connect to your computer can
> read it. Granted, it's unlikely that you'll enter passwords in your
> MythTV session, but just in case anybody copies that for other purposes.
> Always use specific hostnames or IP addresses on your local network, e.g.
> xhost +joeyosx
> xhost +192.168.1.2
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
RE: Crappy looking fonts when runsession [ In reply to ]
> -----Original Message-----
> Always use specific hostnames or IP addresses on your local network, e.g.
> xhost +joeyosx
> xhost +192.168.1.2
>

Even that's not secure; it's relatively easy to spoof a hostname or Class C
IP address. Let's face it; X is not a very secure protocol!
Re: Crappy looking fonts when runsession [ In reply to ]
Unless it's wrapped in SSH, then it's tolerable.

schu

Joseph A. Caputo wrote:
>>-----Original Message-----
>>Always use specific hostnames or IP addresses on your local network, e.g.
>>xhost +joeyosx
>>xhost +192.168.1.2
>>
>
>
> Even that's not secure; it's relatively easy to spoof a hostname or Class C
> IP address. Let's face it; X is not a very secure protocol!
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Crappy looking fonts when run from autologin/.xinitrc, beautiful fonts when run from KDM/terminal session [ In reply to ]
Robert Kulagowski wrote:

> ...The issue is that the
> fonts for the opening screen (and others) are _tiny_.
>
> Now, if I exit out of mythfrontend, then exit out of blackbox, I get
> taken to the KDM login screen. If I login as mythtv with blackbox as
> the WM, open a terminal session and type the above commands,
> mythfrontend comes up in all of its beautiful glory.

One thing that you may wan to check is "xset -q" in each
context to see if the Font Path is different. KDM may be
adding the elements you need when it starts up. If this
is the case, you should be able to add these to your font
path for blackbox.

-- bjm
Re: X security (was:Crappy looking fonts when runsession) [ In reply to ]
On Wed, May 14, 2003 at 01:34:27PM -0800, Matthew Schumacher wrote:
> Unless it's wrapped in SSH, then it's tolerable.
>

SSH forwarding removes any need for X to listen on a TCP port. I think
most distros are turning that off these days, but if they're not... turn
it off yourself. X runs as root, and is huge... its just too dangerous
to have listening.

[snip]

> >IP address. Let's face it; X is not a very secure protocol!