|Configure GDM3 to display random images from directory upon login screen.|
A way to random background images in GDM3 - Debian 6. Should be applicable to other distributions, the only difference being configuration file paths.
If you know of a simpler approach please let us know.
PRECAUTION: I'm just a newbie customizing a family laptop, this may not work, or slow down or expose your system in ways i do not understand.
Follow procedure at your own risk.
1- Creating PostLogin bash script. #as root
cp /etc/gdm3/PostLogin/Default.sample /etc/gdm3/PostLogin/Default
2- Editing PostLogin bash script, this will take a random image from directory and make it the background image #as root
Add the following to /etc/gdm3/PostLogin/Default and adjust the path to point your images directory.
#change background image
file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
path=`readlink -f "$dir/$file"` # Converts to full path
cp $path /wherever/you/want/background.jpg
3- Create the background image and change permissions for all users to change background image when logging out.
chmod 777 /wherever/you/want/background.jpg #do not know if this is necessary
4- Editing GDM3 configuration file #as root
Uncomment the following line and change background image path
And adjust config file to your likings.
5- Restarting GDM3
invoke-rc.d gdm3 reload
- Kalyan Kumar Pasupuleti
- Kalyan Kumar Pasupuleti B-Tech(Information Technology). • RedHat Certified Engineer(RHCE) • Directory Services and Authentication Certificate of Expertise(LDAP) • Red Hat SELinux Policy Administration Certificate of Expertise(SELinux) • Network Services Security Certificate of Expertise (Network Services) • RedHat Certified Virtualization Administrator(RHCVA) • Red Hat Certified Security Specialist (RHCSS) Working as Cloud DevOps engineer
Thursday, April 28, 2011
|This is a short tutorial explaining how to post to Twitter using command-line in Linux, without needing to even open up your web browser.|
First, install the curl package:
sudo apt-get install curl
Next, create a script anywhere in your $PATH, for example twitter.sh inside ~/bin, where ~ is your home directory (make sure ~/bin is included in your $PATHvariable, in case echo $PATH doesn't return it, edit~/.bashrc and add a line like this: export PATH=/home/USER/bin/:$PATH).
The script twitter.sh should contain the following:
curl -u USER:PASS -d status="$*" http://twitter.com/statuses/update.xml > /dev/null
echo "Message sent!"
Replace USER and PASS with your Twitter username and password, and then make the script executable:
chmod 755 ~/bin/twitter.sh
And now test it:
twitter.sh Hello, world! This is a test.
So just use it as:
twitter.sh YOUR MESSAGE
|Wget is nice little piece of software that everyone should know. With it you can check site, download from FTP an entire collection of files or a photo gallery. Just open your terminal and these steps|
Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
GNU Wget has many features to make retrieving large files or mirroring entire web or FTP sites easy, here are some interesting options.
All these commands must be used from linux terminal.
Basic use download a package knowing its http (or ftp) URL:
Using Wget for Recursive Downloads
wget -r http://my.site.todownload.com/
The -r command tells wget to recursively download everything from the listed url.
Using Wget for Recursive Downloads but limit the number of levels to 2
wget -r -l2 http://my.site.todownload.com/
Now the -r does the same as above the -l tells wget to limit to that
number of levels here 2 levels deep (otherwise the defualt is 5)
Using Wget for Recursive Downloads but limit the type of files you want to download
wget -r -A.pdf -R.htm http://my.site.todownload.com/
This one tells wget to do a recursive get and Accept all files with .pdf extension and reject all files with .htm extension
Using Wget for Recursive Downloads from a FTP with authentication
wget -r ftp://username:email@example.com/path/to/download
Here you tell wget to download from FTP with userid and password
Using Wget to check dead link on your site
wget spider -r -o log.txt http://yourdomain.com
In this example we tell Wget to act like a web spider (Wget will
behave as a Web spider, which means that it will not download the
pages, just check that they are there), and put results in the file
log.txt, so you can open it and search for a list of broken links.
Using Wget to download a photo gallery
for i in `seq -w 1 100`; do wget http://www.mysite.com/images/DSCF00$i.jpg; done
In this example we run a cycle that go from 1 to 100 and every time
download a different URL, really useful for quickly download a gallery
with no links.
Finally, I forgot to tell you that wget is also usable by Mac and Windows (requires Cygwin)
Wednesday, April 27, 2011
WARNING: According to eApps policy if you edit any system files manually, they might not support the changes you have made. Use at your own risk.
NOTE: If SQLite is installed in HSPc, do NOT uninstall it after having done this.
SSH into your VPS as root and follow these instructions.
Firstly, create a source directory to work from:
mkdir /usr/local/src/yumcd /usr/local/src/yum
Then, download the following packages:
Now install them:
rpm -Uvh *.rpm
Finally, update your system:
yum -u update
All done! Now if you want to install an application, just run:
yum -y install application
[OPTIONAL] You may also want to delete the source directory:
rm -rf /usr/local/src/yum
Mozilla Firefox 4 has finally been released after such a long development cycle, when compared to the development of the recent releases of Internet Explorer and Google Chrome.
For those who have been waiting all this time. It can be painful waiting for the new version of Firefox to show up on the default repositories.
Here is a way to install the new Firefox 4 without having to wait,
Take a backup of your current Firefox user profile and settings. Even though it’s generally safe to skip this step, as the settings will stay on the computer even if your uninstall Firefox. It’s always better to be safe then sorry.
tar cvzf firefox-backup.tar.gz ~/.mozilla
Install the Spot Repository. Third party repositories generally are updated faster then the default repositories. So sometimes third party repositories are needed if you wanted the latest software as soon as they are released.
su -c 'wget http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo -O /etc/yum.repos.d/fedora-firefox4.repo'
Remove your current Firefox installation. If you plan on having more then one Firefox installation then you can skip this step.
su -c 'yum remove firefox'
The repository will need to be enabled before we can use it.
su -c 'yum –enablerepo fedora-firefox4'
Install the new Firefox 4 package onto your system and enjoy!!
su -c 'yum install firefox4'
Tuesday, April 19, 2011
|Nowdays is used everywhere for or crucial information management purpose. In this Article I have tried to explain basics of LDAP and also OpenLDAP basic configuration. Please let me know your queries and comments on it. Thanks.|
LDAP & OpenLDAP
Directory Structure -
Five Major Characteristics of Directory Service -
Difference between Databases and Directory Services
Many people ask that can we use Database instead of Directory Service
SN Databases Directory Services
1. Information has more writes and reads More reads only, very less writes
2. Transactions, rollbacks, Transactions, rollbacks, write locks write locks are more important are less important
3. More Overheads Less Overheads
What is LDAP ?
LDAP vs X.500:
Main difference in LDAP and X.500 is LDAP uses TCP stack and X.500 uses OSI stack. Thats the reason LDAP is lightweight.
Uses of LDAP:
Directory Information Tree:
LDAP stores information in Directory Structure. Pictorial view of Directory Structure is called Directory Information Tree. See Below Figure:
dn: ou=groups,dc=example,dc=com dn:ou=people,dc=example,dc=com
Please note that in our example we have used OpenLDAP as a LDAP server.
Please visit www.openldap.org for more details.
Features of OpenLDAP:
Components of OpenLDAP:
I have divided slapd.conf into 4 Parts
1. Schema Inclusion
2. Backend DB & Directory Specific
3. Access Control
1. Schemas are used to define Attributes
2. It adds extendibility of LDAP
3. We can customize or add schemas
4. Generally Schema files are stored under /etc/ldap/schema
Schema Files Description
core.schema OpenLDAP core (required)
cosine.schema Cosine and Internet X.500 (useful)
inetorgperson.schema InetOrgPerson (useful)
misc.schema Assorted (experimental)
nis.schema Network Information Services (FYI)
openldap.schema OpenLDAP Project (experimental)
Libraries or modules
- Generally libraries are stored under /usr/lib/ldap
- It adds functionality and makes OpenLDAP modular
- OpenLDAP uses mainly following 2 embedded databases to store information
- BDB Berkely DB Transactional Backend
- HDB Hierarchical variant of BDB
- DB is stored under /var/lib/ldap
- LDAP interchange format
- Collection of entries separated by new line
- Mapping attribute names to values
- It is used to import or export information from LDAP directory
- LDAP client is used to connect to LDAP server
- You can add, edit, delete Directory entries
- Distinguished Name (DN) & Relative Distinguished Name (RDN)
DN is like the absolute path between root of File System and file
RDN is like Filename
Entry ---- > dn: cn=admin,dc=example,dc=com
In above entry
DN is cn=admin,dc=example,dc=com
RDN is cn=admin
- Attributes are used to store the values
- Attributes can be one or more values
- Attributes are defined in Schema Files
- In LDIF files, Declare Attribute by following way:
In above example objectClass is Attribute and organizationalUnit is value.
2. objectClass Attributes
- Compulsory attribute with atleast one value
- It acts as a template for the data to be stored