Tuesday, May 5, 2015

My WindowMaker config on Jessie, Part 1

Got a new PowerBook G4 17" recently, model A1107 1.67Ghz. That one . At about the same time Debian 8 Jessie turned stable. Earlier, I updated a PowerBook G3 Pismo from Wheezy with no problem, Tried installing on another PowerBook 17", but it wasn't really a success...

With that one in hand , time to try a clean Debian 8 install, with a WindowMaker/GNUstep configuration.
Why WindowMaker ? Because I like it. It looks like NeXTstep/OPENSTEP, it's part of my retro-ish Macintosh-Apple-NexT obsession. Also it's light, very usable , and can make a beautiful desktop when nicely configured (well, to my taste, that is…). Installing a new system is an occasion to see if the configuration that I like works .
I followed the PPC Luddite installation guide, recently updated for Jessie. It's very well done. I'll only add here things specific for this PowerBook 17" and different things i've installed. I checked Lxde install during the process, I like to have it as a fall back wm, it comes with a decent set of apps, like Pcmanfm and other standards that are good to have . Also the machine has a decent speed (1.67Ghz) and a 80Gb partition for Debian, so I don't have to worry too much about cluttering the system.
Installation went smoothly, contrary to my earlier try on another PB 17" when I had chosen Gnome as wm during install. As I said earlier , it went bad. Wouldn't even go to the login screen…
Anyway, all fine of that one. So after login to Lxde, I got this :


Mmmh… not exactly, I had already set the menu panel to transparent there :)
But anyway.
I added my user to the sudoers file , as per the PPC Luddite guide, in a terminal, login as root , type "su" (without quotes)
, type your root password. then type :
nano /etc/sudoers
Than will open sudoers file in nano text editor.
check for the line :
root    ALL=(ALL:ALL) ALL
and start another line after that one with :
User  ALL=(ALL:ALL) ALL
User being your login name.
then ctrl-o to save (as sudoers, erase .temp before saving…) , and crl-x to quit nano.
VoilĂ , you are the real master.

Then, as this Powerbook has a French azerty keyboard , I had selected French keyboard during installation. This gave a French keyboard, but not a French PowerBook keyboard, so had to be careful when choosing passwords for root and users. some keys are misplaced. for example if you want a - sign , you have to press § key… letters and numbers (these works with the shift key on azerty keyboards) are fine. But we have to put all that in order for the other keys.
Back to the terminal , type :
sudo nano /etc/default/keyboard
it will ask your password and open the keyboard config file in nano.
edit it to look like this :

XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="mac"
XKBOPTIONS="lv3:switch,compose:lwin"

then ctrl-o to save and ctrl-x to quit. After reboot you should have a French powerBook keyboard.
Well , there's a caveat for aluminum PowerBooks like that one , the @ and  < keys are swapped… it's the only thing I've found. Funnily , with that config, on older PowerBook models like the Pismo or Wallstreet, the all keyboard works ok, with @ and <  in their right places… So there is maybe a specific config change to make for French Al PowerBook keyboards, but I don't know it.

Next, time to see into that KMS thing. As I said , it booted without problem to lxde after install, I noticed that dragging Pcmanfm windows was a bit slow though.
On infos about KMS (now enabled by default on Jessie) and ATI graphic cards , I can only point again to the PPC Luddite configuring topic on graphic settings, very complete, and also to RicanLinux blog page on setting graphics in Ubuntu-MATE on a iBook G4. I used the settings on that last page, only changed the resolution to fit my screen. So edited the yaboot.conf to set KMS to work fine with the ATI card at boot, like so :
sudo nano /etc/yaboot.conf
opens the yaboot.conf file in nano, and add this :

image=/boot/vmlinux
        label=Linux
        read-only
        initrd=/boot/initrd.img
        append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1680x1050-32 radeon.agpmode=-1"

image=/boot/vmlinux.old
        label=old
        read-only
        initrd=/boot/initrd.img.old
        append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1680x1050-32 radeon.agpmode=-1"

Ctrl-o to save, ctrl-x to quit. Then type in the terminal :
sudo ybin -v
to apply the change at boot.
After that, I typed this :
cat /var/log/Xorg.0.log |grep -e drm -e dri2 -e radeon -e KMS
to see if KMS is enabled fine. I got :

[   103.096] Kernel command line: root=UUID=73772be9-14c1-481b-a91c-eb4a4f2e334e ro quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1680x1050-32 radeon.agpmode=-1 
[   103.479] (II) xfree86: Adding drm device (/dev/dri/card0)
[   104.057] (II) LoadModule: "radeon"
[   104.057] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[   104.112] (II) Module radeon: vendor="X.Org Foundation"
[   104.235] (II) [KMS] Kernel modesetting enabled.
[   104.275] (II) Loading sub module "dri2"
[   104.275] (II) LoadModule: "dri2"
[   104.275] (II) Module "dri2" already built-in
[   104.286] (II) RADEON(0): KMS Color Tiling: enabled
[   104.286] (II) RADEON(0): KMS Color Tiling 2D: disabled
[   104.287] (II) RADEON(0): KMS Pageflipping: enabled

Which is not too different from the result RicanLinux got with his iBook, so I suppose it's working here… Note that , as pointed on PPC Luddite, sleep is now broken on PPC with KMS :/
So maybe I'll try using Wheezy kernel back to solve the problem. But that latter.

Time to install my beloved WindowMaker . With jessie we have version 0.95.5, with drawers ! Apart from that it's not much of a change, on Wheezy we had  0.95.3. Can be done through Synaptic , or through the command line like so :
sudo apt-get install wmaker
Then after logout and choosing WindowMaker in the login manager instead of Lxde in the upper right menu, we have the default WindowMaker desktop.


Note I used Gnome-screenshots to make all the … screenshots in this post. That is the icon on the lower left corner. can't remember if it was installed by default , but if it's not :
sudo apt-get install gnome-screenshot
will get it for you.
gnome-screenshot -i
Will open the gui for you.
Next I installed Guake . That is a nice drop down terminal, like in Quake:

Console in Quake
On my finished config, it looks like this :

Guake console
To have that terminal always available from an hot-key.
sudo apt-get install guake
btw ,  if you look for the same thing for OSX , Visor (for PPC and Intel) or Total-Terminal (Intel only) will do . Back to Guake, if you try to launch it now with :
guake
command in the "run" menu from the WindowMaker main app menu , you'll get nothing, and if you try in the Xterm terminal, you'll get an error. that is because the notification option is activated by default in Guake preferences, and we don't have a notification system with WindowMaker. So, to open the Guake preferences gui , type... :
guake-prefs

 

And there , uncheck "Enable popup notifications on startup".  In the keyboard shortcut tab , you can customize your activation hot-key, I usually use Shift-left.


Many other options in these preferences, like colors, fonts , window transparency…
Now to have Guake launched at start-up, You can  add "guake &" (without quotes) in the Autostart file found in  --> yourUserFolder/GNUstep/Library/WindowMaker folder.
Or you can just replace the ugly xterm icon that is under GNUstep dock icon on the desktop with a Guake icon that will launch at start-up.  To do that, right-click the xterm icon and go to "Settings", then uncheck "Start when WindowMaker is started" and "Lock (prevent accidental removal)", now you drag that xterm icon on the desktop to remove it (close any xterm windows before). Then , if Guake is not running, launch it, and drag the icon from the lower left to the upper right corner under the dock icon. Right-click on it, go to "Settings" and check "Start when WindowMaker is started" and "Lock (prevent…".
Note, after system startup, Guake icon will be greyed until you trigger it with the hotkey you've chosen to show the terminal in the Guake preferences.
Ok, but now Guake still has that ugly WindowMaker default app icon… need to change that.
How about using a superb NeXTstep black terminal icon ? Here it is :


That black Term icon was used on NeXT system up to NEXTSTEP 3.3 , then they used a more standard looking white screen one :


I usually use these NEXTSTEP system icons to customize the WindowMaker look.  The ones I'm using where originally extracted and converted by John T. Folden, Who's site is long gone now, so here is the original pack to download :

openstepicons-1.1.tar.gz

Note this pack doesn't include the black term, I had to extract it from an NeXT system, together with the black Root icon , that we'll use later :


Ok , now how to use these ? Download , extract, and using Pcmanfm file manager (or something else, but that one it's been installed with Lxde) place them in a conveniently named "Pictures" (or "Images", or "Icons", or "MasterPieces") folder in your home folder. Then we have to set the path to these icons in the WindowMaker preferences. Open these preferences by double-clicking on the dock icon, and go to "Search Path Configuration", in there click the Add button, and for each icons folder , select the directory containing the icons. For example , for the downloaded openstepicons-1-1 folder , add the folder "icons.tiff" (path is : ~/Pictures/openstepicons-1-1/icons.tiff). Same for the black term a root icons that I've placed in ~/Pictures/BlackNextIcons .


Now you can change the Guake icon , and the dock GNUstep icon. Btw, that icon is just plain horrible, really…Compare that to the Paul Rand NeXT icon, well it's the first thing I want to change on the WindowMaker desktop. So you can put there a NeXT icon if you want, there are several versions in the above pack. It's nice , but hey… this is not a NEXTSTEP system, so I usually put my own logo (yes I know, I put it everywhere , my psy is aware of that…).
To do that , right-click the dock icon , go to "Settings" , and hit the "Browse" button in the Icon Image field, then browse to the icon you want to use.



And do the same for the Guake icon. And we have this :


Which I found much better.
Next I install sshfs :
sudo apt-get install sshfs
That allows you to connect to any machine on the network running an ssh server directly from your file manager, in that case Pcmanfm, and browse through the files like you would on a mounted Apple files server in OSX. To do that, in the path field of a Pcmanfm window, just type the ip adress of the server you want to connect to, like so , for my home network MacMini file server :
ssh://192.168.0.14
or if you know the server host name :
ssh://Philip-Mortimer.local
Philip-Mortimer is the name of MY server, I suppose your will be different... Anyway, the system will warn you that it can't verify the identity of the server you want to connect to, that is all but normal because you connect to it for the first time, so hit "Log In Anyway" button :


It will then ask you for the server login and password to connect , with option as to remenber it or not. On Jessie I've found that if you select "remember for ever" option , a window pops up asking you to enter you user password to store the server password in the Keyring. With all that done you are able browse your network. You can also bookmark these servers and have them at hand in the left part of the Pcmanfm window.
Ok, now lets tweak the WindowMaker preferences a bit. First the main applications menu. With Jessie, after WindowMaker install , I had the surprise to have a "Debian" menu , listing all the installed apps conveniently accessible through categories submenus .



Well, why not, all nice and fine. But I'm more used to the default WM Applications menu, cause I usually access my apps by other means , like dock icons , wmbutton (more on that one later) or the drawer… And if you open the "Applications menu Definition" settings in the WM preferences , it will tell you something like that it's not a saved menu configuration, would you like to save it or not. If you decline as I did, you get back the default menu.
As WM theme , I use "Traditional" ,  to get a good NeXT/OPENSTEP look.



Then , in "Other Configurations" , turn on animations, Smooth scaling. And choose the left most Titlebar Style, again to get a correct NeXT look.
In "Font Configuration", I usually set the font size to 11 for Menu Text, Menu Title and Window Title.
To have a interface more consistent with GNUstep or NeXT look with GTK apps , I've found a very good GTK theme :
GTK-GNUstep
Extract it in /usr/share/themes, You'll have to be root for that. Then to apply it open lxappearance by typing :
lxappearance
In a term window or the "run" field of the Applications menu. You'll get this :



selecting GTK-GNUstep in the theme, you'll get this :



Better. But still have to get a good icons theme for GTK apps and Pcmanfm. I usually use two files managers, one is Pcmanfm, cause it's simple, light, gives you images previews, easily connect to servers , other is GNUstep's GWorkspace file manager, cause it works like NEXTSTEP workspace, with Miller columns navigation. I customize that last with some NeXT icons, but more on that latter. For Pcmanfm and GTK, I use a theme called "Area.o43", you can get it here :
area.o43 SVG Icon theme
These are nice logo like icons , very different from NeXT look icons but fits good in Pcmanfm and others GTK apps interface. Extract it to /usr/share/icons, again needs to be root for that. And it will appear in the Icon Theme tab of LxAppearance :


On the "Other" tab I also set the toolbar style to Icons only and Small toolbar icon :


You'll notice on the previous screenshot that the server icon folder icon is not included in the Area.o43 pack, so it's still use the default Gnome one. So I've made myself one , grab it here :

 areao43_folder-remote.tar.gz

Extract, and as root (you can open a Pcmanfm window as such) place it in :
/usr/share/icons/areao43/scalable/places and rename it as "folder-remote.svg"


So when you connect to a server from Pcmanfm you get the correct icon :


Note how the address is sftp://192.168.0.32. This is a strange thing happening in Jessie , even when I type ssh://192.168.0.32, it changes the address to sftp… Also note that I've already had bookmarked that same server as "Roy-Batty" on the side bar, and it still shows it as another mounted server "192.168.0.32" when I access it. So maybe a SSHFS problem here in Jessie … It works fine in Wheezy.
Note also , on the "look" side, the Applications icon on the side bar still retain the Gnome default icon, I still have to find where it's stored to change it. A good thing is that it gets you to an Applications folder storing shortcuts to all installed apps on your system, like the Debian menu we had after the WindowMaker install with all the apps listed. This side bar folder exist also in Pcmanfm when installed on Wheezy, but alas leads to an empty folder, you have to add the correct one yourself to the side bar. The path to it is /usr/share/Applications

Ok, end of part 1, next some dockapps.



Monday, May 4, 2015

Le Last of the PowerBooks… (almost)

Added that one to my collection last week :



It's a PowerBook G4 1.67 17". Bought it cause I wanted a A1139 model, that is the last of the PowerBook, 17" with the hires 1680x1080 screen. The seller didn't know  (well , thats what he said…) what exact model it was, only that it was a 17" 1.67Ghz PB… So I asked what was the screen res. Should have asked the serial nmr...
Anyway, it came and it's nice and working well. Indeed , with a 1680x1050 pixels screen.



But, but looking more closely, some strange things :



Non-standard screw.
Also, on the front edge near the trackpad, there was a small bump :



That was caused by a wrong screw model (too long) used in the battery compartment. I replaced it, and diminished the bump by very carefully hiting it . Almost invisible now.
Now looking at the serial number :


From that serial, it's a A1107 ! not a A1139. And after opening it , yes the main board is indeed a A1107 board matching that serial. But it as a A1139 hires screen. Funny thing is I've read somewhere that these screens models could indeed be swapped , but if a A1107 gets a A1139 screen it wouldn't go to sleep when lid closed, because the place of the magnet initiating the sleep in the screen lid is different for each models.
But, on that one it works ! The PowerBook sleeps when I close it.
So, maybe the person who reassembled that machine managed to move the magnet in the proper place… Anyway, it's well done (not like the misplaced screws…), cause screen bezel disassembly is very difficult on these models, and there is no sign of disassembling or damage on the bezel.
Only other aesthetic problem with that machine is a missing (as usual) rubber foot, but I've replaced it, more on that latter.

All in all, I'm happy with it, wanted a Hires screen 17" PowerBook, A1107 is 1.67Ghz as is A1139, only the RAM speed are different on these. Wasn't too expensive for that kind of PowerBook. It's working well. But curious as I am, I've asked the seller from where he got it. No answer so far ;)





Saturday, April 25, 2015

Marathon on Debian




Back in the days of my youth, I've played the Marathon / Marathon2 / Marathon Infinity so much... Was really fun, discovering all the maps secrets and all. I remember playing  community made maps too, like Rubicon or Red, when I had finished the main trilogy.

I knew about Aleph One, the open source Marathon 2 engine, and played with it when I moved from OS9 to OSX. But had completely forgot about the linux version. Let's try to install Aleph One with Marathon Infinity on a PowerBook G4 Titanium 1Ghz, running Debian 7 Wheezy.

Hi Beauty
You'll have to compile it. First go to the Aleph One Marathon Infinity page :
http://source.bungie.org/games/infinity.php
And download the sources, here :
http://source.bungie.org/download/source.php
Also download the Marathon Infinity game files :
http://source.bungie.org/download/data.php?game=infinity
On the page it says :
" # Unpack the tar.bz2 file
  # Run ./configure && make && make install..."
but it's not that simple.  First thing first, yes indeed, unpack "AlephOne-20140104.tar.bz2", with XArchiver, ArchiveManager or whatever you have installed.
Place the unarchived folder to a convenient place, like your Documents folder, then get into it from a terminal window by typing "cd Documents/AlephOne-20140104"(without quote).
Then type "./configure" (without quotes), just as the Aleph One page says.
You won't go very far...And get an error. That is cause you're likely missing a lot of libraries that were not installed during the installation of Debian. Specially the -dev (development) ones. Time to go into that "AlephOne-20140104" folder we've unarchived, see if there is any help.
Yes, open the text file "INSTALL.unix", there you'll find mode complete instructions on how compile the thing. It says you need the SDL_image , SDL_net and   SDL_sound libraries among other things. Opening Synaptic packages manager, I was able to see that these were already installed on my system, but not the -dev packages, so installed it. After that, back to AlephOne-20140104 folder, and re-try a "./configure". The good thing is that each time the compiler fail, it tells you what you're missing . So each times (in my case 7/8 times...) , I was able to go back to Synaptic and install the missing packages. If I found that some of these were already installed, I would install the uninstalled -dev packages that goes with it.
So here is a rough list of want I had to install :

libsdl1.2-dev (1.2.15-5)
libsdl-image1.2 (1.2.12-2)
libsdl-image1.2-dev (1.2.12-2)
libsdl-net1.2 (1.2.8-2)
libsdl-net1.2-dev (1.2.8-2)
libsdl-sound1.2 (1.0.3-6)
libsdl-sound1.2-dev (1.0.3-6)
libboost-dev (1.49.0.1)
libboost-all-dev (1.49.0.1)
libsdl-ttf2.0-0 (2.0.11-2)
libsdl-ttf2.0-dev (2.0.11-2)
libzzip-0-13 (0.13.56-1.1)
libzzip-dev (0.13.56-1.1)
zziplib-bin (0.13.56-1.1)
libogg-vorbis-decoder-perl (0.9-1+b3)
libruby1.8 (1.8.7.358-7.1+deb7u2)
libvorbisfile-ruby (0.2-8.1)
libvorbisfile-ruby1.8 (0.2-8.1)
libogg-dev (1.3.0-4)
libvorbis-dev (1.3.2-1.3)
vorbis-tools (1.4.0-1)
ffmpeg (6:0.8.17-1)
libav-tools (6:0.8.17-1)
libavcodec-dev (6:0.8.17-1)
libavdevice53 (6:0.8.17-1)
libavfilter2 (6:0.8.17-1)
libavformat-dev (6:0.8.17-1)
libavutil-dev (6:0.8.17-1)
libavutil53 (6:10.1-1~bpo70+1)
libopencv-core2.3 (2.3.1-11)
libopencv-imgproc2.3 (2.3.1-11)
libswscale-dev (6:0.8.17-1)

Note, this is not the complete list of what will be installed in the process, there are many more that are dependencies of the above ones. Also in the process maybe  I installed things not really needed for the configuring...

Anyway, after a succesful configuration, type "make" (without quotes) to compile Aleph One. Should take a bit of time, on my 1Ghz Ti it took about 30 to 45 minutes.
Then if all goes well, you should have Aleph One compiled. Not installed.
To do so you have to be root, so login as root with "su" then type your root password. Then type "make install" (without quote)... Or just do "sudo make install".

Ok, now we have to install the game files. That is the "MarathonInfinity-20140104-Data.zip" file I've downloaded earlier. Once unarchived, the content of the resulting "Marathon Infinity" folder must be moved to the AlpehOne folder , in /usr/local/share. You'll need to be root for that. Can be done from PcManFM file manager that I use, by opening
/usr/local/Share/AlephOne folder as root and moving the files in there.
Or by the command line by typing :
sudo mv >here drag the content of the Marathon Infinity folder< /usr/local/share
All in one line, and type your root password.

Ok... time to test. In a terminal window, type "alephone", or in the WindowMaker (that i use) main menu, go to "Run" and type "alephone" in the opening window.
Marathon should first start in fullscreen mode, which is not bad, but if the game is not set to your screen resolution, then when you'll quit the game, the system will keep the game resolution (not like in OS9 when the system would switch from 1024x768 to fullscreen game res of 640x480, then when quiting the game set back the system res to 1024x768, for example), and it will be a bugger to get back to your original resolution. So you'd better set the game res to your screen res if you play fullscreen. The thing is , on a PowerBook G4 Titanium 1Ghz the best screen res is 1280x854, and that game textures will not look too good at that resolution... So I elected to go for the windowed mode at 640x480.





Btw, there was no windowed mode the the original Marathon game on MacOS.



Note also the rendering must be set to "Software" , should be by default anyway if you don't have graphic acceleration on your system, my case. If you try "Open GL", it will crash.

I did find the mouse sensitivity to be too high by default, so had to lower that a bit.


Also found something that makes the game more difficult than the original Mac OS version. That is: I use to set the control to Mouse and Keyboard, using up and down keys to go forward and back, and left and right keys to make sidesteps left/right, using the mouse to rotate around and change direction fast. But while in the original Mac OS version I could change direction with the mouse while moving with the up/down/left/right keys, in that version, I can't ! I have to stop moving with the keys to be able to rotate around... Bugger.
I'll have to try the Aleph-One for Mac OSX version to see how that works there.
Anyway, It's still very playable and enjoyable to kill Pfhors .

In that case, i'm gonna get killed...

One more thing: first time you'll launch Aleph One in WindowMaker environment , of course it will create the app running square icon on your desktop, displaying a green Marathon icon far too big for the square ... Can't remember where I found that big icon was, maybe in /usr/share/pixmaps.
but anyway, it's completely unaesthetic on my desktop, can't live with that.
So I copied that icon, and reduced it to the 48x48 pixels size (original NeXTstep icons size). Then applied it to the Aleph One app square icon, by right-click -> Settings , in Docked Application Setting window -> icon image -> browse to your 48x48 Marathon icon. Looks better. But note that if you launch the app , the running app square icon will still go and check for that too big icon to display...
So while the app window is open, right-click on the top window bar and go to "Attributes..."


 Then from "Window Attributes" scroll menu, go to "Icon and Initial Workspace".



And then check the "Ignore client supplied icon" so that WindowMaker will use the icon you've decided for the running app.



And btw, here is the 48x48 Marathon icon to download :


Wednesday, April 22, 2015

First Post.

Test, test test … Ok.


Btw, please forgive the spelling errors or strange sentences, english is not my native language (i'm french) . I write in english here (and on my other blog) cause it reminds me when I was kid living in english speaking country, it's a way to keep practicing the language now that I have few occasions to speak english. If you see errors , don't hesitate to point it to me ;)