Skip to main content

Posts

Showing posts with the label linux

cssh, PuTTYCS - keyboard replicators for clustered administration

If you administer a bunch of identical Linux boxes, and have to run same commands on all of them, say like manual deployments, restarts etc. – you probably log in to each of them manually and run commands. Or at best you would have a script looping through them and executing an ssh on each. However there are times when you need to be interactive on each box, yet run the same and/or series of commands. In those cases, cssh on Unix (with X) and PuTTYCS on windows are a godsend for any administrator.

Ubuntu - Wayland - Excitement after all

Mark Shuttleworth recently announced that Ubuntu will do away with GNOME, The good old, desktop environment – as the default. Making Unity, (which is the current default for netbook version) THE default. The switch was barely absorbed by ubunters and is now followed by another announcement of replacing the X.org server with a newer, minimalist X server - Wayland. Wayland is still in alpha. So, for the pessimists this announcement and the switch is a little cavalier. For the optimists, this is a huge step towards a better GUI. To put simply, Wayland is different from X.org in that it (Wayland) leverages the newer kernel's ability to do much of the work X.org's complex layers do. It natively uses 2D and 3D support from OpenGL.Technically – Quoting Wikipedia Wayland uses existing technologies in the Linux kernel such as the Direct Rendering Manager (DRM), kernel mode-setting (KMS) and the Graphics Execution Manager (GEM) batchbuffer in order to provide a minimal display ser...

Gmail Voice and Video Chat: now on Linux

Google released its voice and video chat plugin for linux. This is long awaited and now much cherished by linux lovers. However, my first hand experience was a little let down. My browser crashed a few times, and the calls dropped with crashes. I realised it had to get a system restart before it could work well. I only tried audio call, given there is no web cam on my desktop. I dont see any problems now, hopefully it will stay that way. Will update this post if this change.

Update multiple Dynamic DNS servers using ddclient

Running Linux, ddclient is highly suggested software for updating DynamicDNS servers. It supports updating a variety of servers. Some of them are dyndns.com opendns.com and no-ip.com. ddclient supplies documentation to update multiple hostnames (on the same server) but does not have an example with multiple servers. Here is an example that covers all those combinations. ## ddclient configuration file daemon=600 # check every 600 seconds syslog=yes # log update msgs to syslog mail-failure=your@emailaddress.com # Mail failed updates to user # requires sendmail installed. pid=/var/run/ddclient.pid # record PID in file. ssl=yes #use ssl ## Detect IP with our CheckIP server use=web, web=checkip.dyndns.com/, web-skip='IP Address' protocol=dyndns2, login=user1, password=YOURPASSWORD \ some.selfip.org protocol=dyndns2, login=user2, password=ANOTHERPASS\ someother.selfip.org protocol=dyndns2, server=updates.opendns.com, login=user3, password=psswd3 \ home

Linux/Unix welcome messages

There are instances where you want to display a message in shell before/after terminal login in Linux or Unix. There are however many ways Unix/Linux lets you customize this. /etc/issue This is a text file, contents of which are displayed at the login prompt.   /etc/motd Also called message of the day. You can add some text to motd and it will be displayed after successful login Only ssh Users Some times you want to display a welcome message only to ssh logins. To achieve this, You create a file somewhere on the file system – say /etc/ssh/sshd_welcome Add or edit the line Banner /etc/ssh/sshd_welcome in /etc/ssh/sshd_config

My installation plan for Linux

This is note to self. All the applications I need to install after a clean install of a linux. I am trying to get to a more productive way of doing this. But atleast this will serve as a todo list javasdk tomcat6 grails adobe air google-gae-java flickr uploader Eclipse web git andriod svn grails FireFox addons collection NO ppa conky - conky gnome-do gnome-do-plugins gnome-do-docklets ccsm - compizconfig-settings-manager Keepass - keepassx PPA google-chrome Dropbox - nautilus-dropbox shutter opera sudo apt-get install conky compizconfig-settings-manager keepassx gnome-do gnome-do-plugins gnome-do-docklets subversion git-core sudo apt-get install google-chrome nautilus-dropbox shutter opera Update: For a Server sudo apt-get install gadmin-tools

Cheapest USB wireless adapter For Ubuntu

I found this Trendnet 54Mbps 802.11bg Wireless USB 2.0 Adapter. Trying to make my desktop wirefree, I got this. I was doubtful, but works flawlessly in ubuntu. You just plug and play. Supports WPA, WPA-PSK. Microcenter is carrying a special on this one until Nov 1. You can get it for $7 (+tax).

DONT - Sudo without password

Reading this post , I feel the urge to burst out. This kind of tweaking is not really *adminy* . A true Admin would rather kill the terminal he sudo-ed in, to be even sure. Enabling your user to become a sudo-er is a privilege. Like in the movie, Spider-man - Great power comes with great responsibility. The extra prompt for password might be a little annoying for frequenters. But completely overriding it is appalling at best, if not awful abuse of the said privilege. For all the interns who joined as admins, a friendly advice - security defaults have a place in unix. They are set after a lot of research in usage (especially by admins before you). So leave them alone, as much as you can. Security is not for ease of use. The harder a password the better, so read that post with admonition. For the new *nix users - If you just want to do this, Dont bother installing *nix. Go with an easy mac or better yet, stick with Windoze ME (I am rude, am I not?). Well that feels happy now. I h...

Ubuntu Broken Upgrade, Lost GUI, /dev/null: Permission denied

I am toying with Karmic's alpha releases. So, in comes a new partial upgrade rolled out and I chose to get it. At the end of the upgrade, I had a rare - stuck linux - situation. So I hard rebooted; Only to find that the system now restarts to a GDM that is broken. It gets to a blank screen with a *loading* mouse icon. I was contemplating a complete redo(download the daily build for karmic and install it). However, I thought its worth troubleshooting. So on that blank GDM screen, I pressed Ctrl+Alt+F2 to open a tty. When I logged in, I got a lot of /dev/null: Permission denied Apparently, My upgrade dint finish well. First thing that came to my mind is to reconfigure the whole setup. sudo dpkg --configure -a But I was getting the same errors /dev/null: Permission denied . Pretty much everything I did got me to the same error. I rebooted to my Jaunty install. A quick search showed me how I could install this all important /dev/null . All you have to do was to remove and re...

Sleepless with Windows updates

I dont (DONT) run windows. I have Jaunty installed on my wife's new Dell 1545. My old desktop, which I rarely use has windows XP. On the 1545, I installed a vista guest operating system on virtual box . (I am still loyal to linux, I need windoooze to access vpn at one consulting op). So I am there. But last night was awefule' at its best. I am not sure if I got on the wagon late, but the vista took a whooping 4 hours updating a lot of stuff. This included IE8 update, SP2 update (and all of the regular crap), restarting after each one of them. Involving a user input too, so I cant just sleep. After the whole thing I got a 8GB *bulge* on the partition it was installed. To put that in a perspective - A clean vista install takes 6.4 - 7GB and installs in 45 mins(approx). All the while, I dont know when and what it is downloading, installing, or phasing (what the heck is stage 1 of 3, anyway - after it says *Installed updates, restart now*). LOOP THIS FOR 4 HRS :D For re...

How to Make a Local (Offline) Repository in Ubuntu / Debian

If you are in a place where you dont have internet (or have a bad one) You want to download .deb packages and install them offline. Each deb file is packaged as a seperate unit but may contain dependencies (recursively). apt-get automagically solves all the dependencies and installs all that are necessary. Manually install deb files one by one resolving each dependency would be tedious. A better approach is to make your own local repository. Before you actually make a repo, You need *all* deb files. You dont practically have to mirror all of the packages from the internet, but enough to resolve all dependencies. Also, You have to make sure, you are getting debs of the correct architecture of your system (i386 etc) # 1. make a dir accessible (atleast by root) sudo mkdir /var/my-local-repo # 2. copy all the deb files to this directory. # 3. make the directory as a sudo dpkg-scanpackages /var/my-local-repo /dev/null > \ /var/my-local-repo/Packages # 4. add the local repo to sour...

Quickly: Command history in Linux / Shell

If you are like me, doing a lot of command line in linux (Bash) shell, there are a few commands you do very often. The following commands will make your life a lot easier to quickly go back in command history. [ !! ] or better yet [ sudo !! ] - [ !! ] is an alias for last run command. One of the best use of this is - Sometimes, you type a command and the shell hits you back with a root privileges required message. You dont have to copy the command and run again. just run [sudo !!] [ history ] - just spits out ~/.bash_history with line numbers. A good use of this is piping it to grep to find something. The line numbers can be used to execute the command following it. Say for example, [ history | grep find ] lists the previous searches (okay, it also shows all commands with "find" anywhere in the line - but a filtered, smaller list). $history | grep find 457 find *.wav 462 find *.wav -exec lame --preset fast extreme '{}' '/tmp/mp3/{}' \; 487 find *.wa...

Use meld as git diff gui viewer

Meld is a popular diff viewer in linux (gnome). It is extremely light weight. UI is very similar to WinDiff. Although it is not comprehensively robust yet, It is still a great help for people like me, handicapped to read huge diffs in command line. Git is awesome when it comes to managing version control, esp in command line. However, while committing, you would want to check what changes are going in. git gives git-diff for this purpose. Spitting out a (unified) diff format text for showing changes. But reading this could be cumbersome at times. To visually inspect git diff, you can use the latest version of meld. The version that comes with debian or ubuntu 1.1.5 lacks git support. You need to build the latest meld (I got 1.2.1) from source. Here is how you can do it. resolve dependencies: sudo apt-get install pyorbit pygtk gnome-python intltool Get the source from here (opens new window). Extract the archive. In the exploded directory, run make. It makes an executable mel...

Numeric and String comparision in Shell

String Comparision is treated differently in Shell. -eq and -ne operators cannot be applied for this. -eq (and the clan) are applicable only when you are comparing numerics. If you have a String comparision, use = (sh) or == (bash). Examples ##GOOD #!/bin/sh if [ "$1" = "set" ]; then echo "Setting" else echo "Displaying" fi ##ERROR if [ "$1" -eq "set" ]; then echo "Setting" fi in bash #!/bin/sh if [ "$1" == "set" ]; then echo "Setting" fi

Intrepid: Keyboard repeats keys too fast - Sovled!

Yet another weekend, Yet another fix :).. Well a workaround, actually.. This has been a problem for a while. Ubuntu Intrepid has very annoying too fast key repeat rate. and the gnome-keyboard-properties ignores any setting changed. There were some workarounds proposed like xorg.conf . they dint work on my lappy. I also played around experiments, in vain . Miserably. But very well pointed out by Jorge Peixoto de Morais Neto , You can set the repeat settings with kbdrate just add the following line in /etc/rc.local #/etc/rc.local kbdrate -r 25 -d 500 This should solve the quick repeats. If this fixes your issue, Please contribute at the bug in launchpad.

Slow Login Intrepid Ibex - X is the problem?.

I have upgraded my laptop to the latest Ubuntu (Intrepid Ibex). I was happy to notice My Audio is now working fine. Headphones too :) My flash issue is still open (I think it is in Adobe's Court - and they dont seem to bother ) Everything else *looked* fine. However, on a deeper examination. There is a small issue (not a deal breaker, though). The user login takes a little longer. I looked at the syslog. There are some noticiably interesting things (All I think it boils down to X11, I may be wrong) X (crashes? and) is restarted RIGHT before gdm login screen appears. There a log of compiz real segfault-ing WARNING: gdm_slave_xioerror_handler: Fatal X error - Restarting :0 Nov 2 13:02:27 sar-akshaya kernel: [ 6185.471607] compiz.real[5767]: segfault at 2b0021 ip 08055c8c sp bf9ad770 error 4 in compiz.real[8048000+34000] Nov 2 13:02:28 sar-akshaya gdm[5326]: Sigfile not found . After a couple quick screen flickers, login screen appears and after login credentials are entere...

Solved - Eclipse looks good in Ubuntu Now!

This is a follow up post that solved an issue I had. This post will also illustrate how to run a GTK application on a different theme Recently I posted that Eclipse on Ubuntu is the Ugly Betty. I was looking for a Theme that would make it look better(and a way to use it only for eclipse). A digg commentor suggested that I get Clearlooks Compact Theme . Another commentor (Victor Ott) suggested that I install a plugin That will save some screen real estate. I tried both. While the plugin is good, It makes eclipsel lose its easthetics. I then saw this post . So I improvised a little more.. Mixed all the ideas. First get the Libertarian fonts, as described in max's post . (They are really good indeed, I even made them my gnome defaults). Then, Download this archive and extract in the eclipse directory. And "chmod 755 ec" . Thats it! run ec instead of eclipse. What this does: The gtkrc-sar is a theme rc for GTK engine. Think of it as a CSS in HTML page, to GTK a...

Ubuntu Intrepid Ibex: A week to go

O so long, I have been waiting. With hopes that Intrepid will solve my sound issue out of box (I could have checked in live CD but it can wait), I am counting this week down for the next release of Ubuntu. This is not a major release but you could have seen a lot of beta (p) reviews if you follow digg enough. What I am looking for: Latest Gnome, X.org, Kernel (Solve My audio issues.. ) Encrypted FS Mounts (Protect my Data) Networking improvements (Bluetooth, Network Manager[ndiswrapper - would be needed futher?]) DKMS (interesting feature, eh?) Flash (My web cam issue )

Flash in Ubuntu: WebCam doesnot work : Camera is unavailable

Yet another day looking for a solution to an issue in ubuntu. but I am loving it :) I am trying to get my webcam work with live.yahoo.com or justin.tv in ubuntu. For some reason adobe flash is unable to open my web cam. It shows up a modal dialog box: "Camera is unavailable, may be in use by another application" Results from video test on Skype, on the other hand, is positive on my system. So My webcam is not the issue here. Also the tabs in the options are not focusable. I mean I click on them, NOTHING happens. There was a bug raised in Adobe Support forums . I posted back, if you know a solution let me know. System : Lenovo Y410 Browser: Firefox 3.0 Flash: 10 downloaded from adobe.com