Git Product home page Git Product logo

system-config's Introduction

System-config is my customizations of Posix systems (Linux/Cygwin/Mac OS X, but mainly Debian Linux or Ubuntu). It aims to reproduce my complete working environment with a single command. I made an introductory video about it on youtube (It’s in Chinese, with English subtitles).

system-config-youtube.png

During set-up, system-config will download, install, compile many open source projects that I use frequently.

One of these projects is beagrep. It combines a search engine with grep. It is very useful for reading source code. In fact I use it to read system-config’s own source code (code reading is like solving puzzles, solving puzzles is about looking for answers, and what’s best for looking for answers? Search Engines. Google. Beagrep is a local search engine best tuned for software projects).

How to install

Under Debian Linux or Ubuntu, it’s simple to set up system-config:

git clone https://github.com/baohaojun/system-config/ ~/system-config &&
    ~/system-config/bin/Linux/after-check-out.sh

You probably need to fix some bugs when running after-check-out.sh. And then, make system-config your own by forking it and customizing it.

On non debian systems, or if you don’t have sudo permission, you can try to use Linuxbrew:

git clone https://github.com/baohaojun/system-config/ ~/system-config &&
    ~/system-config/bin/after-co-ln-s.sh && (
        . ~/.bashrc
        install-brew.sh
    )

Install Under Mac/Windows

First, please note that installation under Mac/Windows is not as complete as under Linux.

To install under Windows, you need install Cygwin first, then run this command, and fix the errors that might happen (in most cases, they can be fixed by installing additional cygwin packages).

~/system-config/bin/windows/after-check-out.sh

To install under Mac, you need install HomeBrew first, then run this command, and fix the errors that might happen (in most cases, they can be fixed by: 1. installing additional HomeBrew packages and 2. Changing the PATH environment variable, so that the default command can be forced to use HomeBrew’s version).

For your reference, I have used the following setup in my Mac (you may or may not copy&paste it, since the version numbers might change):

if test "$(uname)" = Darwin; then
    extra_path=(
        /usr/local/Cellar/coreutils/8.30/libexec/gnubin
        /usr/local/Cellar/gnu-getopt/1.1.6/bin
        /usr/local/Cellar/bash/4.4.23/bin
        /usr/local/opt/grep/libexec/gnubin
        /usr/local/opt/findutils/libexec/gnubin
        /usr/local/bin
    )
    export SC_PATH_PREFIX=$(
        for x in "${extra_path[@]}"; do
            echo -n $x:
        done
           )
    if test "$(which grep)" != /usr/local/opt/grep/libexec/gnubin/grep; then
        PATH=${SC_PATH_PREFIX}${PATH}
    fi
fi
PATH-TO-HOMEBREWS-VERSION-OF-BASH ~/system-config/bin/Darwin/after-check-out.sh # The Mac's /bin/bash's version is too low.

There’s some difference between Mac and Windows/Linux, because Mac is a kind of Unix by itself, and it comes with traditional versions of Unix tools, for e.g., Mac’s native readlink(1) command does not support the -f flag, and you must switch to the HomeBrew version. To make it worse, HomeBrew won’t by default replace some important system tools, it will only remind you to make that decision yourself (and it will tell you how-to ONLY ONCE if you really want to replace, so watch the HomeBrew installation output carefully).

Currently, the Mac version of after-check-out.sh will only do a minimun setup (just like after-co-ln-s.sh), if you need to build other software, such as beagrep, you need figure it out by yourself. Mainly it’s only a problem of installing dependent packages from HomeBrew.

How to update

System-config come’s with a script named system-config-update, you can run it to update to the latest version.

How to remove

If you tried system-config and don’t like it, you can run the following command to stop it:

sc stop

Next time, if you want to try again, you can simply run:

sc start

How to completely remove system-config

Unfortunately, there is no clean way to remove system-config and change everything back to the way it was before you installed system-config.

You may run: rm -rf ~/system-config ~/src/github, and reboot to see if everything works the old way.

If not, you may need to re-build your HOME directory or even re-install your Liunx.

See disclaimer.

How to use

You should be able to use system-config just like using any Linux distribution.

But if you want more power, you can watch the youtube video and try to copy whatever that you like.

(If you are in China, note that the video is also uploaded to bilibili.)

How does it work?

Please refer to my github blog, there are quite some articles about system-config. Most are in Chinese though, sorry😅.

Especially this article: How does it work and how to use it.

Disclaimer

System-config started out as a very personal project. If you decided to use it, please do so at your own risk, there is absolutely no warranty of any kind😅.

If you have your own customization, it would be a good idea that you back them up before you try system-config. It’s a good idea that you too put your own customization into a git repo, if you have not done so already.

THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Contribute

Bug reports, patches, ideas are welcome.

system-config's People

Contributors

baohaojun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

system-config's Issues

Sawfish error:

sawfish自己编译好了启动了,但是每次用sawfish --replace 启动的时候报错:
File error: No such file or directory, bhj-run-application

包老师,请教您一个问题

包老师,开这个issue,主要是我有一个问题想请教您。

我是东南大学的一名本科生,之前在学习emacs的时候偶然间在bilibili上看到了您的视频,看完视频之后我对system-config产生了很大的兴趣。所以我就装了一下您的system-config,由于缺乏说明文档,system-config里面很多的功能我并不知道如何使用,并且安装完之后报的一些错我也不知道如何解决(且报错的这些功能我暂时可能也用不到)。与其查看源码,我想不如参考您的system-config自己也写一个system-config,根据自己的需求要什么功能添加什么功能。(本人的system config地址是:https://github.com/PowerfulSpider/system_config)

由于我非常喜欢 "做选择题“,所以我自己写的re命令也是列举历史让用户选择,具体如下:
user@user-OptiPlex-3046:~/system_config
$ re git clone
0) git clone [email protected]:data-integration/com.kgtdata.qa.joyoung.git

  1. git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
  2. git clone https://github.com/pein0119/emacs.d.git
  3. git clone [email protected]:PowerfulSpider/system_config.git
    => emacs
  4. git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
  5. git clone https://github.com/pein0119/emacs.d.git
    => 1

目前,我的做法是选中了一个命令之后,将该命令放到系统剪贴板里面,之后就可以直接粘贴出来
但是其实我想做成的效果是将选中的命令直接上屏,所以我想请教您如何将选中的命令直接上屏?

我已经尝试了我能想到的方法:在终端中模拟用户输入(没找到有用资料);修改PS1(这个最傻:));调用alt + p 输入字符查找与字符相接近的历史命令(没弄清楚alt + p调用了什么函数,因此也就不知道在脚本中怎么调用)

谢谢!

mkbeagrepidx issue in ubuntu 16.04

Hi ,
I have an issue when use mkbeagrepidx, can you give some help?

$mkbeagrepidx 
Should not do for-code-reading in your HOME; are you sure? Yes/no: yes
Error: Unhandled exception thrown.  Exiting immediately.
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at Beagrep.Daemon.BuildIndex.Main (System.String[] args) <0x40a31d50 + 0x0001f> in <filename unknown>:0 
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

M-x helm Issues

I saw the video and used your configuration . i used helm normally like this
screenshot from 2016-01-18 18-54-28
. When I need to write php, press the tab key, and the code can not make full prompt set-buffer: Wrong type argument: processp, nil Error running timer `ac-update-greedy ': (wrong-type-argument processp nil). I updated plugins. M-x did not find the code hints
screenshot from 2016-01-18 18-09-38
A. These days reinstall the system, re-install the system-config several times, still can not be resolved. My system is ubuntu 15.10.

sawfish -ui can't use this command to set with graphgic.

$sawfish -ui
Sawfish error:
File error: No such file or directory, gnome
Sawfish error:
Here is the result:
File error: No such file or directory, debian-menu
Sawfish error:
File error: No such file or directory, bhj-run-application

Lisp backtrace:
#8 require ...
#6 run-byte-code ...
#4 make-structure (() #<closure 5580b290f7b0 @ user> #<closure 5580b290f788 @ user> user)
#2 load ...
#1 run-byte-code ...

error--> (file-error "No such file or directory" "-ui")

My sawfish Version:
sawfish version 1.11.90

Is there any help for me to configure my sawfish,I'm really an Greenhand to use sawfish,used to configure it with graphgic settining
I install it under debian8.2 by apt-get install sawfish.

ctrl2cap

Hi Baohaojun,
Please see a question regarding the sysinternal tools. Specifically, concerned tool is ctrl2cap. Is there a way to modify tool to convert "~" character to another character? Default behavior is to convert "CAPS LOCK" to "Left CONTROL".
Thanks.
Regards,
aagarwal584

Symbol's function definition is void: grep-tag-default

使用M-x grep-func-call 会出现Symbol's function definition is void: grep-tag-default 问题
grep-tag-default不知道这个函数在哪里定义的, 还是我的环境配置的问题, 我用的是你的system-config配置, 谢谢
系统ubuntu 12.04 emacs23.3.1

Font 配置问题

我使用了你的bhj-fonts.el文件来解决中英文等宽问题,配置成功了,但如果以emacs --daemon启动会报错「error: X windows are not in use or not initialized」,我想可能是你在这个文件中使用了命令行模式不兼容的参数,能想办法解决么?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.