Adjust menu width in Kali

Every once in a while, you have a new and fresh install of Kali. The one thing what’s bothering me, is the small Gnome menu. Because it’s so small, you can’t always tell what you’re starting up.

To make it all a little bit more clear, edit the following file:

/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js

Search for:

this.categoriesBox.box.width = 300;

and replace it with:

this.mainBox.box.width = 950;
this.categoriesBox.box.width = 500;

Log off and logon again, the menu will be a lot wider. You can tweak the values to your own needs.

Source:

https://unix.stackexchange.com/questions/387843/how-can-i-resize-the-applications-menu-item-in-gnome

How to Reset a HP 1810-24G to Factory Defaults

The steps to reset an HP 1810-24G smart managed gigabit switch are as follows:

1. Using a paperclip, simultaneously press the Reset and Clear buttons.

2. Release the reset button, while continuing to press the Clear button.

3. When all three mode LEDs (Act, FDx, and Spd) begin to blink, release the Clear button.

Once the switch completes the self-test, the switch will be reset to factory defaults. The default IP address will be 192.168.2.10 and there will be no password.

 

Source:

http://coderzen.com/2013/06/04/how-to-reset-a-hp-1810-24g-to-factory-defaults/

Change active java version in Kali

Running applications on Kali can sometimes be rather difficult in combination with Java.  To control the active version of Java, try the following:

First, check the current version of Java:

# java -version

openjdk version “1.8.0_162”
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

With the next command, you can change the Java version:

# update-alternatives –config java

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
0 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 auto mode
* 1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
2 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 manual mode

Press <enter> to keep the current choice[*], or type selection number:

Enter the number of the desired Java version and it will be active, for example zero. The Java version will be openjdk9:

update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode

# java -version

openjdk version “9.0.4”
OpenJDK Runtime Environment (build 9.0.4+12-Debian-4)
OpenJDK 64-Bit Server VM (build 9.0.4+12-Debian-4, mixed mode)

 

Sources:

https://www.mkyong.com/linux/debian-change-default-java-version/

https://forums.kali.org/showthread.php?41-Installing-Java-on-Kali-Linux

 

 

Upgrading the firmware on a HP ProCurve 2824

First of all, check what firmware and boot ROM your switch is using using the show flash command on the CLI:

sw3# show flash
Image           Size(Bytes)   Date   Version
-----           ----------  -------- -------
Primary Image   : 3003952   12/21/05 I.08.87 
Secondary Image : 3003952   12/21/05 I.08.87 
Boot Rom Version: I.08.07
Current Boot    : Primary

All firmware versions I.08.07 onwards need the I.08.07 Boot ROM, and you’ll need to flash up to this version first. Thankfully HP provide that specific version on the website to download. Follow the exact same steps as below for I.08.07, then repeat for whatever version you’re upgrading to.

To get the firmware to the switch we use a TFTP server, a little out of scope for this article but you can find a lot of free and open source servers for this, i’m using my local pfSense gateway’s TFTP server for this, i’ve uploaded the I_10_107.swifirmware file to the TFTP and from the switch’s CLI I run the following:

sw3# copy tftp flash 10.1.1.1 I_10_107.swi secondary
The Secondary OS Image will be deleted, continue [y/n]?  y
03261K 

After a few seconds you’ll be back at the prompt. To check everything has worked as expected check the show flash command:

sw3# show flash
Image           Size(Bytes)   Date   Version
-----           ----------  -------- -------
Primary Image   : 3003952   12/21/05 I.08.87 
Secondary Image : 3428242   08/24/15 I.10.107
Boot Rom Version: I.08.07
Current Boot    : Primary

All you need to do is reboot the switch with the new firmware, check everything works, then flash over the image to the primary flash storage:

sw3# boot system flash secondary
Device will be rebooted, do you want to continue [y/n]?  

Once the system is up and working, use show flash again to check its booted to the secondary area.

sw3# show flash
Image           Size(Bytes)   Date   Version
-----           ----------  -------- -------
Primary Image   : 3003952   12/21/05 I.08.87 
Secondary Image : 3428242   08/24/15 I.10.107
Boot Rom Version: I.08.07
Current Boot    : Secondary

And if everything is working as expected, flash the firmware over to the primary image exactly the same way as before

sw3# copy tftp flash 10.1.1.1 I_10_107.swi primary
The Primary OS Image will be deleted, continue [y/n]?  y
03261K 

For the final (optional) step, switch back to the primary image:

sw3# boot system flash primary
Device will be rebooted, do you want to continue [y/n]?  

And you’re all done.

 

You may find the latest firmware of HP switches on this site:

https://h10145.www1.hpe.com/downloads/ProductsList.aspx?lang=&cc=&prodSeriesId

 

Source:

http://tensixtyone.com/2016/02/upgrading-a-hp-procurve-2824/