Display line number in eclipse

Right click the left side of the editor or use the shortcut Ctrl+F10  to show the menu, and then select the item as shown in the figure.

Selection_004

Advertisements

Ubuntu Software Center cannot proceed when applying changes

If we had the this issue, we can try the following. 
sudo lsof /var/lib/dpkg/lock

From the above command we can know the PID of the process causing dpkg to lock. Then we do
sudo kill -TERM <PID>

Next, we do
sudo dpkg –configure -a

and waited for the result. After that we can do
sudo apt-get update && sudo apt-get upgrade

(Updated for 18.04)To show the same display session in Ubuntu by Chrome Remote Desktop

The default configuration of Chrome Remote Desktop in Ubuntu opens a new session instead the same desktop currently running.

To fix this, please follow these steps:

Stop it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop –stop

Back it up:
cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig

Edit: /opt/google/chrome-remote-desktop/chrome-remote-desktop

Change this to the size I wanted.
DEFAULT_SIZES = “1920×1080”

Set the X display number to the current display number (obtain it with echo $DISPLAY from any terminal).

FIRST_X_DISPLAY_NUMBER = 0

Comment out sections that look for additional displays:

#while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
Reuse the existing X session instead of launching a new one. Alter launch_session() by commenting out launch_x_server() and launch_x_session() and instead setting the display environment variable, so that the function definition ultimately looks like the following:

def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
#self._launch_x_server(x_args)
#self._launch_x_session()
display = self.get_unused_display_number()
self.child_env[“DISPLAY”] = “:%d” % display

Start it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop –start

DONE. Now it attaches to Unity’s existing X Server on display :0.

Credit to the discussion of these post  https://productforums.google.com/forum/#!topic/chrome/LJgIh-IJ9Lk

https://superuser.com/questions/778028/configuring-chrome-remote-desktop-with-ubuntu-gnome-14-04

Run a 32-bit binary on a 64-bit Ubuntu

If the output of file file-name shows,

file-name: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.x.x, not stripped

To run 32bit executable file in a 64 bit multi-arch Ubuntu system, we have to add i386 architecture and also we have to install 

libc6:i386,

libncurses5:i386,

libstdc++6:i386

these three library packages.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo ./file-name

How to create a MATLAB launcher/shortcut

1. Get an icon:

sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png

2. Create the launcher file /usr/share/applications/matlab.desktop

[Desktop Entry]
Type=Application
Icon=/usr/share/icons/matlab.png
Name=MATLAB R2014a
Comment=Start MATLAB - The Language of Technical Computing
#Uncomment the following line and comment the line after to
#force matlab to use the 32 bits architecture
#Exec=matlab -arch=glnx86 -desktop
#please replace the following line with the path where matlab installed Exec=/media/Program/MATLAB_linux/R2014a/bin/matlab -desktop Categories=Development;

Compile Bundler in Ubuntu 12.04

1. Download the bundler-v0.4-source and install all  the required dependencies.

2. After make, we can see such error,

BundlerApp.h:620:32: error: cannot call constructor ‘SkeletalApp::BundlerApp’

3. The solution is to change “BundlerApp::BundlerApp();” to “BundlerApp();” in line 620 of the file of BundlerApp.h

Then we can make it successfully.