Hi,
Well wont you love to have the syntax/color highlighted in VI editor. Be it a C program or HTML, vim is a classy editor and of course we would love to have syntax highlighted on it.
Aint it ??
How to go ahead and achieve it.
The easiest way - in vim press :
the type 'syntax on'
To do it everytime the editor comes up automatically.
Search for a file called vimrc.
Generally it would be somewhere like /etc/vim/vimrc
Open the file and uncomment the line
"syntax on
to
syntax on [remove whatever is before that]
Play around, make changes, then next time vim is started, syntax is highlighted.
Follow: http://www.ph.unimelb.edu.au/~ssk/vim/syntax.html for actual documentation.
Chao.
Tuesday, June 24, 2008
Friday, June 20, 2008
Monday, June 2, 2008
How to export X display using Cygwin
Hi.
For most of those who would want to connect from a Windows machine on to a Linux/Solaris/Unix server and have the display imported, here is the method.
1. Download and install cygwin on windows.
2. After the installation is complete, run a cygwin bash shell.
3. type the following commands there
x -multiwindow&
export DISPLAY=[IP of ur machine]:0.0 [for me it was export DISPLAY=10.114.55.119:0.0]
xhost +
4. Telnet to the remote machine and set the DISPLAY variable with your machine's IP
export DISPLAY=[IP of local machine]:0.0
5. start any application in the background.
firefox&
For most of those who would want to connect from a Windows machine on to a Linux/Solaris/Unix server and have the display imported, here is the method.
1. Download and install cygwin on windows.
2. After the installation is complete, run a cygwin bash shell.
3. type the following commands there
x -multiwindow&
export DISPLAY=[IP of ur machine]:0.0 [for me it was export DISPLAY=10.114.55.119:0.0]
xhost +
4. Telnet to the remote machine and set the DISPLAY variable with your machine's IP
export DISPLAY=[IP of local machine]:0.0
5. start any application in the background.
firefox&
Monday, May 26, 2008
Steps for configuring Apache HTTP Daemon on Solaris x86
- Get the source code and untar it and then enter the directory.
- run configure
- run make
- run make install
- become super user
- export the binary path [ /usr/local/apache2/bin ]
- export the libraries path [ /usr/local/lib and /usr/lib]
- edit the Group# from Group# -1 to Group# 0 [ for root ] in /usr/local/apache2/conf/httpd.conf
- edit the Username from nobody to ‘smoke’ in the same file, although leaving this untouched does not cause any problem [ It is recommended by the online manual to create a new user to run the server , and not to set the user as root ]
- run apachectl start
- run firefox and open the link http://localhost which tells about the status of the server.
- for logs look into /usr/local/apache2/logs
- run configure
- run make
- run make install
- become super user
- export the binary path [ /usr/local/apache2/bin ]
- export the libraries path [ /usr/local/lib and /usr/lib]
- edit the Group# from Group# -1 to Group# 0 [ for root ] in /usr/local/apache2/conf/httpd.conf
- edit the Username from nobody to ‘smoke’ in the same file, although leaving this untouched does not cause any problem [ It is recommended by the online manual to create a new user to run the server , and not to set the user as root ]
- run apachectl start
- run firefox and open the link http://localhost which tells about the status of the server.
- for logs look into /usr/local/apache2/logs
Thursday, February 14, 2008
Starting an App with GNOME Startup
There are times when you would like to start certain app when GNOME
starts up. This is just like the Windows Startup program. In Windows
[Win XP] we used to place the links to the programs in the Startup
Folder.
On my machine I have Fedora Core 7 and Ubuntu 7.10 (Gutsy Gib). Now I
tried this on FC7 , worked perfectly.
Steps.
1. Open a terminal and login as root.
2. Now locate the file read by GNOME when it starts a default session.
The file is named as "default.session" and for me its path was
"/usr/share/gnome/default.session". If for you the file does not exist
there, you can look for the file by using the command
"find / -name default.session". The file will be stored under a
directory named gnome.
3. Once you get the file open it with a text editor.
4. It will be something like this:
------------------------------------------------------------------------------------------------------------------------
# This is the default session that is launched if the user doesn't
# already have a session.
# The RestartCommand specifies the command to run from the $PATH.
# The Priority determines the order in which the commands are started
# (with Priority = 0 first) and defaults to 50.
# The id provides a name that is unique within this file and passed to
the
# app as the client id which it must use to register with gnome-session.
# The clients must be numbered from 0 to the value of num_clients - 1.
[Default]
num_clients=6
0,id=default0
0,Priority=60
0,RestartCommand=pam-panel-icon --sm-client-id default0
1,id=default1
1,Priority=10
1,RestartCommand=gnome-wm --default-wm gnome-wm --sm-client-id default1
2,id=default2
2,Priority=40
2,RestartCommand=gnome-panel --sm-client-id default2
3,id=default3
3,Priority=40
3,RestartCommand=nautilus --no-default-window --sm-client-id default3
4,id=default4
4,Priority=40
4,RestartCommand=gnome-volume-manager --sm-client-id default4
5,id=default5
5,Priority=41
5,RestartCommand=evolution
------------------------------------------------------------------------------------------------------------------------
Now on everything is pretty simple. OK the entries.
num_clients=6 - It is the number of clients that would start once the
default session starts/
The numbers 0,1,2,3,4,5 are the application numbers. These along with
the id are used to mark an application.
Priority=[Num]. Each application has a different priority numbers which
states the criticality of the app. The point to be noted here is higher
the priority number is, the lesser critical the app is. In most systems
the highest priority is set to be 0 where as the minimum priority is 50.
e.g. I added evolution to startup. This was simple, I changed the
num_clients to 6 from 5, then added the last 3 lines to the file and
saved it. The next time I restarted GNOME, "Lo. Evolution was up :D"
starts up. This is just like the Windows Startup program. In Windows
[Win XP] we used to place the links to the programs in the Startup
Folder.
On my machine I have Fedora Core 7 and Ubuntu 7.10 (Gutsy Gib). Now I
tried this on FC7 , worked perfectly.
Steps.
1. Open a terminal and login as root.
2. Now locate the file read by GNOME when it starts a default session.
The file is named as "default.session" and for me its path was
"/usr/share/gnome/default.session". If for you the file does not exist
there, you can look for the file by using the command
"find / -name default.session". The file will be stored under a
directory named gnome.
3. Once you get the file open it with a text editor.
4. It will be something like this:
------------------------------------------------------------------------------------------------------------------------
# This is the default session that is launched if the user doesn't
# already have a session.
# The RestartCommand specifies the command to run from the $PATH.
# The Priority determines the order in which the commands are started
# (with Priority = 0 first) and defaults to 50.
# The id provides a name that is unique within this file and passed to
the
# app as the client id which it must use to register with gnome-session.
# The clients must be numbered from 0 to the value of num_clients - 1.
[Default]
num_clients=6
0,id=default0
0,Priority=60
0,RestartCommand=pam-panel-icon --sm-client-id default0
1,id=default1
1,Priority=10
1,RestartCommand=gnome-wm --default-wm gnome-wm --sm-client-id default1
2,id=default2
2,Priority=40
2,RestartCommand=gnome-panel --sm-client-id default2
3,id=default3
3,Priority=40
3,RestartCommand=nautilus --no-default-window --sm-client-id default3
4,id=default4
4,Priority=40
4,RestartCommand=gnome-volume-manager --sm-client-id default4
5,id=default5
5,Priority=41
5,RestartCommand=evolution
------------------------------------------------------------------------------------------------------------------------
Now on everything is pretty simple. OK the entries.
num_clients=6 - It is the number of clients that would start once the
default session starts/
The numbers 0,1,2,3,4,5 are the application numbers. These along with
the id are used to mark an application.
Priority=[Num]. Each application has a different priority numbers which
states the criticality of the app. The point to be noted here is higher
the priority number is, the lesser critical the app is. In most systems
the highest priority is set to be 0 where as the minimum priority is 50.
e.g. I added evolution to startup. This was simple, I changed the
num_clients to 6 from 5, then added the last 3 lines to the file and
saved it. The next time I restarted GNOME, "Lo. Evolution was up :D"
Monday, September 17, 2007
JEEEEEeeeezzzz!!!!
The good things, the bad things, the should things, the shouldnot things, the 'did' things, the 'didnot' things, the small things, the BIG things and the GGRRREEEEAAATT things. Counsellings, enlightenments, hopes, frustration, you, me. The mothaf***in posts in the mothaf***in blogs.
Jeeeeeeeeezzz!!
What crap we all deal with man.
My first attempt to write something good, something technical, something scientific. To build the path to know the unknown, to add my two grains to the bridge abridging humanity and completeness, eternity, the good Lord, my attempt to unravel one more mystery in time, add to at least one person's intellect in some way, to open someone's eye.
My purpose unraveled, my destination unknown, my path undetermined and my approach unstated. Rise and contribute to the community of knowledge, to the community of free thinkers, before you and your children and their children stand on the brink of complete annihilation.
----------------------------------------------------------------------------------------------------------------------------------------
"You were never taught how to breathe, even when you are put underwater, you will find out a way to breathe. So no point in discussing about life and its whereabouts, you will continue to live, you will continue to suck. Continue living, continue sucking."
-
Devil_Nax0r
Jeeeeeeeeezzz!!
What crap we all deal with man.
My first attempt to write something good, something technical, something scientific. To build the path to know the unknown, to add my two grains to the bridge abridging humanity and completeness, eternity, the good Lord, my attempt to unravel one more mystery in time, add to at least one person's intellect in some way, to open someone's eye.
My purpose unraveled, my destination unknown, my path undetermined and my approach unstated. Rise and contribute to the community of knowledge, to the community of free thinkers, before you and your children and their children stand on the brink of complete annihilation.
----------------------------------------------------------------------------------------------------------------------------------------
"You were never taught how to breathe, even when you are put underwater, you will find out a way to breathe. So no point in discussing about life and its whereabouts, you will continue to live, you will continue to suck. Continue living, continue sucking."
-
Devil_Nax0r
Subscribe to:
Posts (Atom)