<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>笔记本 &#187; Linux软件</title>
	<atom:link href="http://mengzhuo.org/blog/tag/linux%e8%bd%af%e4%bb%b6/feed" rel="self" type="application/rss+xml" />
	<link>http://mengzhuo.org/blog</link>
	<description>Just The Way It Was</description>
	<lastBuildDate>Sun, 29 Apr 2012 13:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ibus-GJS主题制作</title>
		<link>http://mengzhuo.org/blog/ibus-gjs%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c.html</link>
		<comments>http://mengzhuo.org/blog/ibus-gjs%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c.html#comments</comments>
		<pubDate>Sun, 29 Apr 2012 13:31:12 +0000</pubDate>
		<dc:creator>mz</dc:creator>
				<category><![CDATA[晴]]></category>
		<category><![CDATA[Linux软件]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http://mengzhuo.org/blog/?p=1631</guid>
		<description><![CDATA[因为我的个人的电脑是12&#8242;小屏又高分辨率（1280&#215;800），所以不改就看起来字就很小。而Ibus-GJS(Gnome JavaScript)版本用的前端是JS+CSS，这就给Ibus输入法主题定制提供了可能性（以前是代码里面写死的样式） 修改前 可以明显看出，连火狐的字体都比输入法的待选词框里的要大。不进行修改的话，打起字来很难受…… 待修改文件 只有两个，ibus-gjs的版本是3 /usr/share/gnome-shell/extensions/ibus-indicator@example.com/stylesheet.css /usr/share/gnome-shell/js/ui/status/ibus/candidatePanel.js 分析代码 不喜欢看的同学可以直接跳到：修改主题 文件1里面的内容是标准的CSS框架，文件2里面的是JS代码，写过网页前端的同学一定不会陌生这两个东西。 从文件2源代码看，选词框的结构是 candidate-panel > candidate-area > candidate-vertical > candidate-vcontent > *candidateTextStyle 当然，水平的选词框就把vertical换成horizontal就可以了。而candidateTextStyle之所以打星号，是因为在Ibus的源代码里并没有给这个应该有的属性添加上类别……因为标签本身就属于popup-menu，本身这样的标签是不必要的，但作者认为这样是很有效的，没办法，我们只能自己来改了。 style_class: 'popup-menu-item', style: candidateTextStyle, 了解以后我们就可以通过修改CSS来更改Ibus的主题样式了。 修改主题 理论上应该用stylesheet.css来控制这些参数的，但就像我之前说的，作者觉得这样更方便……我会尽力做出更好的patch，让作者改变心意。 const里的candidateTextStyle值 添加 font-size:11pt;text-shadow:0 0 5px #69d6ff; 就可以改变候选词的样式成酷酷的发蓝光的样子，而且变大了~ 同理，如果想改变候选编号的话就要改变candidateLabelStyle就可以了。 在stylesheet.css里面的参数基本是控制了整个候选区域的边框等，当然要是你有CSS经验，还可以加上背景图什么的都可以，这样一来相当于皮肤的功能就实现了 Ibus-GJS主题制作 &#124; 订阅博客署名-非商业性使用-相同方式共享]]></description>
			<content:encoded><![CDATA[<p>因为我的个人的电脑是12&#8242;小屏又高分辨率（1280&#215;800），所以不改就看起来字就很小。而Ibus-GJS(Gnome JavaScript)版本用的前端是JS+CSS，这就给Ibus输入法主题定制提供了可能性（以前是代码里面写死的样式）</p>
<h4>修改前</h4>
<p><a href="http://mengzhuo.org/blog/wp-content/uploads/2012/04/2012-04-09-223738_1280x800_scrot.png"><img class="alignnone  wp-image-1632" title="2012-04-09-223738_1280x800_scrot" src="http://mengzhuo.org/blog/wp-content/uploads/2012/04/2012-04-09-223738_1280x800_scrot.png" alt="" width="327" height="233" /></a><br />
可以明显看出，连火狐的字体都比输入法的待选词框里的要大。不进行修改的话，打起字来很难受……</p>
<h4>待修改文件</h4>
<p>只有两个，ibus-gjs的版本是3</p>
<ol>
<li><code>/usr/share/gnome-shell/extensions/ibus-indicator@example.com/stylesheet.css</code></li>
<li><code>/usr/share/gnome-shell/js/ui/status/ibus/candidatePanel.js</code></li>
</ol>
<h4>分析代码</h4>
<p>不喜欢看的同学可以直接跳到：<a href="#theme">修改主题</a><br />
文件1里面的内容是标准的CSS框架，文件2里面的是JS代码，写过网页前端的同学一定不会陌生这两个东西。<br />
从文件2源代码看，选词框的结构是</p>
<blockquote><p>candidate-panel > candidate-area > candidate-vertical > candidate-vcontent > *candidateTextStyle </p></blockquote>
<p>当然，水平的选词框就把vertical换成horizontal就可以了。而candidateTextStyle之所以打星号，是因为在Ibus的源代码里并没有给这个应该有的属性添加上类别……因为标签本身就属于popup-menu，本身这样的标签是不必要的，但作者认为这样是<a href="https://github.com/fujiwarat/ibus-gjs/pull/10#issuecomment-5110947">很有效的</a>，没办法，我们只能自己来改了。</p>
<blockquote><p><code>                                        style_class: 'popup-menu-item',<br />
                                        style: candidateTextStyle,</code></p></blockquote>
<p>了解以后我们就可以通过修改CSS来更改Ibus的主题样式了。</p>
<h4 id='theme'>修改主题</h4>
<p>理论上应该用stylesheet.css来控制这些参数的，但就像我之前说的，作者觉得这样更方便……我会尽力做出更好的patch，让作者改变心意。<br />
const里的candidateTextStyle值<br />
添加<br />
<blockquote><code>font-size:11pt;text-shadow:0 0 5px #69d6ff;</code></p></blockquote>
<p>就可以改变候选词的样式成酷酷的发蓝光的样子，而且变大了~<br />
<a href="http://mengzhuo.org/blog/wp-content/uploads/2012/04/2012-04-25-121028_1280x800_scrot.png"><img src="http://mengzhuo.org/blog/wp-content/uploads/2012/04/2012-04-25-121028_1280x800_scrot.png" alt="" title="2012-04-25-121028_1280x800_scrot" width="220" height="158" class="alignnone size-full wp-image-1646" /></a><br />
同理，如果想改变候选编号的话就要改变candidateLabelStyle就可以了。<br />
在stylesheet.css里面的参数基本是控制了整个候选区域的边框等，当然要是你有CSS经验，还可以加上背景图什么的都可以，这样一来相当于皮肤的功能就实现了</p>
<blockquote><a title="Ibus-GJS主题制作" href="http://mengzhuo.org/blog/ibus-gjs%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c.html">Ibus-GJS主题制作</a> | <a title="蒙卓的博客，东西很杂" href="http://mengzhuo.org/blog/feed">订阅博客</a></blockquote><blockquote><small><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh" title="保留权利声明">署名-非商业性使用-相同方式共享</a></small><blockquote>]]></content:encoded>
			<wfw:commentRss>http://mengzhuo.org/blog/ibus-gjs%e4%b8%bb%e9%a2%98%e5%88%b6%e4%bd%9c.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Ubuntu11.10平滑升级至12.04</title>
		<link>http://mengzhuo.org/blog/ubuntu11-10%e5%b9%b3%e6%bb%91%e5%8d%87%e7%ba%a7%e8%87%b312-04.html</link>
		<comments>http://mengzhuo.org/blog/ubuntu11-10%e5%b9%b3%e6%bb%91%e5%8d%87%e7%ba%a7%e8%87%b312-04.html#comments</comments>
		<pubDate>Sat, 31 Mar 2012 06:28:55 +0000</pubDate>
		<dc:creator>mz</dc:creator>
				<category><![CDATA[晴]]></category>
		<category><![CDATA[Linux软件]]></category>
		<category><![CDATA[Rhythmbox]]></category>
		<category><![CDATA[RR]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http://mengzhuo.org/blog/?p=1580</guid>
		<description><![CDATA[Ubuntu12.04已经进入beta2了，其主要特性已冻结，目前只是Debug阶段了，其实和正式版差不了多少了。我个人主要是想要Gnome Shell 3.4（11.10肯定不会用的了），所以现在升级了。 一键升级 root权限下终端里执行update-manager -d就可以了，凭良心说现在的Ubuntu比2年前好多了，当时还要满世界找升级源，现在是全自动解决了。 自动化的源变更 接下来是等待下载结束，配置开始，一些软件如果改了默认配置就需要重新配置，比如mysql、apache。其他的基本上自动解决了。一开始我还担心12.04会把unity默认装回来，后来发现根本就是瞎担心，几乎是完美地回到了我原来的桌面，不过还是有下面这个小问题 Ibus-gjs 自动重启以后发现最大的问题是ibus-gjs没办法用了，而fujiwarat（IBUS-GJS作者）目前没空，所以我把网上搜刮到的patch打好，大家可以通过 sudo apt-add-repository ppa:mengzhuo1203/ibus-gjs &#038;&#038; sudo apt-get update &#038;&#038; sudo apt-get install ibus-gjs来获得我做的包 按下Alt+F2输入r重载后，使用gnome-tweak-tool调整就好了。 Rhythmbox 这次主要播放器又换回了Rhythmbox3，而11.10是蛋疼的banshee（主要是音乐文件夹更新后竟然没有自动侦测），不过之前开发的插件也用不上了，因为底层重写了……看来得花个时间重新看看文档了。 Ubuntu11.10平滑升级至12.04 &#124; 订阅博客署名-非商业性使用-相同方式共享]]></description>
			<content:encoded><![CDATA[<p>Ubuntu12.04已经进入beta2了，其主要特性已冻结，目前只是Debug阶段了，其实和正式版差不了多少了。我个人主要是想要Gnome Shell 3.4（11.10肯定不会用的了），所以现在升级了。</p>
<h4>一键升级</h4>
<p>root权限下终端里执行<code class="tty">update-manager -d</code>就可以了，凭良心说现在的Ubuntu比2年前好多了，当时还要满世界找升级源，现在是全自动解决了。</p>
<h4>自动化的源变更</h4>
<p><a href="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-31-003313.png"><img class="wp-image-1581 alignnone" title="Screenshot-2012-03-31 00:33:13" src="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-31-003313.png" alt="" width="271" height="229" /></a><a href="http://mengzhuo.org/blog/wp-content/uploads/2012/03/2012-03-31-015037_1280x800_scrot.jpg"><img class="alignright size-medium wp-image-1586" title="2012-03-31-015037_1280x800_scrot" src="http://mengzhuo.org/blog/wp-content/uploads/2012/03/2012-03-31-015037_1280x800_scrot-300x300.jpg" alt="" width="300" height="300" /></a><br />
接下来是等待下载结束，配置开始，一些软件如果改了默认配置就需要重新配置，比如mysql、apache。其他的基本上自动解决了。一开始我还担心12.04会把unity默认装回来，后来发现根本就是瞎担心，几乎是完美地回到了我原来的桌面，不过还是有下面这个小问题</p>
<h4>Ibus-gjs</h4>
<p>自动重启以后发现最大的问题是ibus-gjs没办法用了，而fujiwarat（IBUS-GJS作者）目前没空，所以我把网上搜刮到的patch打好，大家可以通过<br />
<code class="tty">sudo apt-add-repository ppa:mengzhuo1203/ibus-gjs &#038;&#038; sudo apt-get update &#038;&#038; sudo apt-get install ibus-gjs</code>来获得我做的包<br />
按下Alt+F2输入r重载后，使用gnome-tweak-tool调整就好了。</p>
<h4>Rhythmbox</h4>
<p>这次主要播放器又换回了Rhythmbox3，而11.10是蛋疼的banshee（主要是音乐文件夹更新后竟然没有自动侦测），不过之前开发的插件也用不上了，因为底层重写了……看来得花个时间重新看看文档了。</p>
<blockquote><a title="Ubuntu11.10平滑升级至12.04" href="http://mengzhuo.org/blog/ubuntu11-10%e5%b9%b3%e6%bb%91%e5%8d%87%e7%ba%a7%e8%87%b312-04.html">Ubuntu11.10平滑升级至12.04</a> | <a title="蒙卓的博客，东西很杂" href="http://mengzhuo.org/blog/feed">订阅博客</a></blockquote><blockquote><small><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh" title="保留权利声明">署名-非商业性使用-相同方式共享</a></small><blockquote>]]></content:encoded>
			<wfw:commentRss>http://mengzhuo.org/blog/ubuntu11-10%e5%b9%b3%e6%bb%91%e5%8d%87%e7%ba%a7%e8%87%b312-04.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>浅尝Gnome3插件</title>
		<link>http://mengzhuo.org/blog/%e6%b5%85%e5%b0%9dgnome3%e6%8f%92%e4%bb%b6.html</link>
		<comments>http://mengzhuo.org/blog/%e6%b5%85%e5%b0%9dgnome3%e6%8f%92%e4%bb%b6.html#comments</comments>
		<pubDate>Sat, 03 Mar 2012 15:29:45 +0000</pubDate>
		<dc:creator>mz</dc:creator>
				<category><![CDATA[雨]]></category>
		<category><![CDATA[Linux软件]]></category>
		<category><![CDATA[RR]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http://mengzhuo.org/blog/?p=1557</guid>
		<description><![CDATA[几个月前，Gnome3发布了插件网站（只支持firefox）。其实我用过算是很方便的Ubuntu软件中心、新立得、apt-get等等（Windows下比较类似的是360软件中心吧，苹果的没体验过）。 总之——就是没见过Gnome3这么方便的。 真的是一“拨”就自动安装、启用，感觉和安卓上装程序差不多，Gnome3这样进一步地模糊了桌面操作系统和网络的边界，可能这也是IT世界大同的结果吧。 插件地址 extensions.gnome.org 比如说我们挑选一个叫window-list的插件，然后点选左边最大的开关，如下图黄色圈圈内 选定“安装”，就装好了 如果要关掉某个插件，再按一按那个开关就可以了，或者用gnome-tweak调整就可以了。 很简单是吧，我文章都不需要怎么截图和文字了…… 怪不得网上对这个的介绍几乎没有，因为太方便了吗？ 不过要是以后Gnome的用户多了起来，Gnome的服务器撑不撑得住呢 ：） 浅尝Gnome3插件 &#124; 订阅博客署名-非商业性使用-相同方式共享]]></description>
			<content:encoded><![CDATA[<p><a href="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-03-224219.png"><img src="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-03-224219.png" alt="" title="Screenshot-2012-03-03 22:42:19" width="333" height="84" class="alignleft size-full wp-image-1558" /></a><br />
几个月前，Gnome3发布了插件网站（只支持firefox）。其实我用过算是很方便的Ubuntu软件中心、新立得、apt-get等等（Windows下比较类似的是360软件中心吧，苹果的没体验过）。<br />
总之——<strong>就是没见过Gnome3这么方便的</strong>。<br />
真的是一“拨”就自动安装、启用，感觉和安卓上装程序差不多，Gnome3这样进一步地模糊了桌面操作系统和网络的边界，可能这也是IT世界大同的结果吧。</p>
<h4>插件地址</h4>
<p><a class="intro" href="https://extensions.gnome.org">extensions.gnome.org</a><br />
比如说我们挑选一个叫<a href="https://extensions.gnome.org/extension/25/window-list/">window-list</a>的插件，然后点选左边最大的开关，如下图黄色圈圈内<br />
<a href="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-03-230042.png"><img src="http://mengzhuo.org/blog/wp-content/uploads/2012/03/Screenshot-2012-03-03-230042-610x315.png" alt="" title="Screenshot-2012-03-03 23:00:42" width="610" height="315" class="alignleft size-large wp-image-1565" /></a><br />
选定“安装”，就装好了</p>
<hr />
如果要关掉某个插件，再按一按那个开关就可以了，或者用gnome-tweak调整就可以了。<br />
很简单是吧，我文章都不需要怎么截图和文字了……<br />
怪不得网上对这个的介绍几乎没有，因为太方便了吗？<br />
不过要是以后Gnome的用户多了起来，Gnome的服务器撑不撑得住呢 ：）</p>
<blockquote><a title="浅尝Gnome3插件" href="http://mengzhuo.org/blog/%e6%b5%85%e5%b0%9dgnome3%e6%8f%92%e4%bb%b6.html">浅尝Gnome3插件</a> | <a title="蒙卓的博客，东西很杂" href="http://mengzhuo.org/blog/feed">订阅博客</a></blockquote><blockquote><small><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh" title="保留权利声明">署名-非商业性使用-相同方式共享</a></small><blockquote>]]></content:encoded>
			<wfw:commentRss>http://mengzhuo.org/blog/%e6%b5%85%e5%b0%9dgnome3%e6%8f%92%e4%bb%b6.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>如何从源代码自动制作Deb规则&amp;推送至Launchpad</title>
		<link>http://mengzhuo.org/blog/%e5%a6%82%e4%bd%95%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%8c%96%e6%89%93deb%e5%8c%85%e6%8e%a8%e9%80%81%e8%87%b3launchpad.html</link>
		<comments>http://mengzhuo.org/blog/%e5%a6%82%e4%bd%95%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%8c%96%e6%89%93deb%e5%8c%85%e6%8e%a8%e9%80%81%e8%87%b3launchpad.html#comments</comments>
		<pubDate>Wed, 29 Feb 2012 15:10:40 +0000</pubDate>
		<dc:creator>mz</dc:creator>
				<category><![CDATA[阴]]></category>
		<category><![CDATA[Linux软件]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://mengzhuo.org/blog/?p=1532</guid>
		<description><![CDATA[本文环境 OS：Ubuntu 11.10 已安装：build-essential、dh-make、dput等必要的库和软件 对象：不会却又想打Debian包的小白 本文目标 没有debian规则情况下，大部分自动化地创建debian规则 文件符合LaunchPad.net标准，上传至PPA 准备工作 去申请launchpad.net帐号 创建个人Open PGP密钥 launchpad帐号加入Open PGP密钥 在LaunchPad.net上建立个人PPA 创建Debian规则 Linux的世界是源代码构成的，时时刻刻会多出很多新的，好玩的软件，但这些软件的作者并没有时间去写debian规则，而各位又想用deb包来安装的话就没办法了。跳过“又臭又长”的Debian打包指南，其实我们只需要一个软件就够了——dh_make。 这个软件会自动地根据makefile写出Debian规则来，执行一下就好了，够简单吧。 下面就用没有debian化的ibus-gjs来做例子： git clone git@github.com:mengzhuo/ibus-gjs.git ibus-gjs-1 &#038;&#038; cd ibus-gjs-1 &#038;&#038; mv debian debian.backup 你会发现这时，ibus-gjs-1里面没有debian规则（只剩个备份文件夹啦），还有就是在路径底下直接用dh_make是不行的，因为我们的作者用的是autogen.sh，所以需要用以下命令来做出makefile ./autogen.sh --prefix=/usr &#038;&#038; ./configure 成功后（没有任何依赖不足或错误）执行 dh_make -e "mengzhuo1203@gmail.com" -n -s 当然，你可以把email换成你自己的，具体参数是什么意思请问man哦，这时屏幕上应该出现： 图片里大意是叫你去修改一下debian规则，毕竟很多地方还是要人来做的嘛~一般改debian/control和删除一些不需要的*.ex脚本文件，具体怎么改就要看Debian的文档啦，不过本例的最后成品可以参考debian.backup文件夹里的文件。 创建、测试Deb包 上面改好之后，在ibus-gjs-1底下执行dh_make --createorig -s，来创建debuild所需的orig文件，放心按回车吧，那个提示是吓唬你的，因为你已经创建了debian规则，所以它会略过的。 现在，你已经可以自己创建一个deb包了，下面的命令会创建一个deb包，并清除编译产生的缓存。 debuild -b &#038;&#038; debuild clean 然后你会发现下面的错误： 这是因为你还没指定你的密钥，如果你不需要上传到LaunchPad的话就可以忽视它啦。现在，返回上层，你就会发现你打好的DEB包啦。 [...]]]></description>
			<content:encoded><![CDATA[<h4>本文环境</h4>
<p>OS：Ubuntu 11.10<br />
已安装：build-essential、dh-make、dput等必要的库和软件<br />
对象：不会却又想打Debian包的小白</p>
<h4>本文目标</h4>
<ol>
<li>没有debian规则情况下，大部分<strong>自动化</strong>地创建debian规则</li>
<li>文件符合LaunchPad.net标准，上传至PPA</li>
</ol>
<h4>准备工作</h4>
<ol>
<li>去申请launchpad.net帐号</li>
<li>创建个人<a href="http://www.ibm.com/developerworks/aix/library/au-gnupg/index.html">Open PGP密钥</a></li>
<li>launchpad帐号加入Open PGP密钥</li>
<li>在LaunchPad.net上建立个人PPA</li>
</ol>
<h4>创建Debian规则</h4>
<p>Linux的世界是源代码构成的，时时刻刻会多出很多新的，好玩的软件，但这些软件的作者并没有时间去写debian规则，而各位又想用deb包来安装的话就没办法了。跳过“又臭又长”的Debian打包指南，其实我们只需要一个软件就够了——dh_make。<br />
这个软件会自动地根据makefile写出Debian规则来，执行一下就好了，够简单吧。</p>
<p>下面就用没有debian化的ibus-gjs来做例子：<br />
<code class="tty">git clone git@github.com:mengzhuo/ibus-gjs.git ibus-gjs-1 &#038;&#038; cd ibus-gjs-1 &#038;&#038; mv debian debian.backup</code><br />
你会发现这时，ibus-gjs-1里面没有debian规则（只剩个备份文件夹啦），还有就是在路径底下直接用dh_make是不行的，因为我们的作者用的是autogen.sh，所以需要用以下命令来做出makefile<br />
<code class="tty" >./autogen.sh --prefix=/usr &#038;&#038; ./configure</code><br />
成功后（没有任何依赖不足或错误）执行<br />
<code class="tty" >dh_make -e "mengzhuo1203@gmail.com" -n -s</code><br />
当然，你可以把email换成你自己的，具体参数是什么意思请问man哦，这时屏幕上应该出现：<br />
<a href="http://mengzhuo.org/blog/wp-content/uploads/2012/02/screenshot1.png"><img src="http://mengzhuo.org/blog/wp-content/uploads/2012/02/screenshot1.png" alt="" title="screenshot1" width="520" height="136" class="alignnone size-full wp-image-1538" /></a><br />
图片里大意是叫你去修改一下debian规则，毕竟很多地方还是要人来做的嘛~一般改debian/control和删除一些不需要的*.ex脚本文件，具体怎么改就要看Debian的文档啦，不过本例的最后成品可以参考debian.backup文件夹里的文件。</p>
<h4>创建、测试Deb包</h4>
<p>上面改好之后，在ibus-gjs-1底下执行<code class="tty" >dh_make --createorig -s</code>，来创建debuild所需的orig文件，放心按回车吧，那个提示是吓唬你的，因为你已经创建了debian规则，所以它会略过的。<br />
现在，你已经可以自己创建一个deb包了，下面的命令会创建一个deb包，并清除编译产生的缓存。<br />
<code class="tty" >debuild -b &#038;&#038; debuild clean</code><br />
然后你会发现下面的错误：<a href="http://mengzhuo.org/blog/wp-content/uploads/2012/02/2012-02-29-223451_1280x800_scrot.png"><img src="http://mengzhuo.org/blog/wp-content/uploads/2012/02/2012-02-29-223451_1280x800_scrot.png" alt="" title="2012-02-29-223451_1280x800_scrot" width="548" height="85" class="alignnone size-full wp-image-1542" /></a><br />
这是因为你还没指定你的密钥，如果你不需要上传到LaunchPad的话就可以忽视它啦。现在，返回上层，你就会发现你打好的DEB包啦。</p>
<h4>源码上传</h4>
<p>就3步：</p>
<ol>
<li>获得Open PGP ID，例如我的ID是A0771E56，可以用下面的代码参看<br />
<code class="tty" >gpg --list-keys</code><br />
我的PGP</p>
<blockquote><p>
pub   2048R/A0771E56 2011-11-21<br />
uid                  Meng Zhuo (For Email and EncryptedFile) <mengzhuo1203 @gmail.com><br />
sub   2048R/DF9E11A0 2011-11-21<br />
</mengzhuo1203></p></blockquote>
</li>
<li>在源代码目录执行<br />
<code class="tty" >debuild -S -sa -k[你的ID]</code><br />
例如：<br />
<code class="tty" >debuild -S -sa -kA0771E56</code><br />
来构建launchpad承认的源代码格式</li>
<li>返回上层目录，执行<br />
<code class="tty" >dput ppa:[你的PPA地址] source.changes结尾的文件</code></li>
<p>例如：<br />
<code class="tty" >dput ppa:mengzhuo1203/ibus-gjs ibus-gjs_1_source.changes</code><br />
好啦，现在就坐等LaunchPad给你排队编译这个东西了，大概1-2小时不等
</ol>
<h4>总结</h4>
<p>我们学了简单地从源代码制作debian规则和上传代码到LaunchPad，很简单吧，我可是摸索了……3天（业余时间），遥想当年手动写规则，简直是弱爆了。<br />
当然，非常欢迎指正错误，或者是说出更好的方法哈~</p>
<blockquote><a title="如何从源代码自动制作Deb规则&#038;推送至Launchpad" href="http://mengzhuo.org/blog/%e5%a6%82%e4%bd%95%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%8c%96%e6%89%93deb%e5%8c%85%e6%8e%a8%e9%80%81%e8%87%b3launchpad.html">如何从源代码自动制作Deb规则&#038;推送至Launchpad</a> | <a title="蒙卓的博客，东西很杂" href="http://mengzhuo.org/blog/feed">订阅博客</a></blockquote><blockquote><small><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh" title="保留权利声明">署名-非商业性使用-相同方式共享</a></small><blockquote>]]></content:encoded>
			<wfw:commentRss>http://mengzhuo.org/blog/%e5%a6%82%e4%bd%95%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%8c%96%e6%89%93deb%e5%8c%85%e6%8e%a8%e9%80%81%e8%87%b3launchpad.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>安装fakeshell最小化ssh用户权限</title>
		<link>http://mengzhuo.org/blog/%e5%ae%89%e8%a3%85fakeshell%e6%9c%80%e5%b0%8f%e5%8c%96ssh%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90.html</link>
		<comments>http://mengzhuo.org/blog/%e5%ae%89%e8%a3%85fakeshell%e6%9c%80%e5%b0%8f%e5%8c%96ssh%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90.html#comments</comments>
		<pubDate>Wed, 18 Jan 2012 16:08:11 +0000</pubDate>
		<dc:creator>mz</dc:creator>
				<category><![CDATA[阴]]></category>
		<category><![CDATA[雨]]></category>
		<category><![CDATA[Linux软件]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[折腾]]></category>
		<category><![CDATA[网站]]></category>

		<guid isPermaLink="false">http://mengzhuo.org/blog/?p=1444</guid>
		<description><![CDATA[因为新买的VPS跑网站（nginx+php-fastcgi）很吃力，可能是我配置得不好，配置邮件服务器我试了2次，都不行，所以干脆把新服务器改成了ssh代理站，至于用来干什么大家都很清楚哈。 但是Linux下新建的用户权限还是相当高，网上搜到的教程都是把shell指到/bin/false下的，文章连标点符号都一样，可见国内互联网环境有多差！抄就抄的吧，可我要是用这个方法链接刚开始就会自动退出了，所以，在github上找到个源码： github.com/xxlmira/fakeshell 完全符合我的要求，用户能登入，不需要其他动作，只需要添加即可。 这么方便？就看下面的教程吧。如果你知道什么是编译、用过make这种东西，下面的就不用看啦，哈哈。 安装fakeshell 因为是源码安装，所以肯定要有build-essential，然后下载上面的代码到自己的服务器上，并修改Makefile …… PROG= fakeshell SRCS= fakeshell.c BANNER= banner PREFIX= #原来是/usr/local 这里我喜欢用空值 PROVIDER= "mengzhuo.org" #改成你要的网站标题 ADMINS= "mengzhuo1203@gmail.com" #改成你要的管理员邮箱 CC= gcc …… 然后输入make &#038;&#038; make install即可，很容易吧。 配置用户 因为我只是想分发少量的帐号，毕竟这个服务器也不知道能撑到什么时候，所以就手动输入 useradd -s /bin/fakeshell test添加一个test用户 passwd test给test用户添加密码 到这里就好了，不敢相信吧~ 后记 登入后显示： Welcome to mengzhuo.org service on x200s! In case of any urgency, do not hesitate [...]]]></description>
			<content:encoded><![CDATA[<p>因为新买的VPS跑网站（nginx+php-fastcgi）很吃力，可能是我配置得不好，配置邮件服务器我试了2次，都不行，所以干脆把新服务器改成了ssh代理站，至于用来干什么大家都很清楚哈。<br />
但是Linux下新建的用户权限还是相当高，网上搜到的教程都是把shell指到/bin/false下的，文章连标点符号都一样，可见国内互联网环境有多差！抄就抄的吧，可我要是用这个方法链接刚开始就会自动退出了，所以，在github上找到个源码：<br />
<a href="https://github.com/xxlmira/fakeshell">github.com/xxlmira/fakeshell</a><br />
完全符合我的要求，用户能登入，不需要其他动作，只需要添加即可。<br />
这么方便？就看下面的教程吧。如果你知道什么是编译、用过make这种东西，下面的就不用看啦，哈哈。</p>
<h4>安装fakeshell</h4>
<p>因为是源码安装，所以肯定要有build-essential，然后下载上面的代码到自己的服务器上，并修改Makefile<br />
……</p>
<pre style="background:#F1F1F1">
PROG=		fakeshell
SRCS=		fakeshell.c
BANNER=		banner
PREFIX=		#原来是/usr/local 这里我喜欢用空值
PROVIDER=	"mengzhuo.org" #改成你要的网站标题
ADMINS=		"mengzhuo1203@gmail.com" #改成你要的管理员邮箱
CC=		gcc
</pre>
<p>……<span id="more-1444"></span><br />
然后输入<code>make &#038;&#038; make install</code>即可，很容易吧。</p>
<h4>配置用户</h4>
<p>因为我只是想分发少量的帐号，毕竟这个服务器也不知道能撑到什么时候，所以就手动输入<br />
<code>useradd -s /bin/fakeshell test</code>添加一个test用户<br />
<code>passwd test</code>给test用户添加密码</p>
<p>到这里就好了，不敢相信吧~</p>
<h4>后记</h4>
<p>登入后显示：</p>
<pre style="background:#F1F1F1">
Welcome to mengzhuo.org service on x200s!
In case of any urgency, do not hesitate to contact us at mengzhuo1203@gmail.com.
ls
What do you think I am, a shell?
^C
</pre>
<p>这个fakeshell确实很好，而且我还想给这个fakeshell加个uptime的功能，敬请期待<br />
<a href="https://github.com/mengzhuo/fakeshell">github.com/mengzhuo/fakeshell</a></p>
<blockquote><a title="安装fakeshell最小化ssh用户权限" href="http://mengzhuo.org/blog/%e5%ae%89%e8%a3%85fakeshell%e6%9c%80%e5%b0%8f%e5%8c%96ssh%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90.html">安装fakeshell最小化ssh用户权限</a> | <a title="蒙卓的博客，东西很杂" href="http://mengzhuo.org/blog/feed">订阅博客</a></blockquote><blockquote><small><a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.zh" title="保留权利声明">署名-非商业性使用-相同方式共享</a></small><blockquote>]]></content:encoded>
			<wfw:commentRss>http://mengzhuo.org/blog/%e5%ae%89%e8%a3%85fakeshell%e6%9c%80%e5%b0%8f%e5%8c%96ssh%e7%94%a8%e6%88%b7%e6%9d%83%e9%99%90.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

