Skip to main content

Posts

Showing posts with the label Linux

Kali Linux (2023.1) randomly freezes on Dell Latitude 7490

Kali Linux(2023.1) randomly hard freezes on Dell Latitude 7490. This can happen immediately or after few minutes. This is  likely caused by a bug in integrated Intel GPU (i915) driver, see the following links for more information: Bug 102586 - System freeze with Kernels > 4.11.x (freeze on 4.12.x and 4.13.x)   Fix for Intel i915 GPU Freeze on Recent Linux Kernels Linux 5.x random kernel panic workaround Workaround: Touch /etc/modprobe.d/i915.conf Add this line options i915 enable_psr=0 Reboot //end

Reverse SSH shell to WSL2

Reverse SSH shell to WSL2 WLS2 is configured by default in a NAT network.That means we can't generally reach it from the outside.  To connect to it externally, let us configure WSL 2 for reverse shell Prerequisite Another SSH server that acts as gateway. This server should be accessible from the outside. For this exercise we will be using 192.168.2.30 as the gateway IP. Step 1: Enable SSH on WSL2 $: sudo ssh-keygen -A Then start SSH: $: sudo service ssh start Step 2: Verify connection from WSL2 to the gateway SSH server $: ssh -R 2222:localhost:22 u1@192.168.2.30 Below is an example connection to Kali SSH server From Kali gateway server, verify that we can connect to port 2222, like: $: ssh u2@localhost -p 2222 By default WSL2 does not allow SSH connection using password, you will get an error like below. u2@localhost: Permission denied (publickey). To fix this, change /etc/ssh/sshd_config on WSL2, ensure that:  PasswordAuthentication is set to yes ChallengeRespo

Fix corrupted console font on Kali Linux 2021.1

Fix corrupted console font on Kali Linux 2021.1 I have installed Kali Linux on a VM with 512 MB memory and 2 vCPU using network installer . The installation was uneventful but my first login shows the following: It is not pretty, so to fix it do: $: sudo dpkg-reconfigure console-setup Then select: UTF-8 Guess optimal character set Terminus 8x16 Select different font type as appropriate. It should now look much better Keywords: Kali, Linux, Console, garbled, corrupted, text

Fatal: Cannot find FastHTMLParser used by Clipbrd of package LCLBase

I have tried to install Lazarus 2.0.0 (FPC 3.0.4) on MX Linux 19.1 but got the following error message when compiling the default project created by Lazarus. Fatal: Cannot find FastHTMLParser used by Clipbrd of package LCLBase. One way to fix this is to install the fpc package, like: $: sudo apt install fpc Keywords: Free Pascal, Lazarus

mrxvt settings that I like

mrxvt is a tabbed VT102 terminal emulator for X Window System. This is like gnome-terminal(GNOME) or konsole(KDE). The good thing with mrxvt is that it is light-weight so this is good for old machine when combined with lighter window managers like fluxbox when running in graphical mode. Below is my .mrxvtrc configuration suites my taste: Or download this configuration. ~yth~

How to get GNOME version from the command line

Get Gnome version from terminal $: gnome-shell --version Alternative ways to get version, works on older versions of Gnome. $: gnome-about --version This will show something like: GNOME gnome-about 2.32.0 This can also be done using the command below. $: gnome-session --version Above command does not work on Fedora 22 Workstation. Tags: GNOME version command line cli

VirtualBox Shared Clipboard not working on Ubuntu Budgie 18.04 VM guest

VirtualBox Guest Additions are installed and Shared Clipboard (Bidirectional) option selected. Even tried to reboot still not working. Any hints how to fix is appreciated. Note that Ubuntu 18.04 (Gnome) and Ubuntu 18.10 LXQt is working the same Windows 10 host. [6/18/2018] Most be getting old. I assumed VirtualBox guest additions was installed as the VM window can be resized. Anyway, installed guest additions and copy/paste worked like a charm. Also reported in Discource https://discourse.ubuntubudgie.org/t/virtualbox-shared-clipboard-not-working-on-budgie-18-04/646

View library dependencies in Linux

I was trying to get Squeak VM 5.0 running on Ubuntu 16.04 beta 1 and got the following: /home/timus/Downloads/Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/bin/squeak could not find display driver vm-display-X11; either:   - check that /home/timus/Downloads/Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/lib/squeak/5.0-3397//vm-display-X11.so exists, or   - use the '-plugins <path>' option to tell me where it is, or   - remove DISPLAY from your environment. ./squeak.sh: line 1:  8289 Aborted                 (core dumped) ./Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/squeak.sh To view library dependencies in Linux, do: $: ldd Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/lib/squeak/5.0-3397/vm-display-X11 This should display library dependencies of vm-display-X11.

The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?

After fixing items below related to MonoDevelop on Linux Mint 7.3, another error shows up: http://8thstring.blogspot.com/2016/01/monodevelop-does-not-start-on-linux.html http://8thstring.blogspot.com/2016/01/could-not-obtain-c-compiler-c-compiler.html The type or namespace name `Gtk' could not be found. Are you missing an assembly reference? To fix install gtk-sharp-2.0 libraries, like: $: sudo apt-get install gtk-sharp2

Could not obtain a C# compiler. C# compiler not found for Mono / .Net 4.0

Tried to build a monodevelop project in Linux Mint 17.3 but got the following error message Could not obtain a C# compiler. C# compiler not found for Mono / .Net 4.0 To fix this do: $: sudo apt-get install mono-gmcs Reference(s): http://stackoverflow.com/questions/8022653/c-sharp-compiler-not-found-when-building-a-package-monodevelop-linux

Updating packages on OpenSUSE via console

Zypper is the functionally equivalent to apt-get or aptitude for OpenSUSE. Man page should give you more information how to use it, you can also visit  http://en.opensuse.org/SDB:Zypper_usage_1  for additional information. For example, to update your current system with the latest packages open konsole and do: $: su #: zypper refresh #: zypper update To install plain old rpm do: $: su #: zypper install google-chrome-stable_current_i386.rpm This should install the downloaded stable version of Google Chrome. Of course you can substitute suitable rpm as necessary. To search for a package like libpng , do: $: zypper search libpng ~ts

The following add-ins could not be started MonoDevelop.GnomePlatform

Installing MonoDevelop in OpenSUSE 12.2 from its repository was very easy. When running it for the first time though I got the message: The following add-ins could not be started: The root of the trace shows MonoDevelop.GnomePlatform,2.8 A quick search shows that MonoDevelop depends on libgnomeui . This should have been part of dependencies when installing the application but well.... Below is the screen shot of the error message. References: http://software.1713.n2.nabble.com/MonoDevelop-and-openSUSE-12-1-td7462957.html [2013/04/09] - Same issue observed in OpenSUSE 12.3 and also the same fix. [2014/11/02] - Same issue observed in OpenSUSE 13.3, mondevelop 3.0.6 and the same fix.

Mounting Samba share in Windows 7 yields System error 58 has occured

Got a Windows 7 SP1 32-bit Pro machine that have seen various large applications already. So I am not sure if the security policy of the machine is the default. When trying to mount a Samba share got the error message below. System error 58 has occurred. The specified server cannot perform the requested operation. This was done via net use \\<ip>\share . Mounting the share via Windows Explorer yields nothing, just a long wait for nothing. The fix for my case was to change Security Settings | Local Policies | Security Options | Microsoft network client: Digitally sign communications (always) to disabled . You have to reboot the machine for the changes to take effect. References: http://social.technet.microsoft.com/Forums/windows/en-US/5dd9991b-78e7-4fa3-b17c-366e4ae0092f/cant-connect-to-samba-from-windows-7-vista-xp-ok-many-popular-solutions-tried-without-success?forum=w7itpronetworking

Mounting a Windows share using smbfs with read-write access

To mount a Windows share using smbfs do the following: #: mount -t cifs -o username=your_user_name,uid=1000 //machine_name/share_name /mnt/point Or the old style: #: mount -t smbfs -o username=your_user_name,uid=1000 //machine_name/share_name /mnt/point Note here that uid=1000 is not a magic number but rather your linux userid. You can get this value from passwd file normally located in /etc/passwd. The user with uid=1000 should be able to manipulate files pointed to by //machine_name/share. And when connecting to a share that is mananged by Active Directory, need to escape the backslash for it to work, e.g.: #: mount -t smbfs -o username=domain-name\\username,uid=1000 //machine_name/share_name /mnt/point Notes: Need to install smbfs for this to work, like (Debian/Ubuntu): #: sudo apt-get install cifs-utils ~ts~

Installing Google Chrome in Ubuntu 12.10 from the command line

Of course you can install Chromium, but hey I wanna use Google Chrome. To install from the command line, do: $: cd ~/Downloads $: wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb $: sudo dpkg -i ~/Downloads/google-chrome-stable_current_i386.deb $: sudo apt-get -f install The last line is needed to install the required dependencies and complete Chrome installation. To install 64bit version of Chrome, you have to change download path to https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb , like: $: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb Note(s): * This applies to Debian 7 Wheezy Reference(s): http://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line

How to detect if reboot is required after running apt upgrade

So you have a Debian based installation (i.e., Ubuntu, Linux Mint and of course Debian itself), how would you know if you need to reboot after running apt-get upgrade ? Well, this should be as easy as checking for the presence of the file /var/run/reboot-required Tags: apt, apt-get, upgrade, reboot, required References: http://askubuntu.com/questions/28530/how-can-i-tell-what-package-requires-a-reboot-of-my-system http://serverfault.com/questions/92932/how-does-ubuntu-keep-track-of-the-system-restart-required-flag-in-motd

Get CPU information in Ubuntu from command line

Method 1: Using lshw $: sudo lswh -class cpu This will show something like: *-cpu description: CPU product: Intel(R) Pentium(R) M processor 2.13GHz vendor: Intel Corp. physical id: 400 bus info: cpu@0 version: 6.13.8 slot: Microprocessor size: 2133MHz capacity: 2133MHz width: 32 bits clock: 133MHz capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2 cpufreq Method 2. Using special /proc, like: $: cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 13 model name : Intel(R) Pentium(R) M processor 2.13GHz stepping : 8 microcode : 0x20 cpu MHz : 800.000 cache size : 2048 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes c

Installing Ubunut 12.10 via netinstall on Eee PC 900

I have a pretty old Eee PC 900 that have been running Arch Linux for awhile. I did an update lately and it borked it beyond my knowledge how to repair. So, I was thinking why not use Ubuntu minimal install? I am pretty familiar with Ubuntu/Debian distribution, fixing it should be much easier as I am familiar with the distro. As an aside I am planning to use it as a web server and i don't want to update the machine weekly to keep up with the latest Arch packages. Ubuntu 12.10 minimal installation is very easy now a days  It is as easy as installing Windows :). Anyway, I used a copy from  https://help.ubuntu.com/community/Installation/MinimalCD . Ok, I am still using a lot of Windows machine ;(, so burning it to USB flash I used unetbootin . Below are the sequence/options I have selected/or data supplied. Turn off Eee PC 900 Connect flash drive (flashed with Ubuntu mini iso using unetbootin) Turn of Eee PC 900, press ESC to view boot options Select "Install" fr