Tagged: tutorial

Slackware64: Installing Openbox on Slackware64 14.1

Continued from my previous post, Slackware64: Installing Slackware 14.1, I'm going to install Openbox as my default window manager. And this is how it looks in vm client

slacky64

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

To install Openbox and other packages, visit SlackBuilds.org. Slackbuilds.org offers the collection of slackbuild scripts. A slackbuild script is just a shell script which contains none of the code from the application it is going to install. Its only purpose is to help you build a Slackware package, which you can then install using 'installpkg' or 'upgradepkg'.

Now let's get going...

Installation of Openbox:

First, download the source and slackbuild for openbox: $ cd Downloads/ $ tar -xzvf openbox.tar.gz ... $ mv openbox-3.5.0.tar.gz openbox/; cd openbox $ su # ./openbox.SlackBuild ... # installpkg /tmp/openbox-3.5.0-x86_64-1_SBo.tgz ... Executing install script for openbox-3.5.0-x86_64-1_SBo.tgz Package openbox-3.5.0-x86_64-1_SBo.tgz installed. #

Now, exit X, run 'xwmconfig' and choose xinitrc.openbox-session. Then start X again. I use openbox-session because this executes the 'autoscript' script when Openbox starts. 'autoscript' contains programs that are executed at start-up. At any rate, this time, your X Window is running Openbox. $ startx

slacky64_openbox

Don't be surprised if you see only blank screen. By default, openbox does not offer desktop icons, task bar, etc. But this means its customizable as you like.

obconf:

ObConf is a GTK+ tool to assist with the configuration of the Openbox window manager (from slackbuilds.org).

lxappearance:

LXAppearance is the standard theme switcher of LXDE. Users are able to change the theme, icons, and fonts used by applications easily (from slackbuilds.org).

tint2:

tint2 is a simple panel/taskbar intentionally made for openbox3, but should also work with other window managers.

The goal is to keep a clean and un-intrusive look with lightweight code and compliance with freedesktop specifications (from slackbuilds.org).

Requirement: imlib2

conky:

Conky is a system monitor for X originally based on the torsmo code. Since it's original conception, Conky has changed a fair bit from it's predecessor. Conky can display just about anything, either on your root desktop or in it's own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout (from slackbuilds.org).

nitrogen:

Nitrogen is a background browser and setter for X windows (from slackbuilds.org).

Requirement: gtkmm, mm-common, atkmm, pangomm, cairomm, glibmm, libsigc++

rxvt-unicode:

rxvt-unicode is an enhanced version of the rxvt terminal emulator. It has full unicode and Xft support, does font antialiasing and italics, and has the same transparency capabilities as ATerm. It can be extended using Perl. (from slackbuilds.org).

Now follow my previous post, Openbox: Customizing to My Liking

That's all!
-gibb

Slackware64: Installing Slackware 14.1

Long waited new version of Slackware 14.1 was released a few days ago (11/07/2013). I also read a report from Alien Bob about this new version and it looks promising as ever!

Here is a screen shot of my slackware64 14.1 in vm client

slacky64

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

Installing Slackware64 14.1

The installation of this version of Slackware is pretty much the same as previous ones. If you have ever installed Slackware before, there is no surprise. Slackware uses a non-graphical installer. If this is your first try, you may feel a bit overwhelmed but it is really easy to understand.

The most tricky part may be creating partitions with 'fdisk' or 'cfdisk'.

slackware64_partition

I'm used to 'fdisk' so I just run the command: root@slackware:/# fdisk [path_to_drive] Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p) p Partition number (1-4, default 1): 1 First sector (2048-41943039, default 2048): 2048 Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +2G Partition 1 of type Linux and of size 2 GiB is set Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p) p Partition number (1-4, default 2): 2 First sector (4196352-41943039, default 4196352): 4196352 Using default value 4196352 Last section, +sectors or +size{K,M,G} (4196352-41943039, default 41943039): 41943039 Using default value 41943039 Partition 2 of type Linux and of size 18 GiB is set Command (m for help): t Partition number (1-4): 1 Hex code (type L to list codes): 82 Changed system type of partition 1 to 82 (Linux swap) Command (m for help): a Partition number (1-4): 2 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@slackware:/#

After partitioning, run 'setup' to start the setup program.

Addswap:
This enables a selected partition as swap partition. In my case, it's /dev/sda1. The swap partition is an independent section of the hard disk used solely for swapping. Swapping is the process whereby a page of memory is copied to the pre-configured space on the hard disk to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.

Linux installation partition:
Next step is to select a partition to install root Slackware files. In my case, I have only one partition to select, /dev/sda2.

Format partition:
Select "Format" to format above selected partition.

Select filesystem:
I choose ext4 filesystem. Ext4 is an advanced level of the ext3 filesystem which incorporates scalability and reliability enhancements for supporting large filesystems (64 bit) in keeping with increasing disk capacities and state-of-the-art feature requirements.

Source media selection:
Select "Install from a Slackware CD or DVD.

Package selection:
I choose the default selection.

Select Installation mode:
I choose "full" to install everything.

USB flash boot:
After the packages installation, it'll ask you whether you want to boot from a USB device. This is surely an option if you don't use LILO or traditional boot loader, but I use LILO to boot the system so I skip this section by selecting "Skip".

Install LILO:
LILO is a Linux Loader which boots the Linux kernel. The setup program offers a few options here. "Simple" and "Expert". Simple installation automatically tries to identify installed OS(es) and enables you to choose. "Export" installation allows you to edit the lilo.conf file. Since I'll have only one OS on this system, the simple method suffices.

Select frame buffer console for LILO to use:
I do not much care about the frame buffer console so I choose the standard.

Kernel parameters for LILO
No extra parameters are needed.

UTF-8 text console
I choose "No".

LILO installation location:
There are a few options here but since I don't have any other OS, it is safe for me to install LILO in the MBR.

Mouse configuration:
I use a USB connected mouse so my choice here is "usb".

Network configuration:
From here on there are questions for network configuration, such as hostname, domain name, network type (DHCP, static IP, etc).

Start-up services:
Default selection

Hardware clock:
The hardware clock is set to the current local time so my selection here is "No".

Timezone configuration:
I select "US/Eastern" here.

Default window manager for X:
Although I know I'm going to install Openbox for my window manager, I choose XFCE here. I used to like KDE but it's too fatty for me now. If you want, you can run 'xfwmconfig' to choose the default again.

Root password:
Choose some strong password for root.

DONE!
Now the installation of new Slackware is done. You can reboot the system and enjoy it.

If you'd like, you can follow my previous post, Slackware64 14: Post Installation Configuration.

That's all!
-gibb

Getting git Working on Android Devices

I have this small project for my brother that I need to create backend functions for his website. But I haven't been able to work on it as much (or fast) as I'd like to since I'm always doing things away from my computer. I could bring around my notebook with me but it's not that convenient. Then I thought it would be nice if I could use my old-yet-still-functioning-good cellphone, thunderbolt, for coding and could share it with my other computers since I carry it with me all the time.

Bang! Why not! Then I started searching apps for editors, web servers, and version control, etc... Editor and web server were relatively easy to find. I decided to use Vim Touch for editor and AndroPHP for web server. A problem was with a version control app. I've used git for other projects so I wanted to use it for this but I couldn't find a suitable app. When I was almost giving up this whole idea, I realized that I had Terminal IDE and gave a try to see if it had git installed. VoilĂ ! It had git installed.

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

Getting its environment for git and remote origin:

The version of git on my cellphone is 1.7.8: $ git --version git version 1.7.8.163.g9859a.dirty

I have a remote repository at bitbucket.org and tied to clone it to my cellphone: $ git clone https://[username]@bitbucket.org/[username]/[reponame].git Cloning into '[reponame]'... fatal: cannot exec 'git-remote-https': Permission denied

Oops... it's not working. After googling, I found that Terminal IDE doesn't support HTTPS for authentication. That leaves me with SSH authentication.


Generating SSH Keys:
Terminal IDE comes with the command dropbearkey which is a relatively small SSH server and client that's capable of running on a variety of POSIX-based platforms. It's easy to create a new key: $ mkdir ~/.ssh $ dropbearkey -t rsa -f ~/.ssh/id_rsa This will create a passphrase-less pair of public/private keys. If the public key needs to be viewed later time, this command does the job: $ dropbearkey -y -f ~/.ssh/id_rsa


Configuring SSH:
SSH now needs to be mapped to a new key: $ vim ~/.bashrc --------------------------------- alias ssh='ssh -i ~/.ssh/id_rsa'

But git uses a bit different way to handle this: $ vim /data/data/com.spartacusrex.spartacuside/files/bin/ssh_git --------------------------------- #!/data/data/com.spartacusrex.spartacuside/files/system/bin/bash exec ssh -i ~/.ssh/id_rsa "$@"

Then make it executable: $ chmod 755 /data/data/com.spartacusrex.spartacuside/files/bin/ssh_git

And set an environment variable: $ vim ~/.bashrc --------------------------------- export GIT_SSH=~/bin/ssh_git

[Edit: I forgot to mention about registering the public key to Bitbucket]

Note: If you get No auth methods could be used error, most likely ssh is not loading your key or you forget to register the public key to your server (in my case bitbucket.org) $ ssh -T git@bitbucket.org ssh: connection to git@bitbucket.org:22 No auth methods could be used.

Before connecting to bitbucket.org, the public key must be registered to my account at bitbucket. To do so, convert the key to OpenSSH format: $ dropbearkey -y -f ~/.ssh/id_rsa | grep "^ssh-rsa" > ssh_key

Then, log into bitbucket.org. Go to AvatarManage accountSSH KeysAdd Key. Then copy the content of ssh_key file generated above. Once this is done, the connection should be successfully made.

Now restart Terminal IDE and try to connect to bitbucket.org:

$ ssh -T git@bigbucket.org logged in as [username]. You can use git or hg to connect to Bitbucket. Shell access is disabled.

Good. That means it's successfully connected to the server.


Cloning my repository:
First create a directory where I can clone my repository into: $ ln -s /mnt/sdcard/www www && cd www

Then clone it from my account at bitbucket.org: $ git clone git@gitbucket.org:[username]/[repository_name].git


Setting up the environment for git:
Let's configure git: $ git config user.name "[username]" $ git config user.email "[username]@[server]"

Git is a very versatile tool and it has some very versatile ways to be configured: $ vim ~/.bashrc --------------------------------- export GIT_AUTHOR_NAME="[username]" export GIT_AUTHOR_EMAIL="[username]@[server]" export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL

With all of this, my old-but-trusting thunderbolt becomes my primary coding device!

That's all!
-gibb

AIX: HOWTO: Apply Patch(es)

This is a collection of AIX tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

  1. Always run the inutoc command to ensure the installation subsystem will recognize the new fix packages you download. This command creates a new .toc file for the fix package. Run the inutoc command in the same directory where you downloaded the package filesets. For example, if you downloaded the filesets to /usr/sys/inst.images, run the following command: # inutoc /usr/sys/inst.images

  2. For selected updates
    To install selected updates from this package, use the following command: # smit update_by_fix

  3. For all updates
    To install all updates from this package that apply to the installed filesets on your system, use the following command: # smit update_all It is highly recommended that you apply all updates from this package.

  4. Reboot the system. A reboot is required for this update to take effect.
  5. That's all!
    -gibb

AIX: gzip File Too Large Error

This is a collection of AIX tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

gzip File Too Large Error

# gzip -d *.tar.gz

gzip: *.tar: File too large

When this happens, it's possible that your system's ulimit value prevents from creating a large file. Execute the `ulimit` command: # ulimit -a < - report all current resource limits # ulimit -f unlimited <- set file resource to unlimited

That's all!
-gibb