*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Pages: [1]
Print
Author Topic: Ratpoison on the XO?  (Read 10947 times)

Ratpoison on the XO?

bc
Contributor
*
Posts: 37


February 04, 2008, 11:08:17 PM

I installed Xubuntu on a USB stick following moocapiean's excellent instructions. From there, it was a simple matter to apt-get ratpoison and create a .xsession file with "exec ratpoison" to start it. However, I would like to be able to run ratpoison instead of Sugar sometimes on the stock Fedora install that comes on the XO. Has anyone been able to do this?

I tried creating a .xsession file for xfce and that worked (following the instructions here: http://wiki.laptop.org/go/Xfce), so I thought it would work for ratpoison as well. Unfortunately it didn't. All I did was 'yum install ratpoison' and created a .xsession file with 'exec ratpoison' in it. However, all that happens is that X starts up and dies, starts and dies, starts and dies, etc until I break in and delete the .xsession file from the console.

Any ideas what I'm doing wrong or what might work?

Thanks,
Bill
Logged

#1 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 05, 2008, 02:04:29 AM

Any ideas what I'm doing wrong or what might work?

I tried the same thing. It seems, that ratpoison wants to load some -misc-*-bold-* font. Due to a bug in the current X version (up to at least joyride-1636), you can install all the fonts you want, X will let you see only the built-in 6x13 and cursor fonts.

It seems, that ratpoison wants this font, even before reading ~/.ratpoisonrc. So configuring a different font didn't solve it for me.

Recompiling ratpoison without the font dependency, looks like the most promising path. I might try this in the near future.

If you find something else, please, post it here.
Logged

#2 Re: Ratpoison on the XO?

bc
Contributor
*
Posts: 37


February 05, 2008, 07:49:39 AM

I tried the same thing. It seems, that ratpoison wants to load some -misc-*-bold-* font. Due to a bug in the current X version (up to at least joyride-1636), you can install all the fonts you want, X will let you see only the built-in 6x13 and cursor fonts.

It seems, that ratpoison wants this font, even before reading ~/.ratpoisonrc. So configuring a different font didn't solve it for me.

Recompiling ratpoison without the font dependency, looks like the most promising path. I might try this in the near future.

Well, it's good to at least know what the problem is. That font bug has been around for a long time and it seems that a lot of people have encountered it when installing and attempting to use other software. Hopefully, the bug will be fixed in X soon and these issues will go away. Has there been any discussion on the developer lists about a potential fix?
 
If you find something else, please, post it here.

I will. Thanks again for your explanation (it stopped me from wasting time trying to change config files for X and ratpoison).

- Bill
Logged

#3 Re: Ratpoison on the XO?

aab@cichlid.com
New

Posts: 2


February 07, 2008, 09:06:38 AM

can you make a symlink to an existing font
with the desired font's name and fool it?
Logged

#4 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 07, 2008, 09:22:17 AM

can you make a symlink to an existing font
with the desired font's name and fool it?

I don't think so. AFAICT the X-server uses only its built in fonts, including their font descriptions.
Logged

#5 Re: Ratpoison on the XO?

sabetts
New

Posts: 2


February 07, 2008, 03:08:58 PM

What version of ratpoison are you trying? 1.4.2 will attempt to load the -*-fixed-bold- font but failing that attempts to load the * font, which should always succeed (at least that's what i gather).

-Shawn
Logged

#6 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 07, 2008, 03:45:14 PM

What version of ratpoison are you trying? 1.4.2 will attempt to load the -*-fixed-bold- font but failing that attempts to load the * font, which should always succeed (at least that's what i gather).

-Shawn

1.4.1-0.fc7

Close, but not close enough. Seems like I'll have to set up some cross compilation environment.

Thanks for the help.
Logged

#7 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 08, 2008, 06:24:57 AM

Status update: I managed to compile ratpoison 1.4.2 on the XO. I had to hack the sources a little, so I am not sure, if everything works as expected yet. But the basic functionality is there.

Shawn, I don't know if you read this regularly, maybe I should post this to ratpoison-devel. Anyway:

- No, ratpoison 1.4.2 does not fall back to font "*". The PRINT_ERROR statement terminates the program. The fall back code is never executed.
- I had to install libXinerama-devel to compile it, even if I disabled Xinerama.
- configure also fails to find the X11 libraries and headers. I had to use --with-xlibraries, --with-x-includes. No big deal (except, that I'm a moron and needed a day to figure this out), but maybe a newer version can make this easier?
- I had to comment out 4 XTestFakeButtonEvent statements, because there is no XTest-devel package for the XO.
- How are my chances to hack ratpoison to use fontconfig/Xft for the command-window?

bc: It seems, there is a chance to make ratpoison work with some hacking. If this is too much for you, send me your email address, and I can send you the executable.

Heng
Logged

#8 Re: Ratpoison on the XO?

bc
Contributor
*
Posts: 37


February 08, 2008, 01:29:04 PM

Status update: I managed to compile ratpoison 1.4.2 on the XO. I had to hack the sources a little, so I am not sure, if everything works as expected yet. But the basic functionality is there.

Shawn, I don't know if you read this regularly, maybe I should post this to ratpoison-devel. Anyway:

- No, ratpoison 1.4.2 does not fall back to font "*". The PRINT_ERROR statement terminates the program. The fall back code is never executed.
- I had to install libXinerama-devel to compile it, even if I disabled Xinerama.
- configure also fails to find the X11 libraries and headers. I had to use --with-xlibraries, --with-x-includes. No big deal (except, that I'm a moron and needed a day to figure this out), but maybe a newer version can make this easier?
- I had to comment out 4 XTestFakeButtonEvent statements, because there is no XTest-devel package for the XO.
- How are my chances to hack ratpoison to use fontconfig/Xft for the command-window?

bc: It seems, there is a chance to make ratpoison work with some hacking. If this is too much for you, send me your email address, and I can send you the executable.

Hey Heng,

Great news! If you can tell me what you did (e.g. - which libs you had to install, their versions, which ratpoison (tarball or git) and what patches you applied), I would prefer to build it myself. It might also make sense to take this discussion to the ratpoison developer list so that we can make certain that Shawn sees all comments and that any mods get incorporated into ratpoison. Once there's a 'permanent' fix in place, we can post detail back here so that others know what to do.

If you want to email me, my email address is "billclem" at "gmail.com".

Thanks again for your help with this!
- Bill
Logged

#9 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 08, 2008, 02:16:14 PM

Hi Bill,

OK, I'll try to remember everything. But still, somehow you will be the lab-rat. And I will feed you the poison. ;oP

Warning: I spent most of the day setting up rxvt-unicode and xft-xemacs, so it's really, really hard to remember. Please document everything you find here, just in case, that there is a third ratpoison fan here.

Libraries, that I remember: libX11-devel, libXinerama-devel, (maybe libXt-devel)
Other tools: gcc, make

Use ./configure with at least "--x-includes=/usr/include/X11 --x-libraries=/usr/lib/libX11.so" (--no-xinerama is probably useful, too)

In src/conf.h find the line with
#define DEFAULT_FONT ...
and change it to
#define DEFAULT_FONT "fixed"

In src/actions.c find the four lines with "XTestFakeButtonEvent".

The first two should be around line 3100. Just comment them out (or #ifdef them out, if you like it cleaner).

The next two are a few lines below (~3120) in a "if ... else if ... else return ..." construct. Comment out that whole thing (6 lines)

Unless, I forgot something (which is likely), everything should compile now.

If something doesn't work, just write here, it's probably in some corner of my head.

Good luck
Heng

PS: sources were from ratpoison-1.4.2.tar.gz
« Last Edit: February 08, 2008, 02:19:41 PM by Heng » Logged

#10 Re: Ratpoison on the XO?

bc
Contributor
*
Posts: 37


February 11, 2008, 03:20:56 PM

Hi Bill,

OK, I'll try to remember everything. But still, somehow you will be the lab-rat. And I will feed you the poison. ;oP

Warning: I spent most of the day setting up rxvt-unicode and xft-xemacs, so it's really, really hard to remember. Please document everything you find here, just in case, that there is a third ratpoison fan here.

Libraries, that I remember: libX11-devel, libXinerama-devel, (maybe libXt-devel)
Other tools: gcc, make

Use ./configure with at least "--x-includes=/usr/include/X11 --x-libraries=/usr/lib/libX11.so" (--no-xinerama is probably useful, too)

In src/conf.h find the line with
#define DEFAULT_FONT ...
and change it to
#define DEFAULT_FONT "fixed"

In src/actions.c find the four lines with "XTestFakeButtonEvent".

The first two should be around line 3100. Just comment them out (or #ifdef them out, if you like it cleaner).

The next two are a few lines below (~3120) in a "if ... else if ... else return ..." construct. Comment out that whole thing (6 lines)

Unless, I forgot something (which is likely), everything should compile now.

If something doesn't work, just write here, it's probably in some corner of my head.

Good luck
Heng

PS: sources were from ratpoison-1.4.2.tar.gz


Hi Heng,

Sorry it's taken me a while to reply but I was sick all weekend with the flu. I'm feeling better today, so I followed your instructions to build ratpoison. For any others who might want to follow along, here are the steps I did:

su
yum -y install gcc
yum -y install gcc-c++    # probably didn't need this one
yum -y install make
yum -y iinstall libXinerama-devel   # libX11-devel is included with libXinerama-devel install
exit
wget http://savannah.nongnu.org/download/ratpoison/ratpoison-1.4.2.tar.gz
tar -xzf ratpoison-1.4.2.tar.gz
cd ratpoison-1.4.2/src
(Edit actions.c: commented out 2 lines at ~3100 and 6 lines at ~3120 as you indicated)
cd ..
./configure --x-includes=/usr/include/X11 --x-libraries=/usr/lib/libX11.so
make
su
make install
exit
(for some reason, make install didn't install the ratpoison binary anywhere in my path, so I had to do:)
su
cp src/ratpoison /usr/bin/
exit
(created a ~/.xsession file with the following 2 lines in it:)
ratpoison
exit 0

Then, I restarted the XO and ratpoison came up! Yay! Unfortunately, the default font is way too small and I couldn't figure out any way to change the default font. I presume this is the "standard" font problem on the XO and that there's not anything that can be done about this until a fix is made?

So, thanks again for all your help Heng!

- Bill

Logged

#11 Re: Ratpoison on the XO?

Heng
Senior Contributor
**
Posts: 123


1⌨→x̊


February 11, 2008, 04:55:41 PM

Sorry it's taken me a while to reply but I was sick all weekend with the flu. I'm feeling better today, so I followed your instructions to build ratpoison.
Hey, no problem. My ratpoison worked already.

I'm glad you're feeling better now.
Quote
(for some reason, make install didn't install the ratpoison binary anywhere in my path, so I had to do:)
For some reason, "/usr/local/bin" is not in the PATH by default. You should better change that. Then you can also get rid of your other copy in /usr/bin.
Quote
Then, I restarted the XO and ratpoison came up! Yay! Unfortunately, the default font is way too small and I couldn't figure out any way to change the default font. I presume this is the "standard" font problem on the XO and that there's not anything that can be done about this until a fix is made?
Well, there is something, but that is probably a little hard: Hacking ratpoison to support Xft. I don't know enough about X programming to estimate how hard it would be, but definitely not easy. (And there is so much to explore with the XO, that hacking a window manager doesn't feel sexy enough. Maybe later)

I have this slight feeling in the back of my head that the "X font bug" is actually meant to be an incentive to port more applications to Xft.

/Conspiracy theory

Glad you made it (health and ratpoison)
Heng
Logged

#12 Re: Ratpoison on the XO?

bc
Contributor
*
Posts: 37


February 11, 2008, 05:28:45 PM

I'm glad you're feeling better now.

Thanks - I certainly wasn't a happy camper the past few days!

Quote
> (for some reason, make install didn't install the ratpoison binary anywhere in my path,
> so I had to do:)

For some reason, "/usr/local/bin" is not in the PATH by default. You should better change that. Then you can also get rid of your other copy in /usr/bin.

Thanks for pointing that out. I've also added /sbin:/usr/sbin:/usr/local/sbin to the PATH.

Quote
> Then, I restarted the XO and ratpoison came up! Yay! Unfortunately, the default font is
> way too small and I couldn't figure out any way to change the default font. I presume this
> is the "standard" font problem on the XO and that there's not anything that can be done
> about this until a fix is made?

Well, there is something, but that is probably a little hard: Hacking ratpoison to support Xft. I don't know enough about X programming to estimate how hard it would be, but definitely not easy. (And there is so much to explore with the XO, that hacking a window manager doesn't feel sexy enough. Maybe later)

I have this slight feeling in the back of my head that the "X font bug" is actually meant to be an incentive to port more applications to Xft.

/Conspiracy theory

I have no experience at all with X programming. However, I'll send a summary to Shawn and see whether he has any alternative suggestions.

Quote
Glad you made it (health and ratpoison)

Me too! ;-)

Thanks,
Bill
Logged

#13 Re: Ratpoison on the XO?

sabetts
New

Posts: 2


February 11, 2008, 11:46:21 PM

- No, ratpoison 1.4.2 does not fall back to font "*". The PRINT_ERROR statement terminates the program. The fall back code is never executed.
I was unabled to reproduce this:
I changed DEFAULT_FONT to "aoeusntuesnth" in conf.h and compiled. ratpoison booted fine but printed the error
Code:
ratpoison:main.c:533: error: ratpoison: Cannot load font blaaaahfoooeusahus.
If you look at the PRINT_ERROR macro in ratpoison.h you will see that it doesn't terminate the program.

Quote
- I had to install libXinerama-devel to compile it, even if I disabled Xinerama.
I was unable to reproduce this. Here is the relevant chunk of configure output:
Code:
checking for X11/extensions/Xinerama.h... no
checking for XMissingExtension in -lXext... yes
checking for XineramaQueryScreens in -lXinerama... no
checking for XTestFakeButtonEvent in -lXtst... no
ratpoison compiled fine. Do you have a xinerama.h but no libxinerama?

Quote
- configure also fails to find the X11 libraries and headers. I had to use --with-xlibraries, --with-x-includes. No big deal (except, that I'm a moron and needed a day to figure this out), but maybe a newer version can make this easier?
Detecting X11 is part of autoconf. Perhaps a bug should be filed with the package maintainer?

Quote
- I had to comment out 4 XTestFakeButtonEvent statements, because there is no XTest-devel package for the XO.
In the git repository these are now ifdef'd out.

Quote
- How are my chances to hack ratpoison to use fontconfig/Xft for the command-window?
I believe the function calls are very similar, so probably it wouldn't be too hard.

When we've sorted this out I'll put out another release for bill.

-Shawn
Logged
Pages: [1]
Print
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
September 06, 2010, 01:35:10 AM

Login with username, password and session length
Recent Topics
[September 05, 2010, 11:51:10 PM]

[September 05, 2010, 09:25:21 PM]

by Rao
[September 05, 2010, 08:27:23 AM]

by anna
[September 04, 2010, 01:56:30 PM]

[August 30, 2010, 11:26:07 PM]

[August 30, 2010, 11:23:56 PM]

[August 30, 2010, 10:40:34 AM]

[August 28, 2010, 10:00:01 PM]

[August 25, 2010, 03:10:02 PM]

[August 22, 2010, 09:48:07 AM]
Members
Total Members: 4557
Latest: Helenwh
Stats
Total Posts: 31126
Total Topics: 3759
Online Today: 43
Online Ever: 220
(February 05, 2009, 11:29:32 AM)
Users Online
Users: 0
Guests: 26
Total: 26