`
love~ruby+rails
  • 浏览: 852365 次
  • 性别: Icon_minigender_1
  • 来自: lanzhou
社区版块
存档分类
最新评论

Make Linux faster and lighter<2>

阅读更多

Optimise Gnome

Along with KDE, Gnome is one of the two most widely used desktop environments in the Linux ecosystem, but it's quickly being overtaken by Xfce and other more lightweight alternatives when it comes to performance and speed. However, with just a few of our tweaks, Gnome can keep up with the rest of the pack...

Install preload

Preload is a daemon that analyses what you do on a day-to-day basis and fetches the binaries and files you're most likely to need to boost startup times and general performance. In Ubuntu you just need to search for 'preload' in the package manager, but on other distros it's worth checking that the service is running. To activate the service, type:

service preload on

After enabling automatic login and installing preload we initiated two restarts on our test machine to give the daemon a chance to monitor the startups. After comparing the two times, we found that preload had trimmed a second off the time it took to get a usable desktop. This doesn't sound a lot, but if it's used in conjunction with your new fast boot time then it's well worth the effort.

Enable automatic login

Yes, we know we're always telling you how important security is, but if you live on your own in a castle that doesn't have internet access then you're probably safe to enable automatic logins. The time saved is the time it would otherwise take you to type your password.

The GUI method is by far the easiest. Simply head to System > Administration > Login Window . After authenticating yourself, head to the Security tab and check the box next to Automatic Login. You can then choose from the list of users in the drop-down menu who gets logged in automatically.

Unfortunately for users of Fedora, this option isn't available, so you need to make the necessary changes manually. To enable automatic login you need to open /etc/gdm/custom.conf in a text editor with root permissions and then append the following to the bottom of the file:

[daemon] TimedLoginEnable=True TimedLogin=UserName TimedLoginDelay=0

replacing UserName with the user you would like to log in.

Use wire frames

A common problem with low-powered systems is the lag generated when you click and drag a window. Gnome renders the window as it moves, which can slow performance down, but it has a built-in method to reduce the demand on system resources this causes, which you can activate by typing the following into a terminal:

gconftool-2 --type bool --set /apps/metacity/general/ reduced_resources true

Now when you click and drag windows you will see wire frames instead of the window contents, which drastically improves performance on under-powered systems (but has little or no effect on others). Note that this trick won't work if you are using Compiz or an alternative window decorator.

Gnome's wireframe mode eliminates the overhead of showing window contents whilst resizing or moving them.

Gnome's wireframe mode eliminates the overhead of showing window contents whilst resizing or moving them.

Make menus faster

If your menus are starting to feel sluggish, the most likely cause is the icon delay. Every time you open the Gnome menu for the first time the icons have to be loaded from their source files. On slower systems this can look a little messy, so there is a timeout deliberately set to ensure the icons are loaded in time for you to see them. However, with modern hardware this is not generally necessary, so the option can safely be adjusted. Create a new file in your home directory named .gtkrc-2.0 then open this file in your favourite text editor to type:

gtk-menu-popup-delay=0

After saving the file, press Ctrl+Alt+Backspace to reinitialise xserver and your menus should open considerably faster.

 

Optimise KDE

KDE has received a mixed press lately. Though there's no doubting that its good looks and the new plasmoids set it apart from the competition, KDE 4 still can't match KDE 3 (or even Gnome) for speed and performance. Though this area is in heavy development, a few tweaks can trim valuable seconds off your startup time and make the desktop as a whole much more responsive.

Disable IPv6

Until IPv6 is more implemented, Konqueror has to translate between IPv4 and IPv6 - so if you can get a speed boost by turning off IPv6. The methods are slightly different between distros. For instance, in Kubuntu you need to edit /etc/environment as root and add the following line to the file:

KDE_NO_IPV6=True

In openSUSE, edit /etc/sysconfig/windowmanager with root permissions and find this line:

KDE_USE_IPV6="yes"

then change the answer to no . In both cases you will need to save the file and exit before restarting the session for the changes to take effect.

Enable automatic login

Gnome isn't the only desktop that can benefit from you setting up an automatic login: KDE 4 users can do much the same thing by heading to System Settings and clicking on the Advanced tab. Here you can run the login manager and enable automatic login from the Convenience tab. You'll also need to choose the user you want to log in automatically from the drop-down menu below the checkbox. When you reboot you should miss the login screen altogether and launch straight into the KDE 4 splash screen.

Start with an empty session

By default KDE 4 saves volumes of data about your current session, such as which windows are open and which processes were running so that next time you log in your session is exactly as you left it. This is very convenient, but it also slows your boot time down as this data has to be reloaded on each boot. We can avoid this problem by ensuring that we start with a fresh session. Select System Settings (or Configure Desktop in OpenSUSE) from the KDE menu and in the Advanced tab start the session manager. Towards the bottom of the form select the radio button next to Start With An Empty Session then click Apply.

Start Konqueror faster

We can make Konqueror run much faster by enabling preloading. This uses some memory, but means that the next time you fire up Konqueror it will open in around half the time and in the same place you left it. If you used the previous tweak to start KDE with an empty session then there's no need to panic, as we will configure preloading to run automatically when KDE starts.

To enable Konqueror preloading, open up the browser and head to Settings > Configure Konqueror . In the Performance section check the box next to Preload An Instance After KDE Startup . You can also set how many instances of Konqueror are preloaded at startup depending on how many Konqueror windows you tend to run at any one given time.

Voice of the Guru #2

Gael Duval - Founder of Mandriva and Ulteo

"I'm always using '!part_of_command' as a repeater of a shell command you want to repeat. For instance if you have typed 'ps auxww' in the near past and want to go with it again, then just type '!ps'. Of course it's also cool to use it jointly with a command number returned from the list of past commands provided by 'history'. Just type '!command_number' to repeat a command from the history list."

分享到:
评论

相关推荐

    VB编程资源大全(英文控件)

    &lt;END&gt;&lt;br&gt;28,ColorProgressBar.zip&lt;br&gt;Replaces the standard progress bar with one that is on the order of O(n^2) times faster, with color options, and directional options.&lt;END&gt;&lt;br&gt;29,MDITaskBarDemo.zip...

    Visual C++ 编程资源大全(英文源码 表单)

    1,01.zip&lt;br&gt;MFC Extension Library&lt;br&gt;MFC扩展界面库, 使用Visual C++ 6.0(15KB)&lt;END&gt;&lt;br&gt;2,02.zip&lt;br&gt;Visual Studio style UI&lt;br&gt;Visual Studio风格的界面效果(15KB)&lt;END&gt;&lt;br&gt;3,03.zip&lt;br&gt;Internet Explorer 4 ...

    DIBSection Class VB

    &lt;br&gt;&lt;br&gt; m_hDC = CreateCompatibleDC(0) &lt;br&gt; If (m_hDC &lt;&gt; 0) Then &lt;br&gt; If (CreateDIB(m_hDC, lWidth, lHeight, m_hDIb)) Then &lt;br&gt; m_hBmpOld = SelectObject(m_hDC, m_hDIb) &lt;br&gt; Create = True &lt;br&gt; Else &lt;br...

    Using DIB Sections in VB

    &lt;br&gt;&lt;br&gt; m_hDC = CreateCompatibleDC(0) &lt;br&gt; If (m_hDC &lt;&gt; 0) Then &lt;br&gt; If (CreateDIB(m_hDC, lWidth, lHeight, m_hDIb)) Then &lt;br&gt; m_hBmpOld = SelectObject(m_hDC, m_hDIb) &lt;br&gt; Create = True &lt;br&gt; Else &lt;br...

    VB编程资源大全(英文源码 控件)

    not really encryption&lt;END&gt;&lt;br&gt;21 , imagebutton2.zip&lt;br&gt;Round and freaky shape command buttons, updated from before- really an image control.&lt;END&gt;&lt;END&gt;&lt;br&gt;22 , talkeyboard.zip&lt;br&gt;Talking keyboard for ...

    VB编程资源大全(英文源码 数据库)

    The sample creates a new database file and allows you to view, add, or delete records in this database."&lt;END&gt;&lt;br&gt;2 , dbprint.zip&lt;br&gt;This demonstrates how to print data from a database.&lt;END&gt;&lt;br&gt;3 , ...

    SQLite

    Its functionality lies between MySQL and PostgreSQL, however it is faster than both databases.&lt;br&gt;&lt;br&gt;In SQLite, author Chris Newman provides a thorough, practical guide to using, administering and ...

    狗目标检测数据集VOC-xml格式100张.zip

    `&lt;bndbox&gt;`标签内的`&lt;xmin&gt;`, `&lt;ymin&gt;`, `&lt;xmax&gt;`, `&lt;ymax&gt;`分别代表边界框的左上角和右下角的像素位置。 利用这个数据集,研究人员和开发者可以训练深度学习模型,如Faster R-CNN、YOLO(You Only Look Once)或...

    目标检测数据集:遥感卫星图像检测(xml标注)

    其中,`&lt;filename&gt;`指定了图像文件名,`&lt;size&gt;`包含了图像的宽、高和通道数,`&lt;object&gt;`标签下的`&lt;name&gt;`表示目标类别,`&lt;bndbox&gt;`则给出了目标的边界框坐标(`&lt;xmin&gt;`, `&lt;ymin&gt;`, `&lt;xmax&gt;`, `&lt;ymax&gt;`),描述了目标...

    VOC硬币数据集xml格式

    &lt;filename&gt;硬币图像.jpg&lt;/filename&gt; &lt;path&gt;/path/to/硬币图像.jpg&lt;/path&gt; &lt;source&gt; &lt;database&gt;自定义数据库&lt;/database&gt; &lt;/source&gt; &lt;size&gt; &lt;width&gt;图像宽度像素&lt;/width&gt; &lt;height&gt;图像高度像素&lt;/height&gt; ...

    cuteEditor6.0

    You can also create your own policy files that define arbitrary permission sets.&lt;br/&gt;&lt;br/&gt;Comparison of the sample security policy file &lt;br/&gt;&lt;br/&gt; &lt;br/&gt;Permissions/Resource Setting Admin Default ...

    图片打标签程序windows_v1.3.0.zip

    在上述例子中,`&lt;name&gt;`元素表示物体类别(如"car"),而`&lt;bndbox&gt;`元素则包含了物体边界框的坐标(`&lt;xmin&gt;`、`&lt;ymin&gt;`、`&lt;xmax&gt;`、`&lt;ymax&gt;`)。这样的标注数据对于训练深度学习模型,如YOLO(You Only Look Once)...

    LabelImg图像标记.rar

    &lt;path&gt;/path/to/image.jpg&lt;/path&gt; &lt;source&gt; &lt;database&gt;The Database&lt;/database&gt; &lt;/source&gt; &lt;size&gt; &lt;width&gt;640&lt;/width&gt; &lt;height&gt;480&lt;/height&gt; &lt;depth&gt;3&lt;/depth&gt; &lt;/size&gt; &lt;object&gt; &lt;name&gt;class1&lt;/name&gt; ...

    目标检测标注工具labelImg

    &lt;path&gt;C:\path\to\image.jpg&lt;/path&gt; &lt;source&gt; &lt;database&gt;Unknown&lt;/database&gt; &lt;/source&gt; &lt;size&gt; &lt;width&gt;640&lt;/width&gt; &lt;height&gt;480&lt;/height&gt; &lt;depth&gt;3&lt;/depth&gt; &lt;/size&gt; &lt;segmented&gt;0&lt;/segmented&gt; &lt;object&gt; ...

    DevExpress CodeRush 3.0.5 with Refactor! Pro (2/3)

    * Clipboard Tools - The clipboard as your trusty sidekick because a smart clipboard is a whole lot better than a simple one.&lt;br&gt; * Navigation Tools - Move through source code faster because fishing ...

    基于pytorch框架的Faster-RCNN模型python源码+项目说明+数据集.zip

    1、写入训练的txt文件 &lt;br&gt; &ensp;&ensp; 修改configs包下面的config文件中三个属性 &ensp;&ensp; 然后根据自己的数据集的标注文件是怎么个形式选择执行data包下面process_data.py文件中的两个方法。 &lt;br&gt; &ensp;&...

    行人跌倒数据集 跌倒检测_fall.rar

    经典的模型如YOLO(You Only Look Once)、SSD(Single Shot Multibox Detector)或Faster R-CNN等都可以被用于目标检测任务,通过网络学习来识别和定位跌倒事件。同时,考虑到跌倒检测的动态特性,也可以考虑使用...

    DevExpress CodeRush 3.0.5 with Refactor! Pro (1/3)

    * Clipboard Tools - The clipboard as your trusty sidekick because a smart clipboard is a whole lot better than a simple one.&lt;br&gt; * Navigation Tools - Move through source code faster because fishing ...

    HTML5小蝌蚪组成心形动画特效.zip

    &lt;label for="friction"&gt;friction &lt;span&gt;(f&gt;1: faster, faster! f&lt;1: slow....)&lt;/span&gt;&lt;/label&gt;&lt;br /&gt; &lt;input id="friction" value=".9" min="0.5" step="0.05" ...

Global site tag (gtag.js) - Google Analytics