Monmonja Programming Blog

December 6, 2008

Faster way to resize a picture in Linux

Filed under: Ubuntu,linux — Tags: — admin @ 12:46 pm

Here is the fastest way to resize a picture in linux through command line.

Download imagemagick and install it using the ./configure, make, make install or if your using Ubuntu you could sudo apt-get install imagemagick

Open terminal (Alt+F2 gnome-terminal)
Go to the director of your picture, eg desktop
cd ~/Desktop
Convert your picture
convert -resize 100x100! myPic.jpg myPic.png

Explanation:
convert is the program you need
-resize is the function you need for the resizing
100×100! – destination width and height, add ! to force it to 100×100, remove ! and it will respect the ratio of the picture
myPic.jpg is the source file or the file you want to resize
myPic.png is the destination file after the resize is done

Hope it helps

December 5, 2008

Remove Sounds in Terminal in Ubuntu

Filed under: Ubuntu — Tags: — admin @ 1:04 am

Here is how to remove the sounds in terminal in ubuntu.
* Go Edit
* Profile Preferences
* On the General Tab unlick the Terminal Bells

Hope it helps

November 8, 2008

Make iso from folders, files in Ubuntu

Filed under: Ubuntu — Tags: — admin @ 1:08 am

Making iso in ubuntu is fairy easily task to do, here is how i did it.

* Open brasero
* Choose Data project
* Find your files and just press the Add (plus button at the top left corner)
note: you cannot drag and drop
* Then select Burn

If you insert a cd/dvd it will as you for either burning it to your cd/dvd or to an Image File, choose the Image File
If you didn’t insert a cd/dvd, then there is only one option and that is the Image File

* Click burn and it would be at your home folder (Alt+F2 then nautilus)

Then you can save or distribute your iso files.

November 2, 2008

Installing phpmyadmin in ubuntu

Filed under: Ubuntu — Tags: — admin @ 12:10 am

Here is a simple way of installing phpmyadmin on ubuntu

sudo apt-get install phpmyadmin
cd /var/www
sudo ln -s /usr/share/phpmyadmin/ phpmyadmin

November 1, 2008

Fastest and Easiest way to install MySQL,PHP&Apache on Ubuntu Ibex

Filed under: Ubuntu — Tags: , , , — admin @ 7:02 pm

Here is the command for the fastest and easiest way to install MySQL,PHP and Apache in Ubuntu Ibex
* Open terminal (Alt+F2 then gnome-terminal) and type
sudo tasksel install lamp-server

Done, just follow the wizard and your ready to go. To check if its okay
http://localhost

If it doest show you “It works” you need to start it. To start the apache
sudo /etc/init.d/apache2 start

These are optional
Enable .htaccess
sudo gedit /etc/apache2/sites-available/default
Change the line 11 (AllowOverride None, under directory /var/www) to AllowOverride All
Save and restart the apache
sudo /etc/init.d/apache2 restart

Enable Mod Rewrite
Open terminal and type
sudo a2enmod rewrite
Restart the apache
sudo /etc/init.d/apache2 restart

October 9, 2008

Unmount Not Connected Devices on Ubuntu using the nautilus

Filed under: Ubuntu — admin @ 9:55 am

Here is a small tutorial on how to remove Devices on Ubuntu, devices that had been removed from the computer but still visible on the Side Pane, to understand why you can’t remove this folder is that in Ubuntu and most Unix system they required you to use the root account in order to mount/unmount stuff and so to unmount it you need to use the root user.

1) Alt + F2
2) gksudo nautilus
3) Right click on the folder the select Unmount

Hope this helps

August 10, 2008

Ubuntu Alarm

Filed under: Hacks,Ubuntu,linux — Tags: , — admin @ 10:12 am

I had been looking for some alarm related software in Ubuntu, and i had found a solution using vlc together with cron job, so i had made my own alarm.

First Create a shell script
> sudo gedit alarm.sh
> Enter the following
#!/bin/sh
/usr/bin/amixer -c 0 sset Master,0 99%
/usr/bin/vlc --intf dummy --repeat /home/almond/gising.mp3
> Save and exit
> chmod +x ./alarm.sh

What this does is create a file what will set the mixer to 99 volume (amixer -c 0 sset Master,0 99%) and call vlc to play your mp3 using a dummy interface module (no interface inshort) and repeat the music unlessly. Then make the file executable.

Next stuff is to make an automatic/cron job for you (by default this will use vim as editor)
If the following does not work, follow the alternative instruction
> crontab -e
> press i to insert the following line
* 7 * * 1,2,3,4,5 /path/to/alam.sh
> exit vim (esc then :wq)

(This will make the alarm every 7am from monday to friday)

Fujitsu Computer Systems Corporation

Alternative instruction
> touch crontab
> gedit crontab
> Enter the following
* 7 * * 1,2,3,4,5 /path/to/alam.sh
> crontab -u crontab
> sudo /etc/init.d/cron restart

What this does it create a new cron file under you username and restart the cron process.

If you want a more simple approach try this one
http://alarm-clock.pseudoberries.com/, there is a guide on how to install it on linux.

I used the cron approach, now how to stop the music?
This will be fun coz you have to really wake up and type something or open system monitor to stop all vlc. If you cannot locate your system monitor then type these commands
> top
memorize the process id of vlc and press q
> kill -9

Hope this does wake you up, just don’t go back to bed after stopping the music.

Older Posts »

Powered by WordPress

Monmonja Programming Blog is Digg proof thanks to caching by WP Super Cache