Tag Archive : slackware

/ slackware

Installing WINE on Slackware64

December 5, 2015 | Article | No Comments

WINE (originally an acronym for “WINE Is Not an Emulator”) is a compatibility layer capable of running Windows application on several POSIC-compliant operating system, sych as Linux, Mac OSX, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing user to cleanly integrate Windows applications into desktop.

This article will discuss about installing WINE on Slackware64. In this article we will use wine binary version 1.5.22 (development). And fortunately, WINE support Slackware and provide an installer for Slackware.

Now download the binary from sourceforge.

Once package is downloaded, do installation with:

upgradepkg --install-new wine-*.txz

Great! You have install WINE. To check wether WINE is installed or not, do invoke it.

wine --version

And make sure the version is 1.5.22.

To run Windows application, simply run wine with the app you want to run as argument and optionally arguments for that app. For example you want to run A.exe then I will issue:

wine A.exe

And done! Happy hacking!

Installing VLC Media Player for Slackware64

December 5, 2015 | Article | No Comments

VLC Media Player or simply called VLC is an open source video player developed by non-profit organization VideoLAN. VLC can be used for playing and streaming media.

At the beginning, the VideoLAN project was consist of two application VLS (VideoLAN Server) and VLC (VideoLAN Client). They are used to stream and read MPEG2 streams.

Nowaday, VLC media player become one of highly portable multimedia player for various audio and video formats such as MPEG, DivX/Xvid, Ogg, as well as DVDs, VCDs, and various streaming protocols. In recent years, it is also become extremely powerful server to stream live and on demand video in several formats.

In this article we will discuss about how to install VLC Media Player to Slackware64. There would be two version: vlc without patent issue and vlc with non-free codecs. Both will be built from source.

Build the VLC

Before we start building the vlc, we must prepare the environment. Do following:

mkdir -p ~/slackbuilds/vlc
cd ~/slackbuilds/vlc
lftp -c "open http://www.slackware.com/~alien/slackbuilds/vlc/; mirror build"
sh vlc.SlackBuild

Those commands will create a working directory and download required files. The above command will prepare system for vlc without non-free codecs. If you need MP3/AAC support, substitute the URL with http://slackware.org.uk/people/alien/restricted_slackbuilds/vlc/

Once we execute the SlackBuild script, it will automatically download the missing source-code archives and build a new VLC package. Once it finishes, you can find a package in the /tmp directory and you can install it with:

upgradepkg --install-new /tmp/vlc-*.txz
upgradepkg --install-new /tmp/npapi-vlc-*.txz

And our job is done here 😀

Installing Virtualbox on Slackware

December 5, 2015 | Article | 4 Comments

Virtualbox, one of player on Virtualization Technology. Developed by Sun Microsystem (now owned by Oracle). This article will discuss about Virtualbox, how to install and configure on Slackware machine.

In this article I use:

  1. Slackware machine, mine is Slackware64 14.0 with multilib support (non-multilib or even 32-bit system is OK)
  2. Virtualbox 4.2.0 (provided by SlackBuilds.org)
  3. or Virtualbox 4.2.6 (provided by Oracle)

You can use method slackbuilds or binary provided by Oracle. both are OK. The advantage of using binary provided by Oracle is you can choose to install latest version.

Enabling Virtualization Support

There would be such a waste if you have installed Virtualbox but you have not enabled the virtualization support, or even you don’t have virtualization support (but it’s rarely happen at this time).

To make sure you have it, restart your machine and enter BIOS / UEFI mode. Make sure you have enabled Virtualization. It depends on the BIOS manufacture.

Method 1: Slackbuild Installations

Stage 1: Install acpica

ACPI CA is a collection of program which includes:

  1. iasl, an ASL compiler/decompiler
  2. acpisrc, a source code conversion tool
  3. acpiexec, a user-space AML interpreter
  4. acpixtract, convert ascii ACPI tables to binary

Why ACPI CA? ACPI CA is needed to be installed as it is a dependency of VirtualBox.

Now download the materials from here.

To build ACPI CA, we need to download following:

  1. ACPICA for unix
  2. acpica.tar.gz

Now place the material into 1 directory and extract the acpica.tar.gz file. You should find a newly created directory acpica. Open it and copy the acpica source to it. Run the slackbuilds script and wait. It should make a new package on /tmp/ directory. Install it using upgradepkg. The complete commands can be found here:

tar -zxvf acpica.tar.gz
mv acpica-unix2-20120420.tar.gz acpica/
cd acpica
./acpica.SlackBuild
upgradepkg --install-new /tmp/acpica-*.tgz

Stage 2: Install VirtualBox Kernel

Virtualbox kernel a package for virtualization needed by VirtualBox. It is a kernel module. Therefore when you build one with current machine and then change the kernel version, you must rebuild this packages. To build the package for a kernel different from the running one, start the KERNEL variable as in

KERNEL=3.7.5 ./virtualbox-kernel.SlackBuild

If you have built virtualbox with HARDENING=no, then you have to do the same for virtualbox-kernel.

Download required materials from here.

The one you need to download are:

  1. virtualbox-kernel source
  2. virtualbox-kernel.tar.gz

Do following:

tar -zxvf virtualbox.tar.gz
mv virtualbox-kernel-4.2.0.tar.xz virtualbox-kernel/ 
cd virtualbox-kernel
./virtualbox-kernel.SlackBuild 
upgradepkg --install-new /tmp/virtualbox-kernel-*.tgz

Stage 3: Install VirtualBox

You can download the material here.

To build a Virtualbox, you need to download following:

  1. VirtualBox 4.2.0 source
  2. VBoxGuestAddition 4.2.0 iso
  3. UserManual.pdf
  4. SDKRef.pdf
  5. SlackBuild script

Now do the following (change it if necessary):

tar -zxvf virtualbox.tar.gz
mv virtualbox-kernel-4.2.0.tar.xz virtualbox/
mv UserManual.pdf virtualbox/
mv SDKRef.pdf virtualbox/
mv VBoxGuestAdditions_4.2.0.iso virtualbox/
cd virtualbox
./virtualbox.SlackBuild 
upgradepkg --install-new /tmp/virtualbox-*.tgz

Post Installation

Once you complete all the steps, you have successfully install VirtualBox.

But, for running VirtualBox you need to do something more. You need to run virtualbox-kernel if you want to run virtualbox. Just invoke /etc/rc.d/rc.vboxdrv start before running VirtualBox. Make sure you have flag it as executable.

You can also create a simple script like this and place it to any directory recognized by shell. In my case I place it at /usr/bin as vboxmgr and whenever I want to start VirtualBox I will start virtualbox-kernel by typing vboxmgr start.

#!/bin/sh

case $1 in
        "start")
                        /etc/rc.d/rc.vboxdrv start
        ;;
        "stop")
                        /etc/rc.d/rc.vboxdrv stop
        ;;
        "restart")
                        (/etc/rc.d/rc.vboxdrv stop) && (/etc/rc.d/rc.vboxdrv start)
esac

Method 2: Using Binary Installation by Oracle

Using this method we can download binary provided by Oracle. The package can be download at this page. But unfortunately, there are official support for Slackware. Therefore we need to download the one which supported by all distribution. In the time of writing this article, the latest installer version is VirtualBox 4.2.6 which can be downloaded from here for 64-bit version. Do you want 32-bit version? Download it here.

Just run the installer and you have done!

Happy hacking 😀

NVidia Optimus Support for Slackware

December 5, 2015 | Article | No Comments

Nvidia Optimus

Some newer laptops nowadays, specifically for nVidia graphic cards, come with what is known as “nVidia Optimus” technology. This technology is an hybrid of nVidia and Intel graphic processing unit (GPU). In primary, there are no two separate GPUs in one machine. This technology is like a switching syQstem between those two. Optimus uses nVidia graphics for performance and Intel graphics for power saving during basic usage. Unfortunately the closed source proprietary drivers do not offer a means for adjusting or switching between the two, unlike those from Advanced Micro Devices Inc. (AMD).

An open source project called Bumblebee has emerged and aims to fix this problem. However, Bumblebee isn’t alone. nVidia developers do assist the Bumblebee project by fixing bugs in the closed source proprietary drivers that Bumblebee developers cannot touch.

In this article we will discuss about Bumblebee and installation on Linux, especially Slackware. For this article I use following:

  1. Slackware64 14.0 with multilib (although any slackware is OK).
  2. Bumblebee packages.

Bumblebee and Relation to X11 Program

Using Bumblebee is not relating to any use of X11, KDE, Compiz-Gusion, Blender, Adobe Flash Player, etc. The Intel graphics provides enough 3-D acceleration (and sometimes has better performance) for those programs to work smoothly without having to use the nVidia GPU. In addition to the programs working efficiently and smoothly, you’re saving power.

Bumblebee is used to switch between the nVidia GPU and the Intel GPU.

Installation


Getting the SlackBuilds

Mostly slackbuilds packages provided hasrequirements for Bumblebee on github. Check which directory we are in first, as they will be downloaded to that directory. If you are ready, then do these:

git clone https://github.com/jgeboski/Bumblebee-SlackBuilds.git
cd Bumblebee-SlackBuilds

Another option is download the full tarball containing the SlackBuilds instead:

wget --content-disposition https://github.com/jgeboski/Bumblebee-SlackBuilds/tarball/master
tar xf jgeboski-Bumblebee-SlackBuilds-<changing hexadecimal>    # Tab completion is helpful.
cd jgeboski-Bumblebee-SlackBuilds

Getting the Dependencies

The dependencies, as with all SlackBuilds, must be downloaded manually and placed into their respective directories. However the SLACKBUILDS.TXT file does give links for the downloads as well as their MD5SUMs to make sure the files were not corrupt. You can use the provided script to download them and check them against their MD5SUM for corruption, like this:
./download.sh

Preparing the Environment

There are a few things you need to do before we begin. First off, we need to have a specific group of users who are going to be allowed access to Bumblebee technology. For the sake of simplicity, we’ll call this group “bumblebee”. In addition to the new group, we need to add the users that are allowed to access bumblebee technology:
groupadd bumblebee
usermod -G bumblebee -a <USERNAME>

Installing the Dependencies

Some SlackBuilds also offer a COMPAT32 option if you’re running a multilib system. In the following examples, we build it with and without 32-bit compatibility. Use the one you desire. Keep these in mind when building the specified package.1. Build and install: libjpeg-turbo (32-bit compatibility available)

cd libjpeg-turbo                                   # You don't actually need to ''cd'' as root, but who wants to ''su'' all the time?
./libjpeg-turbo.SlackBuild                         # This does not build with 32-bit compatibility.
upgradepkg --install-new libjpeg-turbo-*.tgz

If you do wish to build with 32-bit compatibility, add COMPAT32=yes before executing the script as so:

COMPAT32=yes ./libjpeg-turbo.SlackBuild
libjpeg-turbo installs in /opt because otherwise it can overwrite some things from the original libjpeg.

Continue the same steps as above for the other programs in the Bumblebee-SlackBuilds directory.

2. Build and install: VirtualGL (32-bit compatibility available)

cd ../VirtualGL
./VirtualGL.SlackBuild
upgradepkg --install-new VirtualGL-*.tgz

I think you’re starting to get the idea now…

COMPAT32=yes ./VirtualGL.SlackBuild
# Only for 32-bit compatible binaries and libraries on an x86_64 based system.
There are two option for the NVidia card driver: nouveau or nvidia proprietary driver.
If you want to use nVidia drivers, then you must not use nouveau. Then do following:
Remove nouveau by installing xf86-video-nouveau-blacklist from /extra, or blacklisting nouveau manually.
Some driver required specific kernel version (ex: NVIDIA-Linux-x86_64-313.18.run need version of higher than 3.3 and lower than 3.8). If you don’t have those kernel, It would be better if you compile it first.

1. Build and install: nvidia-bumblebee

cd ../nvidia-bumblebee
./nvidia-bumblebee.SlackBuild
upgradepkg --install-new nvidia-bumblebee-*.tgz
COMPAT32=yes ./nvidia-bumblebee.SlackBuild 
# Only for 32-bit compatible binaries and libraries on an x86_64 based system.

2. Build and install: nvidia-kernel

cd ../nvidia-kernel
./nvidia-kernel.SlackBuild
upgradepkg --install-new nvidia-kernel-*.tgz
COMPAT32=yes ./nvidia-kernel.SlackBuild 
# Only for 32-bit compatible binaries and libraries on an x86_64 based system.

Now that we have those 32-bit compatible and optional packages out of the way, let us build what remains.3. Build and install: bbswitch, libbsd and also bumblebeed in order as you go.

cd../bbswitch
./bbswitch.SlackBuild
upgradepkg --install-new bbswitch-*.tgz
cd ../libbsd
./libbsd.SlackBuild
upgradepkg --install-new libbsd-*.tgz
cd ../bumblebeed
./bumblebeed.SlackBuild
upgradepkg --install-new bumblebee-*.tgz

Post-Installation

If you have pass the installation setup, then you have install it. Now what must we do? The bumblebeed package provided us with an rc.bumblebeed script in /etc/rc.d where the other startup scripts are also located. Now, we must make sure that this script executable and, if you so desire, start it!

chmod +x /etc/rc.d/rc.bumblebeed
/etc/rc.d/rc.bumblebeed start

If you used the proprietary nvidia kernel blob, it places itself into

/lib/modules/$( uname -r )/

so if you rebuild the kernel, you will have to reinstall the nvidia-bumblebee package. This also applies to bbswitch which is also kernel-dependent.

If you would like bumblebee to autostart with the system, you can add the following to /etc/rc.d/rc.local:

if [ -x /etc/rc.d/rc.bumblebeed ]; then
  /etc/rc.d/rc.bumblebeed start
fi

You can even go a step further by having bumblebeed stop with your system by adding the following lines to /etc/rc.d/rc.local_shutdown. You can create this file if it does not exist.

if [ -x /etc/rc.d/rc.bumblebeed ]; then
  /etc/rc.d/rc.bumblebeed stop
fi

Done! Now let’s try it out! Any program we want using the nVidia graphics card can be run with “optirun” like this:

optirun glxspheres

Now we can execute the program directly without adding “optirun” at the beginning:

wine ~/.wine/drive_c/Program_Files/Starcraft\ 2/Starcraft\ 2.exe

Editing the Configuration Files

A few general /etc/bumblee/bumblebee.conf configuration edits (likely suited for all):
# If you added your user account to a different user group than "bumblebee" at the start, make sure to change the "ServerGroup=" line accordingly.
# Here we set it to "ImAllergicToBees":
ServerGroup=ImAllergicToBees

# Perhaps you don't like using Display :8 for X11. We can change that too, in this example we set it to 3:
VirtualDisplay=:3

# I want to specify my driver that bumblebee will use by default. Here we show nouveau, but you can easily replace it with "nvidia".
# For the rest of this small section, we'll be using nouveau for simplification.
Driver=nouveau

# Don't forget to add their respective lines as well.
KernelDriver=nouveau
Module=nouveau

Troubleshoot

Some report that they can’t run optirun properly. There might be some cause of this. In this section we will discuss about some known case and how to solve it. First run optirun like this:

optirun -vv --debug glxspheres

This command will give us more information.

[ 1143.518414] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 1143.691489] [DEBUG]optirun version 3.0.1 starting...
[ 1143.691545] [DEBUG]Active configuration:
[ 1143.691579] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 1143.691610] [DEBUG] X display: ebug
[ 1143.691628] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-current:/usr/lib32/nvidia-current
[ 1143.691647] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 1143.691671] [DEBUG] VGL Compression: proxy
[ 1144.104309] [INFO]Response: No - error: <a href="https://github.com/Bumblebee-Project/Bumblebee/issues/EE">XORG</a>NVIDIA(0): Failed to assign any connected display devices to X screen 0

[ 1144.104353] [ERROR]Cannot access secondary GPU - error: <a href="https://github.com/Bumblebee-Project/Bumblebee/issues/EE">XORG</a> NVIDIA(0): Failed to assign any connected display devices to X screen 0

[ 1144.104379] [DEBUG]Socket closed.
[ 1144.104404] [ERROR]Aborting because fallback start is disabled.
[ 1144.104419] [DEBUG]Killing all remaining processes.

If you encounter something like that, there are two thing you must look:

  1. Make sure you have assign driver on /etc/X11/xorg.conf. Replace any occurance of nouveau driver with nvidia
  2. Check your /var/log/Xorg.8.log and search for CRT or DFP. In many case you will encounter CRT. If so, edit /etc/bumblebee/xorg.conf.nvidia. Found line like this: Option “ConnectedMonitor” “DFP”. Now change “DFP” with “CRT”.

NVIDIA is one of graphic card producer (beside AMD/ATI) for Personal Computer. An open source graphic driver is available with name nouveau (and enabled by default if you use NVidia card). How if you want to use NVidia’s proprietary driver? Yes you can.
This article will discuss about installing NVIDIA graphic driver for Slackware Linux. In this article I use:
  1. Slackware64 14.0
  2. NVidia driver

There are two ways to accomplish: install via SlackBuilds.org and run nvidia proprietary driver. Both of them are OK.

Installation via SlackBuilds.org

There are three packages at Slackbuilds.org for functioning nVIDIA driver. They are: nvidia-kernel packages which builds the kernel module, the nvidia-driver packages which builds the X.Org driver and contains the OpenGL implementation as well as the COMPAT32 libraries for multilib Slackware64 system and libvdpau package as requirement of nvidia-driver package.

”nouveau” Module Removal

Before we install the driver, we must make sure nouveau module is not loaded. As stated before, this module is open source implementation for NVidia graphic cards. Yet, to use NVidia propietary driver we must disable nouveau so that both of them are not conflicting each other. Failure to do so may result in a startx error of “ERROR: could not insert ‘nvidia’: No such device”.

There are two ways to blacklist nouveau driver: installing xf86-video-nouveau-blacklist package from extra directory of Slackware64 on the installation CD/DVD. You can also obtain it by Slackware mirror, or using slackpkg utility.

If you choose to install xf86-video-nouveau-blacklist, you can simply invoke this command on the same directory as the package:

upgradepkg --install-new xf86-video-nouveau-blacklist-*.txz

Otherwise you can do it by creating a new file on /etc/modprobe.d :

disable nouveau
options nouveau modeset=0

And name it as disable_nouveau.conf.

SlackBuilding

If you who choose using slackbuild, there are currently two ways to install SlackBuild:

  1. Downloading the appropriate build scripts manually from SlackBuilds.org and following the procedure.
  2. Using sbopkg which automates downloading the needed source and compilation of multiple packages.

Once the packages have been installed, server can be started with full GPU support.

NVIDIA Binary

For you who want to install using binary driver provided by NVIDIA you can follow these steps.
To obtain the driver, you can visit following url. The name of the driver package would be something like “NVIDIA-Linux-ARCH-VERSION.run” where ARC is the computer architecture (x86 / x86_64).
If you are using Slackware64 (64-bit system with or without multilib support) you should download the “Linux x86_64/AMD64/EM64T” driver package (in our case), while 32-bit Slackware needs the “Linux x86/IA32” driver
While it is not always true, but your safest choice would be use the “Latest Long Lived Branch version”. In some case, you might want to choose ”Latest Short Lived Branch version” instead.
Older legacy drivers are available as well for graphics cards which are no longer current. When you select a driver, a list of compatible GPUs will be displayed. Once you have determined the correct driver, the license will need to be accepted and the file saved in an accessible location. Before running the installer, there are some other actions that must be taken.
Ensure X11 is not running. Login as root and do this command:
telinit 3
Once successful, you will be brought to runlevel 3 where this mode is multiuser without X support.
Now invoke this command:
sh /path/to/NVIDIA-Linux-ARCH-VERSION.run
If prompted to blacklist nouveau, do so (see above) and restart and launch installer with root permission after restarted.
Choose to accept the license and install the driver.

note: nVIDIA binary driver installation can not be completed while the X11 Window System is active.

On process, the installer will proceed as follows:
  1. Extract itself and start an ncurses interface.
  2. Print license terms on screen.
  3. If you have no previouse system, the installer will begin by building the modules. Otherwise, the installer woll prompt permission to remove previous driver as part of the new installation.
  4. The installer will prompt you about installing NVidia’s 32-bit compatibility OpenGL libraries (if you enable multilib).
  5. Once no conflicting X and OpenGL files are found, the modules will be installed.
  6. Installer will offer to use nvidia-xconfig utility to modify xorg. The old one will be backed up to /etc/X11/xorg.conf.nvidia-xconfig-original.
  7. Installation is completed and the program will exits.

If everything is OK, then modules should be installing for the currently running kernel.

You must create an X.Org configuration file which loads the binary Nvidia driver if you decided not to let the nvidia-xconfig utility modify your computer’s xorg.conf file. The X.Org of Slackware supports individial “*.conf” files in a directory /etc/X11/xorg.conf.d. Any file with a .conf extension will be included together with the main /etc/X11/xorg.conf file.
You could create for instance a file named /etc/X11/xorg.conf.d/10-nvidia.conf with the following content:

Section "Device"
    Identifier  "Device0"
    Driver  "nvidia"
    VendorName "Nvidia Corporation"
    BoardName ""
EndSection

Without this definition, you will not get accelerated Nvidia GPU support! X.Org would fall-back to VESA mode because the nouveau driver has been blacklisted. The kernel will not auto-detect the binary driver as opposed to the nouveau driver.

Starting X11 with nvidia GPU Support

All that remains is to start the X.org server. This can be accomplished by configuring Slackware to start in runlevel 4, which will start a graphical login manager, such as KDM or XDM, on boot. If you want this, then you need to edit the file ”/etc/inittab” and change the line

id:3:initdefault:

to

id:4:initdefault:

Otherwise you can login to a user account and issue the ”startx” command to start an X session.

By default, startx will start the window manager which was chosen during installation. To change this behavior, the file ”.xinitrc” in the user’s home directory can be edited to start a different WM.
Alternatively, the default WM can be altered on a per-user basis by using the command ”xwmconfig” and selecting one of the available WM’s.

Installing Conky on Slackware64

December 5, 2015 | Article | No Comments

What is conky?

Conky is a light-weight system monitor for X that display any information to desktop. Maybe you who has familiar with Windows OS will find it similar to Conky.

In this article we will use following:

  1. Slackware64 14.0 (any 64 bit version is OK)
  2. scons
  3. lua
  4. imlib2
  5. tolua++
  6. conky

The packages (2) to (6) can be found on slackbuild website. In this article we assume you are know how to install package with slackbuild, otherwise you can search for it.

Now build the packages and install with following order:

And you now have conky installed on your machine 😀
But wait, the conky has started but it draws black background, what’s up? Calm down, there is an explanation for that. Remember that Slackware64 use KDE.

  1. Conky uses pseudo-transparency instead of ACTUAL transparency. It means Conky peeks at the root desktop and draws it as the background of the Conky window.
  2. KDE doesn’t draw wallpaper to the root window, only to the plasma desktop. Plasma desktop is the lowest window on top of the root window. Thus the root window is empty and now you know why Conky appear as black background.

There is an approach to overcome this: draw the background used by plasma desktop to root window. To do so, we need to install additional package: feh. Now go to slackbuild site again, download and install following packages in order:

  1. giblib
  2. feh

Assuming you use a script for autostart at booting, modify your script and gives a delay before conky start (using sleep). Fifteen seconds is a good one. After use sleep, we will draw a background before conky start so call feh before conky. Here is the script I use:

#! /bin/sh

function do_start() {
  if [ `pgrep conky | wc -l` -ge 2 ]; then
    echo "OctoEngine has been activated before. Quitting..."
    return;
  fi

  if [ `grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | wc -l` -gt 1 ]; then
    WP=`grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | sed -n 2p | tail --bytes=+11`
  else
    WP=`grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | tail --bytes=+11`
  fi
  feh --bg-scale $WP
  sleep 15
  conky -d -c /opt/conky/config/left_panel
  conky -d -c /opt/conky/config/right_panel
  sleep 1 && transset-df .5 -n Conky
}

case $1 in
  "start")
    do_start
    ;;
  "restart")
    killall conky
    do_start
    ;;
  "stop")
    killall conky
    ;;
esac

if [ $# -ne 1 ]; then
  do_start
fi

 

On that script, I use two conky: left_panel and right_panel which located at /opt/conky/config. Everything I need to run conky is defined on do_start() function. I must make sure that only one of each must be run, no multiple instance, so I check whether conky has been running before (indicated by “`pgrep conky | wc -l` -ge 2” command)

In this scenario, we use wallpaper used by plasma desktop and draw it into root window. To accomplish that, we need to peek at ~/.kde/share/config/plasma-desktop-appletsrc, parse it to get the correct filename, and execute feh. Mostly I’m using multiple display screen and the plasma-desktop-appletsrc will return more than one line thus supply incorrect value for feh. Therefore I modify it so it can adapt to my situation.

Using this script is so simple, use it just like any autostart script. If you want to stop conky manually you can invoke script_name stop. Starting conky manually can be done with script_name start.

Broadcomm, as seen at their site here, they claim to be major player at wire and wireless communication. But for some wireless device cannot work properly on linux. To solve this problem you must install the appropriate driver.

In this article we will discuss about how to installing Broadcom wireless. A special focus for this article would be for Broadcom’s BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228-based hardware. Also In this article I use following:

  1. Lenovo Z480 (using Broadcom BC4313, see specification here).
  2. Slackware64 14.0

Basically you can use any computer with Broadcom device and any Linux whether 32bit or 64bit.

There are 2 ways to solve the problem.

Compile and Install from Source

Broadcom is kind enough (well it must be) for offering source code for their device. First visit here for getting the driver. Like I said, the supported devices are Broadcom’s BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228-based hardware (according to their page).

Now download this patch to your computer.

Extract the downloaded package from Broadcom’s site. Move the patch to inside of extracted package.

Now patch the file with following command:

patch -p0 src/wl/sys/wl_linux.c < bc_wl_abiupdate.patch

Or if you cannot patch by yourself, you can download and extract my patched version of broadcom driver here (note: for default kernel 3.2.29 generic).

Whether you patch by yourself or use my patched version, do the following (use root privileges):

make; make install; depmod; modprobe wl

Now check that the driver is properly install

lsmod | grep wl

You should see the driver wl there.

Use SlackBuild

This method only work for slackware user. Go to this url and download the appropriate packages. Just extract the packages and run the SlackBuild script 🙂 like other SlackBuild installation.

Congratulation! You have successfully install the driver. Now see if your wireless card is work.

Touchpad, one of primary input device integrated on laptop. In this article we will discuss about how to enabling touchpad and configuring the touchpad on linux especially Slackware64.

For this article, I use following:

  1. Slackware64 14.0

Yes. Only that!

A package responsible for touchpad is Synaptics. The Synaptics version included in Slackware64 is 1.6.2 (may be vary for your linux). A default setting gives us capability to move the cursor but we still can count on left-click and right-click.

Now create a file /etc/X11/xorg.conf.d/50-synaptics.conf (do it with root privileges):

nano /etc/X11/xorg.conf.d/50-synaptics.conf

And then write the file with the following text:

# Xathrya's z480 setting
# Use "synclient -l" to see all available options
# Use "man synaptics" for details about what the options do
#
Section "InputClass" Identifier "touchpad catchall"
	Driver "synaptics"
	MatchDevicePath "/dev/input/event*"
	MatchIsTouchpad "on"
	Option "SendCoreEvents
	Option "TapButton1" "1"
	Option "TapButton2" "2"
	Option "TapButton3" "3"
	Option "ClickPad" "true"
	Option "EmulateMidButtonTime" "0"
	Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
EndSection

 

Save it, and restart the X session.

As the document suggest, you can also invoke:

synclient -l

to see available variables for settings.

For an article about Android Application Development using Linux Ubuntu, you can visit here

Android Operating System is one of popular operating system for mobile device beside Windows mobile, Apple iOS, etc. This article main focus would be concentrated on installation of development tools, which is Eclipse IDE, Android SDK, and Android Developer Tool on slackware 64 bit.

Why Eclipse? Eclipse is an open source Integrated Development Environment and has full support for Android. It’s also quite simple.

In the time i write this article, I use Slackware64 14.0. Of course you can use other linux distribution if you like. You must also have active internet connection to do installation and fetching required packages.

You can skip some part if you are confident enough that you have done it before. Well, but nothing wrong by read a whole article, right? 😉

Now let’s we go!

Preparation

We need to install JAVA and Eclipse. But running Eclipse need JAVA so we will install JAVA first. An article for installing latest JAVA for Slackware64 can be found here. An article for installing latest Eclipse for Slackware64 can be found here.

Our machine is 64-bit but some tools are 32-bit. Therefore we need to make sure our Slackware is multilib enabled.

Installation

Android Developer Tool Plugin

Now let’s moving to installation of Androit Developer Tool (ADT). It is a special Eclipse plugin contains integrated android environment for building Android application using eclipse.

Start eclipse. Now navigate to:

Help - Install New Software - Add

enter the following information:

Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/

Click on OK. Now select “Developer Tools” and/or “NDK Plugins”. Click Next to begin installation. Wait for installation to finish its work.

Install the SDK

Next we will install Android SDK. Downlad Android SDK starter pack from this link

Download the latest SDK. By the time I write this article, the latest version is 21.0.1. You can download linux version directly in this link:

Extract the content of Android SDK pack:

tar -xvzf android-sdk_r21.0.1-linux.tgz

In my case I will leave the SDK on /home/xathrya/android-sdk.

But wait! If you read it, you will notice that the SDK is for linux 32 bit. Our Slackware is 64 bit, right? Don’t worry, this article will guide you to convert your Slackware64 to be multilib-enabled a.k.a capable of running 32 bit application.

Install SDK Platforms

Now we need to install platforms and optional additional plugins or sample codes. Start SDK manager:

/home/xathrya/android-sdk/tools/android

Seleck SDK Platforms you want. I choose Android 2.3.3 API 10 as my smartphone Sony Xperia U use this one. When you have selected all packages you want, click Install Selected. You will be prompted to Accept License. Click Accept All and then Install.

Create Android Virtual Device

Now we have to join Eclipse IDE with Android SDK and create and Android Virtual Device (AVD). Android Virtual Device is an emulator to run your application on top of your computer.

In Eclipse, navigate to:

Window - Preferences - Android

Enter location of your Android SDK installation. In my case it is in /home/xathrya/android-sdk/. Press OK.

Now navigate to:

Window - Android Virtual Device Manager - New

Insert following information into:

AVD Name: AndroidVirtualDevice
Device: <your preferred device>
Target: <chose any desired Android version and API level available>

Click OK. The new Android Virtual Device will be created in the directory:

~/.android/avd

Congratulations! Now you can develop android apps on Slackware!

Other Notes

If you had previously install Eclipse CDT and can’t install Android SDK, please refer here.

Install Java Support for Eclipse CDT

December 3, 2015 | Article | No Comments

On the official eclipse page, we will see there are many Eclipse version. The two of them are Eclipse CDT (referred to Eclipse IDE for C/C++ Developers) and Eclipse JDT (referred to Eclipse IDE for Java Developers). Eclipse CDT is a bundle of eclipse IDE for developing C\C++ application. While the Eclipse JDT is a bundle of eclipse IDE capable of developing Java application. So by default if you are installing CDT, you can only develop C\C++ application. A similar condition apply to JDT for Java. Although they have different purpose but they are using the same application.

In this article we will discuss about how to add support for Java developing in Eclipse CDT. In other words, our Eclipse would support developing for both C\C++ and Java.

For this article I use:

  1. Slackware64 with multilib support (although not multilib-enabled is OK)
  2. Eclipse Juno for 64bit.

Now let’s go to the main point!

Start eclipse. Now navigate to:

Help -> Install New Software -> Add

enter the following information:

Name: Juno Download

Location: http://download.eclipse.org/releases/juno/

Click on OK. Now expand the Programming Language section and checklist the Eclipse Java Development Tools. Click Next to begin installation. After installation you will be prompted to restart the eclipse, do so.

After a restart, you now have an Eclipse capable of develop both C\C++ and Java apps!

Social media & sharing icons powered by UltimatelySocial