How to replace gdm with lightdm on Fedora

Posted on

Cinnamon does not work well with gdm. And there is no meaning to use gdm when using Cinnamon. On Fedora, the default one id gdm. How to replace gdm with lightdm on Fedora? First, install lightdm if it is not installed yet: # yum install lightdm lightdm-gtk Then, disable gdm service and make the lightdm
Read more

HTML form generation from the database and store value into the database

Posted on

I have a “t_form” table and a “t_attribute” table. It looks a little bit like below. Form table form_id | form_name | description ———————————– 1 | Laptop | Possible attributes are Model, Screen Size, OS, Cd Player 2 | Mobile | Possible attributes are Model, OS 3 | Tablet | Possible attributes are Model, Screen
Read more

How to install JRE for Chrome on Linux x86-64

Posted on

How to install JRE for Chrome on Linux x86-64? Use JRE from Oracle on Fedora Linux x86-64 as the example: Download jre from http://java.com/en/download/manual.jsp?locale=en#lin . Select Linux x64. Install it by # yum install jre-7u40-linux-x64.rpm (the downloaded rpm). Make a softlink of the plugin:$ cd ~/.mozilla/plugins/; ln -s /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so ./ Restart Chrome and browse chrome://plugins/
Read more

How to set and get an environment variable in C on Linux?

Posted on

How to set and get an environment variable in C on Linux? You can use the setenv and getenv POSIX APIs to set and get environment variables. To add or change environment variable: #include <stdlib.h> int setenv(const char *envname, const char *envval, int overwrite); To get value of an environment variable: #include <stdlib.h> char *getenv(const
Read more

Mount Ext4 Partitions in Windows in read-only mode

Posted on

How to mount Ext4 partitions from Linux in Windows in read-only mode? Read-only is required to ensure safety. Mounting is required so that traditional programs can use the partition without any changes. Ext2Fsd is a great tool for this. Ext2Fsd is a file system driver which allows accessing (both reading and writing) ext2, ext3 or
Read more

Run cron jobs with environmental variables for an account

Posted on

A common error for configuring cron is to use environmental variables for an account in the cron command. However, cron will run the commands without these variables defined. In the crontab -e, adding . $HOME/.profile before the commands play the trick. For example: 0 */8 * * * . $HOME/.profile; ~/bin/my-command Cron is started by
Read more

Installing WordPress in a sub directory while working for the whole site

Posted on

How to install WordPress in a sub directory while working for the whole site? Putting the WordPress files in the root directory seems messy. A method is introduced here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory The process to move WordPress into its own directory is as follows: Create the new location for the core WordPress files to be stored (we
Read more

Installing Fedora 19, Error “you have not created a bootloader stage1 target device”

Posted on

Installing Fedora 19, Error “you have not created a bootloader stage1 target device” . It seems appear from Fedora 15: http://forums.fedoraforum.org/showthread.php?t=271743 This can be solved by adding noefi nogpt to the kernel parameters when booting the Linux for installation in grub as follows. Note: the “_” between nogpt and root is the cursor, not the
Read more

How to change the maximum execution time and memory size allowed for PHP

Posted on

I see this message in the error log of httpd: PHP Fatal error: Maximum execution time of 30 seconds exceeded in and PHP Fatal error: Allowed memory size of 268435456 bytes exhausted How to change them to a longer and larger value? To change the allowed maximum memory usage of PHP: Set memory_limit = 256M
Read more