Posts

Showing posts from August, 2012

X Server and Display Problem With sudo

Image
Some time it happens that when you run any graphical window with sudo command like $sudo gedit /etc/apt/apt.conf you may get error message like: ** (gedit:8392): WARNING **: Command line `dbus-launch --autolaunch=720d86dbc34b24ba21ce446600000009 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Cannot open display: Run 'gedit --help' to see a full list of available command line options. or any error message involving launching x-server. To get rid of this kind of error message first open terminal and then run the following command $sudo visudo Then add the following line at the end of the file. Defaults env_keep="DISPLAY XAUTHORITY" Now if you are adding more than one variable in this form then use "+=" instead "=" (without quote). Hope this will solve the problem. Cheeres APaul

Insync, a command line client for google drive

Image
Recently Google has changed Google docs to Google Drive. Google drive is a cloud service which can be used to synchronize your files in local computer to different computer. Also you can create, edit and view documents, presentation and spread sheets. Google made software for windows and mac but not for linux. Don't Worry there is software available for linux which can be used for synchronize Google drives files, insync . Though this is a command line interfaced (cli) kind of software, but it works great. To install the software download the .deb file from here . Then just double click it and install. Now for first time running just open terminal and run command insync and then it will open up some window asking for Google account and password. Enter user name and password allow insync. You are done, all your cloud files and folder will be available locally. Now you can put it in auto start also. Go to system setting > Start up application > add and then in

How to Get Rid of Internal System Error Popups

Image
Apport is a debugging tool that automatically generates crash reports and submit it. In Ubuntu 12.04 we have seen that we always get popups showing error message "Sorry, Ubuntu 12.04 has experienced an internal error." as shown in above picture. This is because Apport is enabled by default in the newest version of Ubuntu (Ubuntu 12.04). To get rid of this message we have to disable the Apport, especially since most of the time there is no visible error/crashes. To disable this message we have to edit /etc/default/apport file using this code $sudo gedit /etc/default/apport and the change "enabled" from "1" to "0" , and them save the file. After completion the above steps Apport won't start after next reboots. But may be you also want to stop Apport in the current session only, you run the following command $sudo service apport stop You can also re-enable Apport by editing the same file again and changing "enabled" from

Firefox address bar search

Image
Firefox has a very good option to search anything directly from the address bar. We can change the search engine. To change the search engine go to address bar and tipe about:config > enter Then Firefox will show a warning massage like this click on "I'll be careful, I promise" button. Then you will get screen like this. Go to search bar and search for "kyeword.URL" without quote. Then select the option and right click on it and select modify and then any of the url given bellow according to your choice. Default Google Search (In case you want to restore originals) http://www.google.co.in/search?btnG=Google+Search&q= Google Search with I’m Feeling Lucky (what the hell is difference?) http://www.google.co.in/search?btnI=I%27m+Feeling+Lucky&q= Yahoo search http://search.yahoo.com/search?p= Microsoft’s Live.com http://search.live.com/results.aspx?q= Wikipedia http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&sea

Setting http_proxy value to local bashrc file

When I connect my laptop to internet from my institute I had to connect it through proxy. But when I connect it from my room I have to connect it directly. So I have to change my proxy frequently. But I have observed that changing proxy through network manager does not actually change the value of "http_proxy" variable. Neither the export command actually work. So we have changed the value by changing the ~/.bashrc file and adding the proxy value. Use the following command to edit file. $gedit ~/.bashrc Then add the following line http_proxy="http://userid:pass_word@proxy:port/" https_porxy="https://userid:pass_word@proxy:port/" ftp_proxy="ftp://userid:pass_word@proxy:port/" You can also set the domain which should not use proxy by no_proxy environment variable. This will be coma separated string containing domain name. Like no_proxy="first.domain,secon.domain" you can also edit some other file like /etc/environment /etc/bash