Installing Binaries from Archlinux Packages into Slackware

Installing Binaries from Archlinux Packages into Slackware

*USE AT YOUR OWN RISK

- Sometimes you just want to use a quick and lazy binary in Slackware for whatever reason, Arch Linux uses the same vanilla apps just like slackware and uses the same format of a tarball compressed in xz, best of all they have updated packages, just make sure you have the dependencies or install the necessary dependencies already.

- To use a package from Archlinux Packages, search and choose the package/s, then download

- pkgtool in Slackware can install this package by the typical command installpkg, but it will say some error if you install it as is, even if the package is vanilla stock and with the same tarball and compression, to workaround this, change the file extension of the package, for example: foo_pkg.tar.xz to foo_pkg.txz

- Install with installpkg command:

$ sudo installpkg foo_pkg.txz

- And it should install, I've done this a bunch of times, especially when I can't find other quick install solutions from other repos for binaries or various slackbuild scripts are problematic and building from source is problematic, this is the fastest lazy hack to install packages, removing the package is the same as using the removepkg command from pkgtool.


- That's all.

Various ways to install packages in Slackware Linux

Various ways to install packages in Slackware Linux:


1.) Slackpkg
2.) Slackbuilds and Sbopkg
3.) Pkgtool and installpkg
4.) Classic Compile from Source with Make:
    - After the downloading the source files (recommended in /usr/local/src/), cd to /usr/local/src Read any readme or text or instructional files included.
    - Extract to a directory, by GUI extract or command line:
[tar] - Extract (unpack) a TAR File
$ tar -xvf foo.tar

[tar.gz] - Extract and Uncompress a TAR File Compressed with GZIP
$ tar -xvzf foo.tar.gz

[tar.bz2] - Extract and Uncompress a TAR File Compressed with BZIP2
$ tar -xvjf foo.tar.bz2

    - Go into that directory and issue the commands in order, $ as user, # as root.
    $ ./configure
    $ make
    # make install
    # make clean 

When you want to uninstall it, you do the following:

    $ cd /usr/local/src/foo
    as root
    # make uninstall 

5.) Compile and install with Checkinstall:

Classic Compile from Source with Make:
    - After the downloading the source files (recommended in /usr/local/src/), cd to /usr/local/src Read any readme or text or instructional files included.
    - Extract to a directory, by GUI extract or command line
    - Go into that directory and issue the commands in order, $ as user, # as root.
    $ ./configure
    $ make
    # checkinstall 
(When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied)
(As optional like this ff -
# checkinstall make install_package
)


The difference with Checkinstall and make install, is that checkinstall tracks the package, so to uninstall it, just check /var/log/packages and use removepkg foo,
to uninstall.


6.) Src2pkg

KDE4 Disable Disturbing Huge Taskbar Thumbnail Previews and Tooltips at the panel:

KDE4 Disable Disturbing Huge Taskbar Thumbnail Previews and Tooltips at the panel:

Click Kmenu, Go to Settings, Go to System Settings, Go to Desktop Effects, Go to All Effects, disable Taskbar Thumbnails, by unchecking its box, press Apply.


After this there will no longer be huge previews when you hover on apps opened at the taskbar/panel, but the huge tooltips still shows, disable this next.


KDE4 Disable Disturbing Huge Tooltips at the taskbar panel in KDE:

Click Kmenu, Go to Settings, Go to System Settings, Go to Workspace Behaviour, Go to Workspace, uncheck the box Show Informational Tooltips, press Apply.


After this there will no longer be huge tooltip/s when you hover on apps opened at the taskbar/panel.


How to restart KDE without rebooting/logging off from X

Restart KDE4:

- Press ALT+F2 to run Krunner
- Issue either command and press enter:

1.) plasma-desktop

or

2.) kbuildsycoca4 && kquitapp plasma-desktop && kstart plasma-desktop

Enable Firewall through IPtables in Linux

Use IPtables for a firewall:

Below is a generic sample firewall you can use for this article

- edit /etc/rc.d/rc.firewall
- paste this

#!/bin/sh
# iptables script generated 2012-09-30
# http://www.mista.nu/iptables
IPT="/usr/sbin/iptables"
# Flush old rules, old custom tables
$IPT --flush
$IPT --delete-chain
# Set default policies for all three default chains
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -P OUTPUT ACCEPT
# Enable free use of loopback interfaces
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
# All TCP sessions should begin with SYN
$IPT -A INPUT -p tcp ! --syn -m state --state NEW -s 0.0.0.0/0 -j DROP
# Accept inbound TCP packets
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# SMTP
#$IPT -A INPUT -p tcp --dport smtp -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
# HTTP
#$IPT -A INPUT -p tcp --dport http -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
# HTTPS
#$IPT -A INPUT -p tcp --dport https -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
# SSH
$IPT -A INPUT -p tcp --dport ssh -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
# Accept inbound ICMP messages
$IPT -A INPUT -p ICMP --icmp-type 8 -s 0.0.0.0/0 -j ACCEPT
$IPT -A INPUT -p ICMP --icmp-type 11 -s 0.0.0.0/0 -j ACCEPT
# EOF


- save
- exit

- To start firewall at boot
# chmod +x /etc/rc.d/rc.firewall

- If you want to disable the firewall
# iptables -F

- To disable at boot time
# chmod -x /etc/rc.d/rc.firewall

Manually removing kernels and kernel modules

Manually removing kernels and kernel modules
(OPTIONAL WAY):

- /boot Contains all the kernel images
- They probably are named with version numbers. You need to be root ("su -") to delete them, and you can use the standard "rm"  
- The module directories are then located at /lib/modules/{kernel_version} , you can delete the ones you don't need there. Be careful not to delete the kernel and
modules you need of course

How to disable Nepomuk, Strigi and Akonadi in KDE4

How to disable Nepomuk, Strigi and Akonadi in KDE4


Disable Nepomuk, Strigi and Akonadi, which can and will cause many problems and crashes through CPU and RAM Hogging

- Go System Settings > Desktop Search > Basic Settings
and disable:

- Email Indexing
- Nepomuk File Indexer
- Nepomuk Semantic Desktop
then Apply

then > Indexing
and disable:

- Index Documents
- Index Audio
- Index Images
- Index Videos
- Index Source Code
then Apply


Navigate command line at your /home/user directory

Then edit - ~/.kde/share/config/nepomukserverrc
set this, save and exit:

[Basic Settings]
Start Nepomuk=false


Then edit - ~/.kde/share/config/kdedrc
set this, save and exit:

[Module-nepomuksearchmodule]
autoload=false


Then edit - ~/.config/akonadi/akonadiserverrc and set "StartServer" to false.
set this, save and exit

[QMYSQL]
StartServer=false


- Restart GNU/Linux

How to forcefully unmount a Linux disk partition

How to forcefully unmount a Linux disk partition


Even if one cannot find the opened processes running with that partition or with stale NFS error which prevents unmount

# umount -f /mnt

where /mnt is the mount point or the partition you want to unmount

Merge several mp3 files to one file with mp3wrap and mp3val

Merge several mp3 files to one file with mp3wrap and mp3val

Issue command:

$ mp3wrap tmp.mp3 fooFile01.mp3 fooFile02.mp3 fooFile03.mp3 fooFile04.mp3 && mv tmp*.mp3 new.mp3 && mp3val new.mp3 -f -nb

(Use VLC to easily input metadata into the files)

Notes:
- Mp3wrap and mp3val required for this
- vlc is optional

Download flash videos from Google Chrome and Opera in Linux without other plugins

Download flash videos from Google Chrome without other plugins:

Go to the website where the movie  you desire to download is, the video you want to download must be played/loading when you try this

Open the builtin webtools, or right click mouse on empty space in google chrome, and select inspect element, then point and click to NETWORK, look for the video file in the listing, if no file shows, refresh and reload the video/page itself you want to download the video from, then look again, if it doesnt show just reload the page/video and let it play or load and pause it, til the browser sees it.

Try to use the sort order for easier searching, click the file, if it doesnt download, click open in new tab
or window then right click on the video file and choose save video/save as.

Download flash videos from Opera without other plugins:

Opera Webbrowser

Opera has webtools builtin just like google chrome, do the same and go to the website and specific video you want to download, at the url bar, clear the field and type in - opera:cache , then click the possible data types you want to download, for information regarding files open the webtools like in google chrome, and select network, to have a view of the files, if it doesnt show just reload the page/video and let it play or load and pause it, til the browser sees it.

Using memtester to test RAM in the OS, instead of using the POST BIOS Linux Memtest86

Using memtester to test RAM in the OS, instead of using the POST BIOS Linux Memtest86:

1.) Do check, how much memory is there:
# free -m 

2.) If the MAX memory is 8GB:
# memtester 8000MB

Troubleshooting Google Chrome in Linux, shockwave and flash crashes and will not load:



Troubleshooting Google Chrome in Linux, shockwave and flash crashes and will not load:

- Go to the plugins, in google chrome, look for the FLASH plugins, there should be 2 kinds the Official FLASH and the Google Chrome Flash
- Disable the Google Chrome Flash, and apply, restart the browser and it should work.

Fixing file system from bad shutdown or bad superblock error, and cannot start

Fixing file system from bad shutdown or bad superblock error, and cannot start



Sometimes different reasons or by bad shutdown, the filesystem could be damaged and drops you in a shell of initramfs busybox, a limited safe mode interactive shell, or for some reason the system complains of a bad superblock and drops you in a similar environment, regardless the filesystem is damaged and you cannot boot normally, a good way to fix this is to boot with a linux live system and to fix with fsck:
       
1.) Boot in linuxlive system, make sure that when this is to be done, that the filesystem to fix is not mounted
2.) Check the partitions, find the proper one:
# fdisk -l |grep Linux|grep -Ev 'swap'
3.) For this example the partition to be fixed is sda3:
# dumpe2fs /dev/sda3 | grep superblock  

/or


# mke2fs -n /dev/sda3



4.) You should get a similar output as:

Primary superblock at 0, Group descriptors at 1-6
  Backup superblock at 32768, Group descriptors at 32769-32774
  Backup superblock at 98304, Group descriptors at 98305-98310
  Backup superblock at 163840, Group descriptors at 163841-163846
  Backup superblock at 229376, Group descriptors at 229377-229382
  Backup superblock at 294912, Group descriptors at 294913-294918
  Backup superblock at 819200, Group descriptors at 819201-819206
  Backup superblock at 884736, Group descriptors at 884737-884742
  Backup superblock at 1605632, Group descriptors at 1605633-1605638
  Backup superblock at 2654208, Group descriptors at 2654209-2654214
  Backup superblock at 4096000, Group descriptors at 4096001-4096006
  Backup superblock at 7962624, Group descriptors at 7962625-7962630
  Backup superblock at 11239424, Group descriptors at 11239425-11239430
  Backup superblock at 20480000, Group descriptors at 20480001-20480006
  Backup superblock at 23887872, Group descriptors at 23887873-23887878

- now choose a Sblock such as the first one is likely the one to fix issue:
# fsck -b 32768 /dev/sda3 

/or

  # e2fsck -b 32768 /dev/sda3 

, you will be prompted with questions to ignore error, answer "y", and for fix? answer "y", til its done.
and alternative is to use the:
 # fsck -y /dev/sda3 
, but this fixes the entire partition, try first the first one and use this only
as an option if that doesnt fix it, or if you know for sure why to.

5.) Now to test if it works, mount the partition:
# mount /dev/sda3 /mnt 
, if it mounts then its a good sign, you can do a further test
or do backups now,
$ cd /mnt
$ mkdir test
$ ls -l
# cp file /path/to/safe/location
for directory use
# cp -R /path/directory/ /path/destination

6.) Reboot.


LiveCD/USB Recommedations:

1.) System Rescue CD
2.) Trinity Rescue Kit
3.) Knoppix
4.) Zenwalk Live
5.) Finnix
6.) Kali/Backtrack Live
7.) Sabayon Live
8.) Linux Mint/LMDE Live

Changing the Label of your linux partition with e2label

Changing the Label of your linux partition with e2label

- If your partition is ext2,ext3 or ext4, you can use the e2label command to set the label:e2label - Change the label on an ext2/ext3/ext4 filesystem

# e2label /pathto/device "new-label"

- After you have set the label to, say, "data" you can add a line in /etc/fstab like this oneLABEL=data /mnt/data ext4 noauto,users,rw 0 0then you just need to say mount /mnt/data. If you don't want to modify fstab you can use mount's -L option to specify the label:mount -L data /mnt/data

- There's no need to adjust fstab with an external drive or flash drive just refresh the file explorer if in use

Remove unused reserved blocks from non-system partitions

Remove unused reserved blocks from non-system partitions

- By default 5% of a filesystem will be flagged as reserved for root user. For modern high-capacity disks, this is much higher than necessary - particularly if the partition is not being used for system files. It is generally safe to reduce the percentage of reserved blocks to free up disk space when the partition is either very
large (for example >50 G) not being used for system files
- Use the tune2fs utility to do this. The command below would set the percentage of reserved blocks on the partition /dev/sdXY to 1.0%:

$ sudo tune2fs -m 1.0 /dev/sdXY

If you need to find your drive's device name, issue the following command:

$ df -T | awk '{print $1,$2,$NF}' | grep "^/dev" 

For our example we are going to assume we identified the partition in our drive as /dev/sdb1. Run the following command to eliminate the reserved space:

$ sudo tune2fs -m 0 /dev/sdb1


How to burn iso to cd/dvd with cdrecord command line tool in linux

How to burn iso to cd/dvd with cdrecord command line tool in linux

To find your writer dvd/cd devc:


1.) Choose one of the 3:

     $ dmesg | grep writer
     $ dmesg | grep dvd
     $ dmesg | grep cd 



devices output should show for writer ex:

[    6.728467] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray

this shows the device is in sr0 which is in /dev/sr0 so thats the path to use

2.) Another way is to use cdrecord scanbus command line check:

$ cdrecord -scanbus 

output should look:

Cdrecord-ProDVD-ProBD-Clone 3.01a13 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2012 Joerg Schilling
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
scsibus0:
        0,0,0     0) 'ATA     ' 'ST9500325AS     ' '0003' Disk
        0,1,0     1) *
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *
scsibus6:
        6,0,0   600) 'Optiarc ' 'DVD RW AD-7560S ' 'SB01' Removable CD-ROM
        6,1,0   601) *
        6,2,0   602) *
        6,3,0   603) *
        6,4,0   604) *
        6,5,0   605) *
        6,6,0   606) *
        6,7,0   607) *
scsibus7:
        7,0,0   700) 'Memorex ' 'TRAVELDRIVE 005B' 'PMAP' Removable Disk
        7,1,0   701) *
        7,2,0   702) *
        7,3,0   703) *
        7,4,0   704) *
        7,5,0   705) *
        7,6,0   706) *
        7,7,0   707) *

so in this the device is the SCSIBUS6 at the path 6,0,0 use that


$ cdrecord -v -sao speed=2 -eject dev=/dev/sr0 /path/to/file.iso
or
$ cdrecord -v -sao speed=2 -eject dev="6,0,0" /path/to/file.iso


***Notes:

- For a dvd.iso use sao or dao for music cd.iso use tao
- Slow speed is the best, try to use 2 as the safe base level config
- If the device cannot write from a speed of 1-4, use 0