Tampilkan postingan dengan label Windows. Tampilkan semua postingan
Tampilkan postingan dengan label Windows. Tampilkan semua postingan

Minggu, 17 Juli 2011

Putty Session Times Out Too Fast! Let's NEVER time out!

When I use Putty to run an SSH session it always times out too quickly. How do I make it so that the session never times out?
Putty is one of the most popular Windows based network connection clients. The protocols it supports include SSH, Telnet, Rlogin, Serial, Raw. Whenever I ssh into my ssh server and wait a bit the session times out! The reason is my SSH server sets a timeout value and when my inactivity exceeds that value the session times out. When it happens and when I type something the following dialog window pops up:

Putty Session Timeout Error Window

Isn't it annoying? How the hell do I tell the session to NEVER time out? One way is to configure your remote server to never time out. However it may be complicated and you may not have the permission to do so. Luckily there's a way for Putty to help you achieve this goal!

Solution
You can actually tell Putty to keep sending packets to the remote server so that the server thinks the session is alive and will not time out. Isn't that nice? Simply follow the following steps.

1. Create a session profile!
Fill in the session credentials of the session you regularly access by filling out the following fields: Host Name (or IP address), Port, Connection type. A sample screen shot looks like this:

Putty Session Configuration Window

2. Configure your session profile!
Go to Connection on the left tree and you should see the following screen shot:

Putty Connection Configuration Window

The red rectangle highlights what you need to change. The value of 'Seconds between keepalives (0 to turn off)' is the number of seconds between each two null packets sent to the destination server to keep the session alive. Simply change the value to something like 10. Keep in mind the value depends on how quickly your remote server times out your session when you are inactive. If you find that your session still times out set the value lower.

3. Save your session profile!
Click on Session on the left to go back to the session window which looks like:

Putty Session Configuration Window

Give it a name in the 'Saved Sessions' field. In the example the value of that field is 'daltrac'. Then click on Save button. Now you've saved this session profile. Whenever you want to access a session created by this profile simply click on it in the saved session list and click on Open button!

Now you should be able to run the session and keep the session indefinitely without it timing out. Again this is because Putty keeps sending packets to the remote server to make it think that the session is alive.

If you have any questions please let me know and I will do my best to help you!

Senin, 07 Februari 2011

How To Create A Soft Link In Windows

I ran into the situation where I needed to create a soft link (also known as symbolic link) on Windows 7, but after some searching on the web it turns out not to be a straightforward task. In Unix you simply do 'ln -s '. In Windows there are two ways of doing it:

1. Open a command prompt window and use mklink command. If you want to soft link to a directory you execute:

mklink /j C:\soft\link\name C:\path\to\target\directory
or
mklink /d C:\soft\link\name C:\path\to\target\directory

Note: The difference between /j and /d is /j creates a symbolic link while /d creates a hard link. Since you are linking to a directory you won't see any difference at all. Using the link created either way you'll be able to navigate to the destination folder and see its contents with no differences.

If you get an error saying you need admin privilege simply run the command prompt as the administrator as shown below:

How To Run Window

If you want to create a soft link to a file you do:

mklink C:\soft\link\name C:\path\to\target\file

2. Right click drag a target file from a Windows explorer window (namely a folder) to another explorer window and release. Then pick 'create a shortcut here' to create a shortcut. Then you simply double click on the shortcut icon to go the target. However if you open a command prompt window and try to navigate to the target via the shortcut through 'cd' you'll see an error. This makes this method useless in most situations.

Any question let me know!

Kamis, 03 Februari 2011

Create An SVN Project On An SVN Server

Q: I am using Eclipse on Windows and I'd like to check out SVN project with Eclipse. How the hell do I do it?

MenuCheck Out SVN In Eclipse On Windows
Create An SVN Project On An SVN Server
Download And Install TortoiseSVN
Check Out SVN Project Via TortoiseSVN
Validate SVN Integration With Eclipse

You use 'svnadmin' command to create an SVN repository where you will put in SVN projects. If you don't know how to do it google 'svnadmin create'. Let's assume your (intended) SVN server is running on Linux and you'd like the repository to be /home/michaelwen/svn. Subversion uses this directory to store information about your projects such as file revisions. You won't need to directly deal with this directory; so let's keep it in a safe place and not mess with its contents unless you know what you are doing. The command is the following:

svnadmin create /home/michaelwen/svn

Let's create a directory in your SVN repository to store a project named 'myproj':

svn mkdir file:///home/michaelwen/svn/myproj

Now go to the local folder where you keep the source code you'd like stored in the repository and add an SVN project via the 'svn import' command. An example is the following:

cd /home/michaelwen/where-my-code-for-myproj-is/myproj
svn import file:///home/michaelwen/svn/myproj -m "first import of myproj"


This command will put all contents in /home/michaelwen/where-my-code-for-myproj-is/myproj in file:///home/michaelwen/svn/myproj recursively.

◀ Check Out SVN In Eclipse On WindowsDownload And Install Tortoisesvn ▶

Validate Svn Integration With Eclipse

Q: I am using Eclipse on Windows and I'd like to check out SVN project with Eclipse. How the hell do I do it?

MenuCheck Out SVN In Eclipse On Windows
Create An SVN Project On An SVN Server
Download And Install TortoiseSVN
Check Out SVN Project Via TortoiseSVN
Validate SVN Integration With Eclipse
As I mentioned earlier you may not need TortoiseSVN at all if your Eclipse works fine with SVN. Read on to make sure this is the case. Even if this is not the case we've got a fall back solution for you.

To use SVN with Eclipse simply download and install Subclipse. Refer to any web tutorial on this topic if you haven't done so. Now when you use Subclipse to check out code from your SVN repository you may get the following error dialog:

Eclipse Subclipse SVN Operation Failure Dialog

If you do don't panic. This dialog is saying Subclipse fails to create ssh tunnel. A quick solution is simply change SVN interface from 'JavaHL (JNI)' to 'SVNKit (Pure Java) SVNKit' in Window -> Preferences -> Team -> SVN -> SVN Interface as follows:

Eclipse Subclipse SVN Interface Dialog

Once you made the change you should be able to use SVN operations smoothly within Eclipse! If you still don't for some reason, and I've heard cases like that, fall back on using TortoiseSVN to manage SVN checking out, updating, and committing changes to your code in Windows Explorer and use Eclipse to edit your code! It'll still be efficient once you get the hang of it.

◀ Check Out SVN Project Via TortoiseSVN

Check Out SVN Project Via TortoiseSVN

Q: I am using Eclipse on Windows and I'd like to check out SVN project with Eclipse. How the hell do I do it?

MenuCheck Out SVN In Eclipse On Windows
Create An SVN Project On An SVN Server
Download And Install TortoiseSVN
Check Out SVN Project Via TortoiseSVN
Validate SVN Integration With Eclipse
Once you have TortoiseSVN installed you can easily check out an SVN project into any local directory you want. Let's say you'd like to download some project into your D:. Right click on D: in any Windows Explorer window and pick 'SVN Checkout...' as follows:

TortoiseSVN SVN Checkout

xxx.xxx.xxx.xxx is the IP address where I hosted my project at. You should use your own SVN URL.

Click OK and you should see the checkout in progress like the following:

TortoiseSVN Svn Checkout In Progress

Once it says checkout done you are done! Now check your D: and the project should be checked out at D:\repository.

◀ Download And Install TortoiseSVNValidate SVN Integration With Eclipse ▶

Download And Install TortoiseSVN

Q: I am using Eclipse on Windows and I'd like to check out SVN project with Eclipse. How the hell do I do it?

MenuCheck Out SVN In Eclipse On Windows
Create An SVN Project On An SVN Server
Download And Install TortoiseSVN
Check Out SVN Project Via TortoiseSVN
Validate SVN Integration With Eclipse
TortoiseSVN is one of the most common Subversion clients you can find that runs on Windows OS. Once you install it you'll be able to see SVN operation options in the context menu (the menu that shows up when you right-click your mouse) and be able to perform any of those options. Technically you will NOT need TortoiseSVN once you get Eclipse integrated with Subversion on Windows but TortoiseSVN still provides great utility to you. If you don't feel like using it feel free to move on.

Instructions
Simply go to the download site of TortoiseSVN and download and install it. Note that you must download the version that matches your OS architecture (either 32-bit or 64-bit). If not you will NOT see the TortoiseSVN options in the context menu when you right-click some directory like it says you would:

TortoiseSVN Download 32 Bit Versus 64 Bit

After installing and rebooting you'll be able to see the following SVN operation options in the context-menu just like the following:

TortoiseSVN Context Menu

◀ Create An SVN Project On An SVN ServerCheck Out SVN Project Via TortoiseSVN ▶

Check Out Svn In Eclipse On Windows

Q: I am using Eclipse on Windows and I'd like to check out SVN project with Eclipse. How the hell do I do it?

MenuCheck Out SVN In Eclipse On Windows
Create An SVN Project On An SVN Server
Download And Install TortoiseSVN
Check Out SVN Project Via TortoiseSVN
Validate SVN Integration With Eclipse
Not sure where to start but I've had an amazingly difficult time to do this task. I am running Eclipse on Windows and I have my Subversion (SVN will be used in short from this point on) project running in some remote server. All I want to do is check out that SVN project and be able to integrate it with Eclipse so that I can do SVN operations within Eclipse instead of do them via command line. The problem is that the web server I am running on that remote server is Nginx, which does NOT have a standard way of integrating with SVN yet like Apache does. Therefore all I have is svn+ssh protocol to manage my SVN project, but the Subclipse plug-in for Eclipse seems to ONLY accept HTTP protocol as the SVN URL. Later I found out once I change the SVN interface it all works fine (described at Validate SVN Integration With Eclipse).

Can I blame it on Nginx? Can I blame it on Eclipse? Anyway finally I managed to solve this issue in the following steps. Preconditions are that I am running Windows 7.

1. Create an SVN project on your SVN server

2. Download and install TortoiseSVN: You may not need TortoiseSVN if your Eclipse is integrated with Subversion successfully but it's still a great tool to have.

3. Check out your SVN project through TortoiseSVN: Again you may not need TortoiseSVN if your Eclipse is integrated with Subversion successfully but in case it doesn't you have TortoiseSVN to fall back on.

4. Validate SVN Integration With Eclipse


Let's get started on how I managed to handle this monstrous issue!

Create An Svn Project On An SVN Server ▶

Selasa, 14 September 2010

COMPLETE Guide To Install IE6 On Windows 7 Home Premium

The need to install Internet Explorer 6 on a PC with Windows 7 Home OS is a common one for web developers as pointed out by Cross Browser Compatibility Tutorial. However you'll face many issues. I've found various guides that solve a part of the problem. Together they solve them all. It's about time someone wrote a post on how to solve this problem from start to finish, with no guesswork and no questions along the way!

The following is a screen shot of Windows Virtual PC running Windows XP SP3 with IE6 installed, our goal for today:
Windows Virtual PC Screenshot

Let's get to each problem you may face and how you can resolve it!

Problem #1: You CANNOT install IE6 directly on Windows 7 Home Premium OS. One way to get around this issue is you need to use some sort of virtual PC to run Windows XP and then run Internet Explorer 6 in that environment.

Problem #2: However, Windows XP Mode and Windows Virtual PC are available ONLY on Windows 7 Professional and Windows 7 Ultimate as this website suggests:

http://www.microsoft.com/windows/virtual-pc/

That's convenient It says nothing about how one can do the same thing with Windows 7 Home edition :-( Lucky you! I've figured it out by myself. To get around this issue install Windows Virtual PC. You can download Virtual PC for Windows 7 at the following URL. If your PC is 64-bit download
Windows6.1-KB958559-x64.msu. If your PC is 32-bit download
Windows6.1-KB958559-x86.msu.

http://www.microsoft.com/downloads/details.aspx?FamilyID=2b6d5c18-1441-47ea-8309-2545b08e11dd

Note: Do NOT install Microsoft Virtual PC. You'll get a compatibility error when you try to run it. Questions?


Problem #3: Your PC needs to support HAV, short for Hardware-assisted virtualization. To know whether your PC supports HAV download the HAV detection tool at

http://go.microsoft.com/fwlink/?LinkId=163321

If your computer does not have hardware-assisted virtualization, you'll get an error while creating a virtual PC. To get around this issue, download and install a hot fix at

http://support.microsoft.com/default.aspx?scid=kb;EN-US;977206

Questions?


Problem #4: You need to have license to a genuine Windows XP image. But nobody would want to shell out hundreds of dollars to get Windows XP just so they can test IE6 right? There's an alternative that costs you NOTHING. There's a place where you can download hard disk images for testing websites with different Internet Explorer versions on Windows XP and Windows Vista. Download IE6-on-XP-SP3.exe at

http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

Run IE6-on-XP-SP3.exe to get IE6 on XP SP3.vhd. Note where it's installed as you'll need it in the following step.

The problem is that the image has an expiration date of several months. This should be fine. When the disk image expires simply download the same file again at the same website. Questions?


Now you've gone through all the issues and resolutions. Let's create a virtual pc and run it! Go to Start menu and pick 'Windows Virtual PC' from 'All Programs' and you should see the following window.

Windows Virtual PC Window Screenshot

Click on Create virtual machine and fill in 'ie6' in Name field. For Location field fill in the path to the disk image you just downloaded and executed. For example mine is C:\Users\michael\Desktop\software\IE6 on XP SP3.vhd.

Your virtual machine should be up and running. If you don't get Internet in the virtual machine then read on. When you open 'Windows Virtual PC' again you'll see ie6.vmcx in the list like the following:

Windows Virtual PC Window with One Virtual Machine

Right click on it and pick Settings and you should see the following window:

Windows Virtual PC Settings

Click on Networking and select the wireless network adapter installed on your PC in 'Adapter 1' field. If you are not sure simply try each option and start the virtual machine until you get internet in the virtual machine.

TIP: Click on Integration Features and uncheck 'Enable at startup' because I don't find it useful and it takes a long time to run when enabled.

TIP again: Another thing is if you leave the virtual machine on idle you may be prompted to enter the password for the account. If you forgot your password while creating the virtual machine simply restart the virtual machine and create a Guest account in 'User Accounts' in 'Control Panel'. Then use that Guest account! Your purpose is to test IE6 anyway :)

TIP again twice: If you want to set up Internet Explorer 6 simply because you'd like to test your website, refer to How To Install Internet Explorer 6 so You Can Test Your Website On IE6!


Questions? Let me know!

Senin, 28 Juni 2010

Show Correct Icons In Gallery View In Windows OS

I use Windows OS. My image files are showing incorrect icons. How do I make it show correct icons?

To clarify, say you have a folder filled with image or photo files, and you view those files in gallery view (this view option is called Icons in Windows OS). This view allows you to see images of those files in smaller size so that you get an idea of what image each file contains, rather than having to open each file in Microsoft Paint or some image or photo application to view it. The problem is sometimes you see incorrect or stale images. You open the file and it shows correct image. You close it and the icon image is still wrong.

This has happened to me several times before and to my surprise and dismay, hitting Refresh does NOT solve it Later I came across a fix, which is to change the view to List or Details, and then change it back to Icons. With any luck you should now be seeing correct icons.

If not let me know!
 
support by: infomediaku.com