Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Suse Tips

News

Linux Tips

Shell Tips

VIM Tips

Screen tips

MC tips

Humor

Etc

There are several large collection of Linux Tips on the Internet. Among them:

For YUM tips one can look at Yum - Linux@Duke Project Wiki

LinuxGazette regularly publishes tips column. See for example More 2 Cent Tips! LG #106

Old News ;-)

[Nov 30, 2007] freshmeat.net Project details for Expect-lite

About:
Expect-lite is a wrapper for expect, created to make expect programming even easier. The wrapper permits the creation of expect script command files by using special character(s) at the beginning of each line to indicate the expect-lite action. Basic expect-lite scripts can be created by simply cutting and pasting text from a terminal window into a script, and adding '>' '

Release focus: Major feature enhancements

Changes:
The entire command script read subsystem has changed. The previous system read directly from the script file. The new system reads the script file into a buffer, which can be randomly accessed. This permits looping (realistically only repeat loops). Infinite loop protection has been added. Variable increment and decrement have been added to support looping.

Author:
Craig Miller [contact developer]

[Nov 30, 2007] Got more than a gig of RAM and 32-bit Linux Here's how to use it By Bruce Byfield

September 21, 2007 | Linux.com
Nowadays, many machines are running with 2-4 gigabytes of RAM, and their owners are discovering a problem: When they run 32-bit GNU/Linux distributions, their extra RAM is not being used. Fortunately, correcting the problem is only a matter of installing or building a kernel with a few specific parameters enabled or disabled.
The problem exists because 32-bit Linux kernels are designed to access only 1GB of RAM by default. The workaround for this limitation is vaguely reminiscent of the virtual memory solution once used by DOS, with a high memory area of virtual memory being constantly mapped to physical addresses. This high memory can be enabled for up to 4GB by one kernel parameter, or up to 64GB on a Pentium Pro or higher processor with another parameter. However, since these parameters have not been needed on most machines until recently, the standard kernels in many distributions have not enabled them.

Increasingly, many distributions are enabling high memory for 4GB. Ubuntu default kernels have been enabling this process at least since version 6.10, and so have Fedora 7's. By contrast, Debian's default 486 kernels do not. Few distros, if any, enable 64GB by default.

To check whether your kernel is configured to use all your RAM, enter the command free -m. This command gives you the total amount of unused RAM on your system, as well as the size of your swap file, in megabytes. If the total memory is 885, then no high memory is enabled on your system (the rest of the first gigabyte is reserved by the kernel for its own purposes). Similarly, if the result shows over 1 gigabyte but less than 4GB when you know you have more, then the 4GB parameter is enabled, but not the 64GB one. In either case, you will need to add a new kernel to take full advantage of your RAM.

Random templates for commands

[Nov 1, 2007] Use range SPident -v to SPindet -vvvv to create baseline of installed packages (SLES only)

You can specific form one to four v and get  more and more detailed reports that documens what is installed on the server.

 

Browse forums.suselinuxsupport.de -- a lot of useful info

Use Smart

Somebash tips

Reading another forum someone pointed this out what a great find a few in here I could see myself using.

http://www.deadman.org/bash.html

Just a few snippets
history => returns a list now you can use the number
!N => where N is the number

Wish to rerun that command
!!

Wish to change that command slightly because of a typo
command that/went/wrong
^wrong^right => Now executes the previous command replacing wrong with right

cp filename filename-old
Now becomes
cp filename{,-old}

Read on been an eye opener for me, see some useful ones in here.

Usefull links for SuSE users in general

Access Your openSUSE Desktop from Anywhere Using FreeNX

Install Downloaded RPM in YAST

by @ 11:11 am. Filed under yast, SUSE Tips & Tricks
Sam wrote in asking me a great question. Sometimes you have a stand-alone RPM that you have downloaded. The problem now is how to get it installed, especially if you want dependencies to automatically be resolved.

Hi Scott,

I want to thank you for writing the “Easiest Linux Guide Ever”. You are a felicitous writer.

If I’m not taking much of your time, I wanted to tell you that I still can’t figure out how to use YAST to install Flash 9.0 (RPM package).

If you can tell me, or point out to me how to proceed, I’d be much obliged.

Sam

Sam,

Thanks! I’m glad you enjoy the writing.

There are two things you could do. You can either install it from the command line using RPM, for example:

rpm -Uvh flash-rpm-package-here.rpm

The problem here is that it doesn’t automatically install dependencies.

The other thing is that you can create your own installation repository (super easy) with createrepo. Install the createrepo package. Then, you create a directory which you will use as the repository. Dump the RPM in there. Then, you run the createrepo command on that directory. For example, you make a directory called /my_inst_src. You then place the flash rpm in there. Then run this command:

createrepo /my_inst_src

You then go into YAST and add that directory as an installation source.

You should now be able to go into YAST and install it just like you do any other RPM. Dependencies should be resolved as usual, should any exist.

Hope that helps.

Scott

Mounting USB Partition in openSUSE Linux

by @ 6:46 am. Filed under How-To, General Linux, General SUSE, SUSE Tips & Tricks
Once upon a time, I wrote a short tip on how to quickly and easily mount a USB stick, pen drive, jump drive, card reader or whatever from a command prompt in openSUSE Linux. There was just a slight problem (or two) with the way I suggested doing this. One such issue is that when you go to access the drive as a regular user, it is read-only.

In most cases, when you put a USB stick into your USB port on a machine running openSUSE, a window will appear asking what you’d like to do. This is done by the Hardware Abstraction Layer service running in the background.

However, what about cases where you need to manually mount a USB stick? For example, if you have a custom-compiled kernel module that you need to load off a USB stick during installation, what do you do? HAL ain’t gonna save your bacon. You’ll want to know how to get the USB stuff up and cracking very quickly with minimal fooling around.

This is a quick re-write of my last tip, except that it is easier for users with regular accounts to work with the USB stick.

In your /proc directory, there is a file called partitions. To see which partitions are available to the system at any given time, you can do cat /proc/partition at a terminal. With no USB sticks plugged in, mine looks like this:


[2001][scott@desk:~]$ cat /proc/partitions
major minor  #blocks  name

   3     0  195360984 hda
   3     1      40131 hda1
   3     2    1959930 hda2
   3     3   29302560 hda3
   3     4  164055780 hda4
[2001][scott@desk:~]$

Now, when I plug in a USB stick (or card reader with a card inserted), this is what I get:


[2001][scott@desk:~]$ cat /proc/partitions
major minor  #blocks  name

   3     0  195360984 hda
   3     1      40131 hda1
   3     2    1959930 hda2
   3     3   29302560 hda3
   3     4  164055780 hda4
   8     0     124048 sda
   8     1     123888 sda1
[2020][scott@desk:~]$

 

You can see that sda and sda1 were added. sda refers to the drive. It’s the sda1 that we care about. Just add /dev/ to the front of that to get the partition we want to mount. Our partition is /dev/sda1.

Next, we just pick a place to mount it to. As su I just create a directory called /media/usbstick or something similar. Then, you run your mount command as su with this syntax:

mount -t [filesystem type] [usb stick partition] [target mount point] -o rw,nosuid,nodev,noatime,uid=1000,utf8,shortname=lower

If I were mounting the USB stick as /dev/sda1 onto the mount point /media/usbstick, this command would look like this:

mount -t vfat /dev/sda1 /media/usbstick -o rw,nosuid,nodev,noatime,uid=1000,utf8,shortname=lower

In most cases, vfat for the filesystem type for a USB stick should work just fine (unless you know it to be something else).

After you run this command, you should be in business. You can open a terminal as your regular user and change and modify the USB partition with minimal trouble.

If you wish to have this USB partition mounted automatically, you can edit your /etc/fstab file to do this.

As su, open your /etc/fstab file in your favorite text editor. Add a line, with this syntax:

[usb stick partition]            [target mount point]      auto       auto,user

If using /dev/sda1 as my usb stick partition and /media/usbstick as my target mount point, I would put this into my fstab:


/dev/sda1            /media/usbstick      auto       auto,user

The only thing you really need to know about this is that it makes it so that regular users can mount the USB stick. Of course, the user who mounts it is considered as the owner of the partition and its files (at least in the case of the USB stick).

Save your file and exit. Then, to mount it, just run the following command (as a normal user, even):

mount /media/usbstick

You will then notice that your user has full access to the USB stick.

To Review:

  1. cat /proc/partitions - find the partition of your USB stick
  2. make a mount point (perhaps in /media) to which you will mount the USB stick
  3. for user accessibility, edit your /etc/fstab file
  4. mount the usb stick

Most of the time, when you plug in a USB stick or card reader (with a card in it), SUSE will just pop open a window asking you if you want to see the contents of the device. However, in cases where that does not happen, or you are using a distribution that doesn’t do that, this is one way to mount a USB partition.



Copyright © 1996-2007 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008