Monday, November 11, 2013

Fix Eclipse menu bar problem in Ubuntu 13.10
















After installing latest eclipse in Ubuntu 13.10 most probably you might experience a problem with the eclipse global menu bar.
Menu doesn't show it's contents. Editing eclipse.desktop file will fix this. But it won't give the global menu.


Go to the /usr/share/applications directory which contains the eclipse.desktop



sudo cd /user/share/applicatoins

sudo gedit eclipse.desktop

It would contain something like this.

################################## [Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false

Exec=env UBUNTU_MENUPROXY=0 /opt/eclipse/eclipse


Icon=/opt/eclipse/icon.xpm

Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
##################################

This row will do the trick. If your eclipse.desktop doesn't contain it add it and save.

Exec=env UBUNTU_MENUPROXY=0 /opt/eclipse/eclipse

/opt/eclipse/eclipse should be replaced with what ever your Exec(Exec=/opt/eclipse/eclipse in my eclipse.desktop ) is equal to.




Then you are done :)



Sunday, November 3, 2013

Must have Software Ubuntu 13.10







 

   SOFTWARE

 

Install from software center

  1. 1.  Gnome-do

    Gnome-do allows you to quickly search for many items present on your desktop or the web and perform useful actions on those items.

  2. 2. Guak terminal

    Guake is a drop-down terminal for Ubuntu desktop environment. Like similar terminals. it is
     invoked with a single keystroke, and hidden by pressing the same keystroke again.
  3. 3. VLC

    Media player
  4. 4. Compizconfig Settings Manager

    The OpenComposting Project brings 3D desktop visual effects that improve usability of the
     X Window System and provide increased productivity
  5. 5. Advanced Settings Tweak

    Allows the adjustment of several advanced GNOME options.
  6. 6. Synaptic Package Manager

    Synaptic is a graphical package management tool based on GTK+ and APT. Synaptic
     enables you to install, upgrade and remove software packages in a user friendly way.
  7. 7. WineHQ  

    Wine is an open source, free and easy-to-use program that enables Linux users to run some Windows based applications on Unix-like operating systems. Wine is a compatibility layer
     for installing almost all versions of Windows programs.

  8. 8. Restricted Extras
     

    Ubuntu restricted extras is a software package for the computer operating system Ubuntu
     that allows the user to install essential software which is not already included due to legal
     or copyright reasons.

    9. IntellijIDEA

    IDE

  

 Other Software

 

  1.   1. Ubuntu Tweak

    Can be used to tweak ubuntu 13.10.Eg. Add workspaces. Change login screen. Screen conner choices. 
    sudo add-apt-repository ppa:tualatrix/ppa
    sudo apt-get update
    sudo apt-get install ubuntu-tweak
  2. 2. TLP

    TLP is a popular battery tool. Since jupiter was interrepted and the latest version does not work well on Ubuntu 13.10 everybody begin to use TLP. TLP tweaks your system for better power usage/bettery life. You can just install TLP and forget about it, because it does his job by itself.

    sudo add-apt-repository ppa:linrunner/tlp
    sudo apt-get update
    sapt-get install tlp tlp-rdw tp-smapi-dkms smartmontools ethtool
    sudo tlp start
  3. 3. Sticky notes

    Indicator Stickynotes is meant for Ubuntu's Unity interface

    sudo add-apt-repository ppa:umang/indicator-stickynotes
    sudo apt-get update
    sudo apt-get install indicator-stickynotes
  4. 4. Cairo DOC


    Doc for Ubuntu 13.10

      


    5. Java

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer

    6. Chrome

    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

    sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

    sudo apt-get update
    sudo apt-get install google-chrome-stable


    7. qBittorrent

    Torrent Client
    sudo add-apt-repository ppa:hydr0g3n/qbittorrent-stable
    sudo apt-get update
    sudo apt-get install qbittorrent


   


Installing graphics drivers Ubuntu 13.10(Hybrid Graphics).


If you have hybrid graphics then you don’t have to  turn off the discrete graphic card manually  any more. Ubuntu 13.10 supports hybrid graphics.


AMD Hybrid Graphics : 

I've tested this and it works fine. According to the Ubuntu wiki page there aren't any known issues yet. 
To get proper AMD Hybrid graphics support in Ubuntu 13.10 all you have to do is install the latest fglrx driver and fglrx-pxpress from the repositories.

sudo apt-get install fglrx fglrx-pxpress

with AMD graphics you can switch between the two graphic cards by AMD catalyst control center like you do in Windows. But it requires a system reboot for changes to take effect. Other than that everything is fine. No ever heating.
Here more about this.(if you have a NVIDIA system ).



Saturday, October 12, 2013

Auto Mount Partitions In Ubuntu 13.10 (12.**)




Step1: Install ntfs-3g

sudo apt-get install ntfs-3g

Step2:

Get the “sda” number for the partition which needs to be auto mounted. To find this use the two commands


sudo fdisk -l

sudo blkid







STEP 3:


Then, create the mount point for that device:
sudo mkdir /media/musicdrive

STEP 4

Open /etc/fstab file for editing:
gksudo gedit /etc/fstab


and add the line of code below to the last part of the file:
/dev/sda2 /media/musicdrive ntfs-3g defaults 0 0                     


for windows partition instead of /dev/sda.. UUID number is used.


Copy of fstab


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda9 during installation
UUID=01a9cdf0-e55c-4669-9220-ecd9bd5d38cb /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda7 during installation
UUID=0758fa40-d29b-4975-940f-4942ea0adc8c none            swap    sw              0       0
/dev/sda3 /media/Academic ntfs-3g defaults 0 0
/dev/sda5 /media/Media ntfs-3g defaults 0 0
UUID=84C23259C2324FA2 /media/Windows          ntfs-3g defaults 0 0   

Install LAMP




sudo apt-get install tasksel
sudo  tasksel


And select LAMP Server:
During the installation  you  will be  asked  to insert the  mysql root  password


Now check if php is working :


sudo vi /var/www/info.php
and add
<?php
phpinfo();
?>
save and exit
restart apache2 ,
sudo /etc/init.d/apache2 restart


Now open browser and type :
http://ip/info.php or http://localhost/info.php
Php is installed.




To full manage  your  lamp Server database, install  phpmyadmin
sudo  apt-get  install  phpmyadmin


To login  to phpmyadmin, open browser and type :
http://ip/phpmyadmin   or http://localhost/phpmyadmin

Install Joomla in Ubuntu



Download joomla 3.0 from joomla official website. then create directory
joomla  in the default apache folder /var/www


sudo mkdir /var/www/joomla


Extract joomla package has been downloaded in to directory /var/www/joomla



sudo unzip -q Joomla_3.0.1-Stable-Full_Package.zip -d /var/www/joomla 




Change access /var/www/joomla to apache user and group (www-data) and set permission /var/www/joomla 775


sudo chown -R www-data.www-data /var/www/joomla/
sudo chmod -R 777 /var/www/joomla/

Install Sinhala In Ubuntu


For Ubuntu 13.10


Download m17 library from here.

Extract the file


tar zxf
m17n-db-1.6.4.tar.gz
Now change directory

$ ls
$ cd path-to-software/

Generally you need to type 3 commands as follows for building and compiling the software:

$ ./configure
$ make
$ sudo make install

 Choose Text Entry from 1
Select sinhala from the list when you get from 2

For other Versions

http://www.m17n.org/m17n-lib-download/m17n-contrib-1.1.13.tar.gz



Download the latest m17n library.
then install it. See installing tar.gz in linux commands
  • apt-get install ttf-sinhala-lklug ibus im-switch ibus-m17n m17n-db m17n-contrib
  • From your user account (i.e. not root) run:
  • rm -f ~/.xinput.d/* ; im-switch -z all_ALL -s ibus
login and logout

How to create a jar in intellij idea project




project structure ---> Artifacts( project settings ) → + jar ---> from module with dependencies → add available elements as you prefer ---> apply okay. next from the file menu Build Build artifact

COD Server Setup










\rcon login 12345
\rcon g_gametype sd
\rcon g_gametype war
\rcon map mp_crash
\rcon map mp_strike


\rcon class_sniper_limit 7

\rcon class_specops_limit 7`

\rcon scr_game_allowkillcam 1

\rcon set g_deadchat 1

\rcon g_allowvote 1

\rcon scr_allowvote 1
`

/rcon map_restart
/rcon status
/rcon clientkick (number)
/rcon promod_mode match_mr10_pb - Promod match with max rounds 10.

rcon class_sniper_limit #
rcon class_specops_limit #
/rcon login (rcon password) - Give you admin rights.`
/rcon map_restart - Restart the map.
/rcon map mp_crash - Loads the map crash, if you want an other map just type your mapname.
/rcon status - Shows the PB guids, client numbers.
/rcon clientkick (number) - Kicks the player with the linked clientnumber.
/rcon set class_sniper_limit # writes it to cfg
/g_gametpye //use one of the variables in the line below.. example: /g_gametype war would change it to teamdeathmatch.(DM = Deathmatch , WAR = Teamdeathmatch , KOTH = Headquaters, SD = Search & Destroy, DOM = Domination, SAB = Sabotage)
ENABLE KILL CAM: /rcon scr_game_allowkillcam 1
BANNING PLAYERS: /rcon banclient (player id)
\rcon set g_deadChat 1


/rcon fast_restart - Restart the scores.
/rcon map mp_crash - Loads the map crash, if you want an other map just type your mapname.
/rcon status - Shows the PB guids, client numbers.
/rcon clientkick (number) - Kicks the player with the linked clientnumber.
/rcon kickall - Kicks everyone on the server.
Rcon commands promod 2.04
/rcon promod_mode 2v2_mr10 - Promod 2v2 with max rounds 10.
/rcon promod_mode match_mr12 - Promod match with max rounds 12.
Rcon commands promod 2.11
/rcon ` - Promod 2v2 with max rounds 10.
/rcon promod_mode match_mr12_pb - Promod match with max rounds 12.
/rcon promod_mode comp_public - Promod competitive public.

mp_backlot
mp_bloc
mp_bog
mp_cargoship
mp_citystreets
mp_convoy
mp_countdown
mp_crash
mp_crossfire
mp_farm
mp_overgrown
map mp_pipeline
mp_shipment
mp_showdown
mp_strike
mp_vacant

/rcon_password //this is your remote control password
/rcon login //You can login in your Remote Control with this command.(can only use with a dedicated server and when you have set a rcon password!)
/rcon say //say something via Console. (this can only be used when you are logged in with /rcon login!)
/rcon clientkick //with this command you can kick players with their ID(first type /rcon status so that you see what client is who!)
/rcon status //shows the player list with ID's, IP's, guids, maxrate etc.
/rcon banclient //with this command you can Ban players with their ID..(their guid will be banned and placed in a txt file in your call of duty 4/main folder! -> txt file is named ban.txt)
/rcon playerkick or /rcon kickplayer //with this you can kick a player by his Name!

/rcon killserver //kills the server. Also known as shutting down the server.


/g_gametpye //use one of the variables in the line below.. example: /g_gametype war would change it to teamdeathmatch.(DM = Deathmatch , WAR = Teamdeathmatch , KOTH = Headquaters, SD = Search & Destroy, DOM = Domination, SAB = Sabotage)

/scr_dm_timelimit //sets the Deathmatch time untill the game ends.
/scr_dm_scorelimit //sets the Deathmatch score needed to win the game.
/scr_dm_roundlimit //sets the maximum Deathmatch rounds played for the gametype each level.

/scr_war_timelimit //sets the Teamdeathmatch time untill the game ends.
/scr_war_scorelimit //sets the Teamdeathmatch score needed to win the game.
/scr_war_roundlimit //sets the maximum Teamdeathmatch rounds played for the gametype each level.

/scr_koth_timelimit //sets the Headquaters time untill the game ends.
/scr_koth_scorelimit //sets the Headquaters score needed to win the game.
/scr_koth_roundlimit //sets the maximum headquaters rounds played for the gametype each level.

/scr_sd_timelimit //sets the Search & Destroy time untill the game ends.
/scr_sd_scorelimit //sets the Search & Destroy score needed to win the game.
/scr_sd_roundlimit //sets the maximum search and Destroy rounds played for the gametype each level.

/scr_dom_timelimit //sets the domination time untill the game ends.
/scr_dom_scorelimit //sets the domination score needed to win the game.
/scr_dom_roundlimit //sets the maximum domination rounds played for the gametype each level.

/scr_sab_timelimit //sets the sabotage time untill the game ends.
/scr_sab_scorelimit //sets the sabotage score needed to win the game.
/scr_sab_roundlimit //sets the maximum sabotage rounds played for the gametype each level.

/map_restart //restarts the map
/fast_restart //restarts the map quickly, without changing the map again. NOTE:It will stay the same map!

/sv_hostname //server name
/sv_maxclients //maximum clients allowed to join your server (choose a number between 1 and 64)

/sv_maxping //maximum connection ping allowed. (choose a number between 1 and 999)
//NOTE: Most clients have 100 ping or higher so don't set it below 100 if you want players in your server!!
/sv_minping //minimum connection ping needed to join your server(you don't need this one normally!)

/sv_maprotation //this is your server's maprotation.
//example: /sv_maprotation g_gametype war map mp_backlot g_gametype dm map mp_crossfire g_gametype war map mp_overgrown g_gametype war map mp_crash

You login by typing in the following:

/rcon login (password) ~ Replace password with the rcon pass without brackets.


Kick/ban/msg players

/status ~ Displays information for all connected players in the server.

/tell (player id) ~ Sends a message to a specific player in the server via console (the message will appear next to the name ‘console’).

/clientkick (player id) ~ Kicks a specific player from the server.

/kick (player name) ~ Kicks a player from the server, but instead of using the id to identify the player you need to type the players name (colors included).

/banclient (player id) ~ Bans specific player from the server.

/banuser (player name) ~ Bans player by name not id.

/tempbanClient (player id) ~ Temporarily bans a player.

/tempbanUser (player name) ~ Same as above just by name not id.

/unbanuser (player name) ~ Unbans a user by name *note* the easiest way to unban a player is to delete the players name from ban.txt which can be found in the server files located in the server’s FTP.


Changing the map

/map (map name) ~ Type in the map name you want without the brackets. Some of the map names used are different to the console command names. To make things easier here is a list of map names:

mp_backlot
mp_bloc
mp_bog
mp_cargoship (wetworks)
mp_citystreets (district)
mp_convoy (ambush)
mp_countdown
mp_crash
mp_crossfire
mp_farm
mp_overgrown
mp_pipeline
mp_shipment

/map_rotate ~ Loads the next map in rotation.

/map_restart ~ Restarts the current map.

/fast_restart ~ Restarts the map without loading.


Restarting server

/killserver ~ Shuts the server down.

/Quit ~ Restarts the server.

The above is just a list of the most common commands you will need to know as a server admin. There are however alot more commands.


Server Mode

set scr_hardcore ~ Player’s HUD is limited, bullet damage is higher, friendly fire is on.

set scr_oldschool ~ No classes. Weapons are pickups, health is in a gauge form and can be increased with medipacks also jumps are higher.

set scr_oldschool_mw ~ Same as above, just for modded servers?


Spectator permissions

set scr_game_spectatetype ~ Toggle spectating type.

set g_deadChat ~ Toggle dead chat.


*Edit* Remember to type /rcon before each command and not the command by itself.
f.e. /rcon map_restart

a