Tweaking X11
Once you've got X11 up and running you'll probably want to change what programs are run when you start it, and tweak a few settings. With the exception of the 'chmem' section, none of this is Minix specific and you can read most any X11 tutorial on the internet to get more details.
The set of programs that are run when you first log on using 'xdm', or run 'startx' from your user account are controlled by a configuration file in your home directory. If you used 'startx', the configuration file is called '.xinitrc'. If you logged in under 'xdm' then the file is '.xsession'.
You can copy the default file from '/etc/X11/xinit/xinitrc' to one or both of these names and start editing it:
'twm' is the window manager. This is the program that allows you to drag windows around, resize, etc. If that's not running you'll only have the initial programs started in this configuration file and you won't be able to manipulate them.
The last statement in the file should 'exec' a program. If it doesn't then X will run the programs and then immediately close.
The default 'chmem' values of programs like 'xclock' and 'xterm' are quite high. If you want more free memory I recommend lowering these. I use 2MB but could probably go lower.
Minix does not have a great deal of X programs ported yet. For example there is no GUI web browser. But with X you can run programs on a remote machine (which needs to be running an X server) and have the display appear on your Minix machine. This is how I use firefox under Minix.
To set this remote display up all you need to do is tell Minix to authorise the other machine to use the desktop. The 'xhost' command can do this. I have a Linux machine with IP address 192.168.1.100 and the Minix machine is 192.168.1.101. On Minix, with X started, I do:
This uses the IP address of the Linux machine. Now from Minix I can 'ssh' to the Linux machine, and run programs there that appear on the Minix display:
The DISPLAY environment variable dictates what display the program will run on. In this case I set it to the IP address of the Minix machine, and the display number (0.0). Running 'konsole' and 'firefox' will cause them to appear on Minix and I can use them normally. Remember though that they are actually running on the Linux machine - only the display is on Minix. So all file paths, etc are relative to the Linix file system.
This setup works fine even using VMware. I use the 'bridged networking' option and can run Minix in VMware, running programs from the host Linix machine. For 'qemu' you may to do some additional tweaking if you are using the '-net user' option. See this newsgroup posting for details.
The default window manager (and only one currently available) is 'twm' which is quite basic. I've ported 'wmii' which is another minimal window manager but has a little more functionality.
If you have any tips on configuring X11 or programs to run with Minix please leave a comment.
Categories: minix, x11
The set of programs that are run when you first log on using 'xdm', or run 'startx' from your user account are controlled by a configuration file in your home directory. If you used 'startx', the configuration file is called '.xinitrc'. If you logged in under 'xdm' then the file is '.xsession'.
You can copy the default file from '/etc/X11/xinit/xinitrc' to one or both of these names and start editing it:
$ cp /etc/X11/xinit/xinitrc ~/.xinitrcAt the end of this file you'll see something like:
$ cp /etc/X11/xinit/xinitrc ~/.xsession
# start some nice programs
twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
'twm' is the window manager. This is the program that allows you to drag windows around, resize, etc. If that's not running you'll only have the initial programs started in this configuration file and you won't be able to manipulate them.
The last statement in the file should 'exec' a program. If it doesn't then X will run the programs and then immediately close.
The default 'chmem' values of programs like 'xclock' and 'xterm' are quite high. If you want more free memory I recommend lowering these. I use 2MB but could probably go lower.
Minix does not have a great deal of X programs ported yet. For example there is no GUI web browser. But with X you can run programs on a remote machine (which needs to be running an X server) and have the display appear on your Minix machine. This is how I use firefox under Minix.
To set this remote display up all you need to do is tell Minix to authorise the other machine to use the desktop. The 'xhost' command can do this. I have a Linux machine with IP address 192.168.1.100 and the Minix machine is 192.168.1.101. On Minix, with X started, I do:
$ xhost +192.168.1.100
This uses the IP address of the Linux machine. Now from Minix I can 'ssh' to the Linux machine, and run programs there that appear on the Minix display:
minix$ ssh chris@192.168.1.100
<...login...>
linux$ export DISPLAY=192.168.1.101:0.0
linux$ konsole &
linux$ firefox &
The DISPLAY environment variable dictates what display the program will run on. In this case I set it to the IP address of the Minix machine, and the display number (0.0). Running 'konsole' and 'firefox' will cause them to appear on Minix and I can use them normally. Remember though that they are actually running on the Linux machine - only the display is on Minix. So all file paths, etc are relative to the Linix file system.
This setup works fine even using VMware. I use the 'bridged networking' option and can run Minix in VMware, running programs from the host Linix machine. For 'qemu' you may to do some additional tweaking if you are using the '-net user' option. See this newsgroup posting for details.
The default window manager (and only one currently available) is 'twm' which is quite basic. I've ported 'wmii' which is another minimal window manager but has a little more functionality.
If you have any tips on configuring X11 or programs to run with Minix please leave a comment.
Categories: minix, x11

4 Comments:
Out of curiousity, couldn't you just get JHBuild or Garnome or something similiar via cvs and build GNOME using the ported GCC (et al. packages) to use on Minix?
*In theory* without knowing anything about it, or even trying it, I think it could work...but I wouldn't know. Perhaps Pango, GTK+, et al. need to be ported prior to using GNOME on Minix (would it really matter though since the GCC has been ported? You could just get the source code for them and compile them, right? Or does it have to be in a *special* way for it to work on Minix?).
Just some random thoughts I had concerning the WM for x11.
- Pablo
What exactly is preventing other software (firefox, etc...) from running?
Minix doesn't have a lot of the API's that Linux has. A lot of software depends on those extra API's. Examples are mmap, various socket control options, etc. This makes porting large complex software like Gnome and Firefox harder than a simple recompile.
But with X you can run programs on a remote machine (which needs to be running an X server) and have the display appear on your Minix machine
You don't need an X server on linux to do that. Just the X clients.
Post a Comment
<< Home