Category Archives: Linux

Fluxbox menu: open two programs at once

Sometimes we need to open always two programs at once. For example I always need to open “navit” and restart “gpsd” at the same time in order to make navit receives gps signal from gps-bluetooth-dongle (if gps dongle is turned on at a later time).

Fortunately this can be easily done in fluxbox. Just modify the existing navit menu line in “~/.fluxbox/menu” from:

[exec] (navit) {/usr/bin/navit} </usr/share/pixmaps/navit.xpm>

to:

[exec] (navit) {/usr/bin/navit & sudo /etc/init.d/gpsd restart} </usr/share/pixmaps/navit.xpm>

By using ampersand (&) you can add another command to start different program.

That’s it!

Reset user password on Debian Squeeze

Sometimes as an IT Administrator you are requested to reset a user password. Here is how I did it:

1.  Boot grub and choose recovery mode and do not press enter.

resetpwd_012. Press “e” key, go to the end of line “linux /boot/vmlinuz-…” and add a space (press spacebar once) and type “init=/bin/bash” and press “Ctrl-x” to boot.

resetpwd_023. After finished booting, type “mount -rw -o remount /” and press enter.

resetpwd_034. Type “passwd <username>” and press enter. Replace <username> with the real username whose his/her password needs to be resetted.

resetpwd_045. Type in a new password and press enter.

6. Type in the same password for confirmation and press enter.

7. Type “reboot”.

8. That’s it!

Setting ntpclient on Tiny Core Linux

Sometimes it is annoying to have unsynchronized clock on the system, especially if your mainboard is old and the BIOS battery don’t hold the charge very long. Fortunately there is a program to automatically synchronize the system time on Tiny Core Linux. Here is how I installed and configured it:

1. Install ntpclient on boot:

ntpclient01

2. With your favourite editor, create a script file called “ntpclient_startup” on directory “~/.X.d”:

ntpclient02

3. Save it and make it executable.

4. Restart your system.

5. That’s it!

Bluetooth mouse on Tiny Core Linux

Here is how I connect my bluetooth mouse on Tiny Core Linux:

1. From “Apps” install “bluez”, “dbus”, “python”, “dbus-python-2.7” and “pygobject-2.7”:

bluez

dbus

python

dbus-python

pygobject

2. Check local bluetooth device:

hcitool dev

hcitooldev

3. Press button to make the mouse discoverable and type:

hcitool scan

hcitoolscan

4. Check if we can create connection to the mouse:

sudo hidd --connect 00:02:76:16:14:5C

5. Now we should get connection to the mouse, but we want to automate the connection. Using “simple-agent” we create a new device for the mouse. PIN Code is 0000.

simple-agent hci0 00:02:76:16:14:5C

simple-agent

6. Make the mouse “Trusted”:

dbus-send --system --type=method_call --print-reply --dest=org.bluez "/org/bluez/4506/hci0/dev_00_02_76_16_14_5C" org.bluez.Device.SetProperty string:Trusted variant:boolean:true

dbus-send

After step 6, please check to make sure that file “trusts” in the device folder exists and mouse address is written in that file. This is important for the automatic connection.

7. At this point if the mouse has lost connection it should be reconnected automatically (for example turn the mouse off and turn it on again). Next step is to make this connection persistent across boots. Install “squashfs-tools-4.x” if it’s not already installed:

squashfs-tools

8. Create device folder for mybluetooth extension:

mkdir mybluetooth
mkdir mybluetooth/var
mkdir mybluetooth/var/lib
mkdir mybluetooth/var/lib/bluetooth

9. Copy folder 00:15:83:12:3E:23 and its content to mybluetooth folder:

cp -R /var/lib/bluetooth/00\:15\:83\:12\:3E\:23/ mybluetooth/var/lib/bluetooth/.

10. Create “mybluetooth” extension:

mksquashfs mybluetooth mybluetooth.tcz

11. Copy extension to tce folder:

cp mybluetooth.tcz /mnt/sda1/tce/optional/.

12. Edit onboot.lst file:

echo mybluetooth.tcz >> /mnt/sda1/tce/onboot.lst

13. Now bluetooth mouse should automatically connected to Tiny Core Linux at boot time. Happy bluetoothing!

FALL FITNESS: STAY HEALTHY THIS AUTUMN WITH THESE HEALTH TIPS

running

The start of September means many things for families all across the country: The leaves are slowly beginning to change colors, the days are getting shorter and the sky is becoming darker earlier, and the temperature outside is dropping steadily each and every day. While this transitional time of year is exciting and a favorite for many people, these changes can also be very stressful and hectic for those trying to keep up with their health and fitness routines of summer. Visit https://www.wtkr.com/.

As the weather changes and the summer temperatures disappear, it can be very difficult to stay motivated. However, with the changing of the season comes a new time to rethink and restart your health and fitness routine. Plus, kicking off a fresh new fitness program this autumn will also help you create good habits to transition into the upcoming winter months.

Whether you are looking to bring your healthy summer habits into the fall season, or you want to start a fresh new workout regime this autumn, it is important to plan ahead for seasonal changes and learn about the best ways to make the most of the weather outside. To help you get started, we have put together these fall fitness tips that will help you stay healthy and keep in shape this season:

1. Get Outside

The crisp autumn air and gorgeous fall colors outside make the perfect backdrop for your daily workouts. If you are looking to take in some fresh scenery and soak up the smells and sights of the season, head to some local parks or trails in your area to try out walking, hiking or cycling. These simple activities are great for both adults and children, and provide just enough exercise to get your heart pumping and your legs moving. Or, if you are lucky enough to live near water, try kayaking or canoeing for an excellent whole-body workout.

2. Dress In Layers

One of the most important things to remember whenever you are exercising outside in cooler temperatures is to dress appropriately. For instance, wearing wind-shielding clothing and dressing in layers will help you to stay warm and make your fitness activities more enjoyable. While you may feel chilled before your body gets a chance to warm up, layers will help protect your body against the outdoor elements and will keep you warm during your workout. Try out Deccanherald.

3. Stick With Your Fitness Program

While it may be tempting to roll over and hit the snooze button on those particularly chilly mornings, you should try and stick with your exercise routine for at least a month. This is because it takes about four weeks for behavioral patterns to sink in and for your body to adapt to the lifestyle changes you are making. Exercising takes constant commitment and motivation. Therefore, be sure to schedule it into your daily routine, just like you would with chores or meals, so that you do not give up on your fitness program so easily.

Do you have any more tips for staying motivated and active during the autumn months? Be sure to let us know in the comments below. In the mean time, be sure to check in with your local YMCA to learn about the beneficial health and fitness classes we are offering this fall.

Set or change mp3 Tag on Linux

Some time ago I was asked by a friend of how to change the information of mp3 file. After a little bit of googling, I found a tool called “id3tool” in debian squeeze. To use it just install using apt:

apt-get install id3tool

To see the functionality of this tool, just type:

id3tool -h

id3tool

Happy Tagging!

CD burning from command line

This is how I burn ISO image using command line on Debian Squeeze:

1. Install “wodim” if it’s not already installed:

apt-get install wodim

2. Check available device:

wodim --devices

wodim_devices

3. Burn ISO image (in this example CorePlus-4.7.7.iso from folder Downloads):

wodim -v dev=/dev/scd0 Downloads/CorePlus-4.7.7.iso

screenshot-20130520@043532

4. That’s it. Happy CD burning!

Install flash player on Tiny Core Linux

Here is how I install flash player on Tiny Core Linux:

1. Download Adobe Flash Player version 11.1.102.63 from Macromedia archive server:

wget http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp_11.1.102.63_archive.zip

2. Extract the downloaded file:

unzip fp_11.1.102.63_archive.zip

3. Create directories:

mkdir myflash
mkdir myflash/usr
mkdir myflash/usr/local
mkdir myflash/usr/local/firefox-official
mkdir myflash/usr/local/firefox-official/plugins

4. Copy “libflashplayer.so” to “plugins” directory:

cp fp_11.1.102.63_archive/11_1r102_63_32bit/libflashplayer.so myflash/usr/local/firefox-official/plugins/.

5. Install “squashfs-tools-4.x.tcz” using “Apps”:

squashfs-tools

6. Create “myflash.tcz” extension:

mksquashfs myflash myflash.tcz

7. Copy “myflash.tcz” into tce directory:

cp myflash.tcz /mnt/sda1/tce/optional/.

8. Append “myflash.tcz” in “onboot.lst” file:

echo myflash.tcz >> /mnt/sda1/tce/onboot.lst

9. Restart computer, start Firefox and open a website with flash.

flashplayer

10. Enjoy!

How to Create a Healthy Fitness Routine

Maintaining a regular fitness routine can be challenging in the beginning. For many of us, it might feel like a chore that’s only too easy to talk ourselves out of. But by following these steps below, you’ll be surprised how simple it is to commit to a healthy fitness routine. Read more about volume pills benefits.

Fitness Routine Tips

One of the easiest ways to get started is to set a realistic plan. Start small before gradually building momentum.

1. Assess Your Fitness Level

Most of us have a good sense of our general capabilities. But doing an initial assessment and recording your baseline scores gives you a starting point from which to measure your progress. Your overall fitness includes endurance, strength, balance, flexibility, and body composition or body mass index (BMI).

Your BMI measures measures height and weight, while body composition measures your fat and lean muscle. However, it is important to be aware that BMI rate is not always an accurate representation of body fat or indicative of where that fat is concentrated.

Therefore, it is helpful to enlist the support of a personal trainer, as they can also measure waist circumference and establish whether you are carrying excess fat around the organs. A personal trainer can also keep you motivated and accountable to ensure that you don’t lose enthusiasm before you have obtained the results you were looking for. Alternatively, apps such as Google Fit, MyFitnessPal, and Fiit can help measure and track your overall physical fitness. These are the latest Testoprime reviews.

2. Set Realistic Fitness Goals

If you’re just starting out, it’s best to start slowly and incrementally increase the number of exercises you do each day until you get a routine you can stick to. If your goal is to force yourself to do an hour of daily exercise straight off the bat, it’s less likely you will stick to it in the long term. This is why it is better to pace yourself. This is supported by research published in the British Journal of Sports Medicine, which found that incremental exercise training is more likely to have a positive effect on motivation.

3. Be Consistent

For any plan to be successful, consistency is key. It is much better to exercise for a few minutes at a time each day than to exercise for an hour every once in a while. According to a study published in the National Library of Medicine, multiple short bouts of exercise were proven to be effective in motivating people to exercise more and had a positive impact on cardiovascular health and obesity.

You are more likely to maintain an exercise routine over time if you make it a habit and do it regularly. Research shows that once you replace a negative habit with a healthier one, the effectiveness of your long-term fitness strategy goes up.

4. Schedule Your Workouts

Once you have a realistic fitness plan in place, schedule your exercises at the same time every day to get into a rhythm. Organizing your schedule and expectations ahead of time makes it much easier to commit to a routine and make it a regular part of the day, like brushing your teeth.

Rename multiple files on Linux

“rename” is a very handy tool that we can use to rename multiple files on Linux. To change all upper case filenames to lower case just use:

rename 'y/A-Z/a-z/' *

To change filename img_0001.jpg .. img_XXXX.jpg to Urlaub_0001.jpg .. Urlaub_XXXX.jpg just do:

rename 's/^/Urlaub/' img*

To display the manual just type:

man rename

For more “rename” information click here.