$ xmkmf -a构建后,编译后的 mlvwm 二进制文件位于 mlvwm 目录中。将其移动到你的 PATH 的任何位置:
$ make
$ mv mlvwm/mlvwm /usr/local/bin/编辑配置文件
$ cp sample_rc/Mlvwm-{Netscape,Xterm} $HOME将 Mlvwmrc 改名为 $HOME/.mlvwmrc(是的,即使示例文件的名称看似是大写字母,但你也必须使用小写的 “m”):
$ cp sample_rc/Mlvwmrc $HOME/.mlvwmrc打开 .mlwmrc 并找到第 54-55 行,它们定义了 MLVWM 在菜单和 UI 中使用的像素图的路径(IconPath):
# Set icon search path. It needs before "Style".调整路径以匹配你填充图像的路径(我建议使用 $HOME/.local/share/pixmaps)。MLVWM 不提供像素图,因此需要你提供构建桌面所需图标。
IconPath /usr/local/include/X11/pixmaps:/home2/tak/bin/pixmap
# Set icon search path. It needs before "Style".选择像素图
IconPath /home/seth/.local/share/pixmaps
$ mkdir -p $HOME/.local/share/pixmaps现在,配置文件将图像分配给菜单项和 UI 元素,但是系统中不存在这些图像。要解决此问题,请通读配置文件并找到每个 .xpm 图像。对于配置中列出的每个图像,将具有相同文件名的图像(或更改配置文件中的文件名)添加到你的 IconPath 目录。
# Register the menulabel1.xpm 图像实际上在源代码的 pixmap 目录中,但我更喜欢使用来自 /usr/share/pixmaps 的 Penguin.xpm(在 Slackware 上)。无论使用什么,都必须将自定义像素图放在 ~/.local/share/pixmaps 中,并在配置中更改像素图的名称,或者重命名像素图以匹配配置文件中当前的名称。
Menu Apple, Icon label1.xpm, Stick
"About this Workstation..." NonSelect, Gray, Action About通过遵循与配置文件中相同的语法,你可以自定义像素图并将自己的应用添加到菜单中(例如,我将 mule 更改为 emacs)。这是你在 MLVWM GUI 中打开应用的入口,因此请列出你要快速访问的所有内容。你可能还希望包括指向 /usr/share/applications 文件夹的快捷方式。
"" NonSelect
"Terminal" Icon mini-display.xpm, Action Exec "kterm" exec kterm -ls
"Editor" Action Exec "mule" exec mule, Icon mini-edit.xpm
"calculator" Action Exec "xcal" exec xcalc, Icon mini-calc.xpm
END
"Applications" Icon Penguin.xpm, Action Exec "thunar /usr/share/applications" exec thunar /usr/share/applications完成编辑配置文件并将自己的图像添加到 IconPath 目录后,必须将所有像素图的大小都调整为大约 16x16 像素。(MLVWM 的默认设置不一致,因此存在变化空间。)你可以使用 ImageMagick 进行批量操作:
$ for i in ~/.local/share/mlvwm-pixmaps/*xpm ; do convert -resize '16x16^' $i; done启动 MLVWM
#!/bin/sh根据此文件,startx 命令的默认操作是启动 MLVWM。但是,你的发行版可能对于图形服务器启动(或被终止以重新启动)时会发生的情况有其他做法,因此此文件可能对你没有什么帮助。在许多发行版上,你可以添加 .desktop 文件到 /usr/share/xsessions 中,以将其列在 GDM 或 KDM 菜单中,因此创建名为 mlvwm.desktop 的文件并输入:
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session /usr/local/bin/mlvwm
else
exec /usr/local/bin/mlvwm
fi
[Desktop Entry]从桌面会话注销并重新登录到 MLVWM。默认情况下,会话管理器(KDM、GDM 或 LightDM,具体取决于你的设置)将继续登录到以前的桌面,因此在登录之前必须覆盖它。
Name=Mlvwm
Comment=Macintosh-like virtual window manager
Exec=/usr/local/bin/mlvwm
TryExec=ck-launch-session /usr/local/bin/mlvwm
Type=Application
欢迎光临 嵌入式开发交流网论坛 (http://www.dianzixuexi.com/bbs/) | Powered by Discuz! X3.2 |