Saturday, April 21, 2012

Some tricks a CSE guy will need at IIT Kanpur in his stay here...


1. $ppop cancel all
Enter this command after you have printed your pages, as it will cancel all the other jobs you have given to other printers. It will help to reduce the queues for the other people.

2. double-side printing in lab
In CSE lab, lp2 and lp1 are capable of double side printing but sometimes, by default they may not be set on double side printing (setting can be changed from settings menu on the printer). 
Alternatively,
For double-side printing
$ppr -d lp2 --feature Duplex=DuplexNoTumble filename
For single-side printing
$ppr -d lp2 --feature Duplex=NoDuplex filename

3. YouTube not working !! Install flash player.
This will install flash player for Iceweasel and Epiphany Web Browser (browsers installed in CSE lab).

Download libflashplayer.so file from Adobe website and put it in home/.mozilla/plugins/
Make the plugins folder if not already present.

To install flashplayer in Chromium Browser.
Copy the libflashplayer.so file to home/.config/chromium/plugins
Make the plugins folder if not already present.
Enjoy!!!


4. On the start of Iceweasel, if you get message something like "Could not load security components..", then you may not be able to access secure website (ones with https://). Facebook is a secure website.
File cert8.db may have got corrupted.
Go to home/.mozilla/firefox/c3ocw2bl.default/ and check permissions for cert8.db.
Set access to Read and Write if not already. If changing the file permissions doesn't work then delete this file. You may have to install flash player again, if you delete this file.

5. Forwarding the cse webmail mails to Gmail.
ssh forward.cse.iitk.ac.in
Make a file .forward if it already doesn't exist.

If your gmail username is abc@gmail.com and webmail id is def@cse.iitk.ac.in
Then to forward the mails to Gmail without keeping copy on webmail, write to file:
abc@gmail.com

To keep copy on webmail as well,
abc@gmail.com, def

6. Access Main CC account from your room
$ssh username@ccpc<number>.cc.iitk.ac.in
Eg.      $ssh nehchal@ccpc143.cc.iitk.ac.in
You can also use some other number instead of 143.

Several software are already installed like MATLAB, mathematics, etc. So, you can use these software remotely without installing on your own computer.

7. Access CSE account from your room
$ssh username@csews<number>.cse.iitk.ac.in
Eg.   $ssh nehchal@csews143.cse.iitk.ac.in
You can of course use some other number instead of 143.

8. Proxy issues in Ubuntu
---system-wide proxy---
You can set system-wide proxy using network settings (Ubuntu 12.10) only if proxy doesn't require authentication. At IITK proxy server requires authentication. So, directly edit the file /etc/environment and add/edit following lines.


http_proxy="http://yourUsername:yourPassword@bsnlproxy.iitk.ac.in:3128/"
https_proxy="https://yourUsername:yourPassword@bsnlproxy.iitk.ac.in:3128/"
ftp_proxy="ftp://yourUsername:yourPassword@bsnlproxy.iitk.ac.in:3128/"


---For apt-get or aptitude---
Edit /etc/apt/apt.conf file (Make new file by this name if already doesn't exist). And add(edit) following lines.

Acquire::http::proxy "http://userneme:password@proxyserver:port/";
Acquire::ftp::proxy "ftp://userneme:password@proxyserver:port/";
Acquire::https::proxy "https://userneme:password@proxyserver:port/";

---For SVN---
Edit ~/.subversion/servers file. Find [global] in the file. Uncomment (remove hash from beginning) and edit the following attributes accordingly: http-proxy-host, http-proxy-port, http-username, http-password


---For wget command---
Edit the file /etc/wgetrc Set the proxy in the file. Format: username:password@proxy:port

9. Access IITK network from outside campusUse ssl-vpn. Detailed instructions at: <http://www.iitk.ac.in/cc/vpn_update/sslvpn.htm>. You will be able access all the internal websites, like oars.cc.iitk.ac.in, web.cse.iitk.ac.in, update your homepage, etc. To access outside internet (eg. google.com) while logged into IITK network, use mozilla firefox. Use proxy settings that you use inside campus. With Google chrome, you can access only internal sites and not outside internet.

10. Your account doesn’t opens up in CSE Lab.
There is a high chance that you have used up your 1GB (as of Feb, 2013) allocated space. You need to clean up some junk. If you can’t figure out any large file in your account, probably space is being consumed by temporary files (chrome, mozilla cache, etc).

11. Update cse homepageYour homepage is at www.cse.iitk.ac.in/users/username . To update ssh to turing.

Please let me know in case of any errors or something you would like to add to this blog.
I will update soon, as I get to know more. :)