[131043800010] |Ubuntu postfix installation error: trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 0:2.10.1-0ubuntu18 [131043800020] |Hi, I am trying to install Postfix on Ubuntu 10.04 using command sudo apt-get install postfix but there comes error as shown below: [131043800030] |Please help me what to do [131043810010] |Your system is not up-to-date with 10.04, which was released with version 2.11.1-0ubuntu7 of the libc-bin package (now superseded by 2.11.1-0ubuntu7.5 due to a security upgrade) and and version 2.11+git20100304-3 of the locales package. [131043810020] |Installing the Postfix package required an upgrade of locales, but the new version of locales is incompatible with the version of libc-bin you now have. [131043810030] |It's a bug that the locales package doesn't declare a dependency that would have caused libc-bin to be upgraded as well. [131043810040] |Nonetheless, you are doing two things wrong. [131043810050] |First, you shouldn't try to run a mixed karmic/lucid system. [131043810060] |It's technically possible, but inadvisable and will lead to all kinds of problems such as the one you're experiencing. [131043810070] |Second, you should enable security upgrades. [131043810080] |If you're using the GUI, bring up “Software sources” and make sure “Important security updates” and “Recommended updates” are checked in the “Updates” tab. [131043810090] |Then bring up the “Update manager” and perform an upgrade to 10.04. [131043810100] |If you're using the command line, make sure /etc/apt/sources.list contains at least the following lines: [131043810110] |(It's ok if restricted, universe and multiverse are on separate lines with the same prefix deb ... lucid-... prefix as main.) [131043810120] |Then either install the update-manager-core package and run sudo do-release-upgrade, or run sudo apt-get update; sudo apt-get dist-upgrade. [131043810130] |See also Lucid Upgrades; in addition to the information on this page, note that you don't seem to have security updates enabled, and the automated procedure might not take care of that. [131043820010] |How do I go about tracking down IO usage in Linux and other *nix OS'? [131043820020] |Occasionally, something on my system starts hammering the disk. [131043820030] |I would like to log data that would let me know about I/O usage per process, then I could go back to it later and see what keeps doing this. [131043820040] |How should I go about solving this problem? [131043820050] |Bonus points for solving this for arbitrary block devices. [131043830010] |I would give iotop a try. [131043830020] |It is pretty good in giving you the processes with high io transfers. [131043830030] |But iotop is more to display the current status than logging. [131043830040] |For logging, sar is always a good tool for performance aspects. [131043840010] |How to use iphone internet tethering via USB with Ubuntu 10.04 [131043840020] |What are the steps to use iPhone 3G internet tethering via USB on Ubuntu 10.04? [131043840030] |Is there software I need to install on Ubuntu for this? [131043840040] |The tethering works fine on Windows. [131043850010] |Follow this how-to: Getting iPhone Internet Tethering Working in Linux (No jailbreaking involved!) [131043860010] |Diego Diagio created an iPhone kernel module called "ipheth". [131043860020] |It will be available in the kernel with version 2.6.34. [131043860030] |This module will register your phone as a network interface and you can simply use it with your dhcp-client or network manager. [131043860040] |Set up the Ubuntu Repository: [131043860050] |Install the Kernel Module: [131043860060] |After that, enable tethering on your phone and connect it with your computer. [131043860070] |Use dmesg to check if the device was recognized. [131043860080] |Usually you will now have a new networking device, like /dev/ethX. [131043860090] |Use it in your network manager or use dhclient, for example: [131043860100] |In addtion: My android phone registres as usb0, so it is dhclient usb0 to do the trick. [131043860110] |If you problems getting the repository to work, see the project page for further information. [131043860120] |Advantage: No jailbreaking and additional port binding / proxys are required [131043870010] |Disable Composite without restarting X [131043870020] |In order for me to watch HD videos without tearing, I need to disable my Composite setting in xorg.conf [131043870030] |But I love my transparency, so, how do I enable and disable it without restarting X? [131043870040] |(Preferably using command line) [131043880010] |Use fusion-icon. [131043890010] |You can't disable an X extension while the server is running - the X protocol simply has no way to tell clients “Oh wait, that extension that I said you could use is no longer valid and you'll crash if you try to use it now.” [131043890020] |All you can do is stop running whatever composite manager you're using (as suggested in @iamsid's answer). [131043900010] |Found a better way to do it, just: [131043900020] |
  • Menu
  • [131043900030] |
  • Settings
  • [131043900040] |
  • Window Manager Tweaks
  • [131043900050] |
  • Compositor Tab
  • [131043900060] |
  • Uncheck "Enable display compositing"
  • [131043900070] |I think this is better since it doesn't involve installing new application and it did help me prevent tearing when watching HD movies. [131043910010] |aliasing cd to pushd - is it a good idea? [131043910020] |Is it a good idea to use the following alias: [131043910030] |in bash? [131043910040] |I think this would be very useful, since I can then use a series of popds instead of just a cd - once. [131043910050] |Is there any case where this might be a problem? [131043920010] |Personally, I have these in my bashrc and use them all the time: [131043920020] |You can then navigate around on the command-line a bit like a browser. cd changes the directory. back goes to the previous directory that you cded from. [131043920030] |And flip will move between the current and previous directories without popping them from the directory stack. [131043920040] |Overall, it works great. [131043920050] |The only real problem that I'm aware of is the fact that it's then a set of commands that I'm completely used to but don't exist on anyone else's machine. [131043920060] |So, if I have to use someone else's machine, it can be a bit frustrating. [131043920070] |If you're used to just using pushd and popd directly, you don't have that problem. [131043920080] |And while if you just alias cd put not popd, you won't have the issue of back not existing, you'll still have the problem that cd doesn't do quite what you expect on other machines. [131043920090] |I would note, however, that your particular implementation of cd doesn't quite work like cd in that the normal cd by itself will go to your home directory, but yours doesn't. [131043920100] |The version that I have here doesn't have that problem. [131043920110] |Mine also appends DIRSTACK onto the front of the dirs print out, but that's more a matter of personal taste more than anything. [131043920120] |So, as I said, I use these aliases all the time and have no problem with them. [131043920130] |It's just that it can be a bit frustrating to have to use another machine and then find them not there (which shouldn't be surprising, but they're one of those things that you use so often that you don't think about them, so having them not work like you're used to can still be surprising). [131043930010] |This isn't a direct answer to the question, but I fell in love with the directory history window in 4DOS. [131043930020] |So much so that I wrote my own version for Linux (and Cygwin). [131043930030] |I've never gotten around to making it an easy-to-install utility, but if you know your way around a Bash prompt, it shouldn't be that hard to get running. [131043930040] |Your question inspired me to put it into a Git repo and upload it to GitHub: dirhistory. [131043930050] |Basically, it's a daemon that collects directory changes from all your shells, and a Cdk program that displays the history and lets you pick any directory to switch to (so you're not limited to a stack). [131043930060] |I find it really useful, and have it bound to Ctrl-PageUp, just like 4DOS did. [131043930070] |(I even patched PuTTY so it would send Ctrl-PageUp to Bash.) [131043940010] |pysvn fails to make due to -lneon not found? [131043940020] |I am trying to install pysvn on my CentOS server and it says that -lneon is gone. [131043940030] |After searching their mailing lists for a bit I found what neon means but it doesn't say how can I get it? [131043940040] |Here's my make command output: [131043950010] |Removing -lneon solves this for me. [131043960010] |Which scripting language is most widespread in system administration tasks ? [131043960020] |Hi, [131043960030] |I am migrating to Linux and have some experience with the Mac OS X command line/bash. [131043960040] |I'd like to automate system admin tasks via scripting, but I am unsure as which language is the most used in the real world: bash shell scripting, Perl or Python ? [131043960050] |Which should I learn (if more than one, what order) ? [131043960060] |Thanks, [131043960070] |Scott [131043970010] |Setting up a wireless to ethernet bridge [131043970020] |I am trying to set up a temporary network using the following hardware [131043970030] |Looking around online, I found what might be two solutions: [131043970040] |1) On the laptop (running debian) set up a NAT using iptables or [131043970050] |2) Use parprouted [131043970060] |I've read online that the first solution won't work because there are problems translating addresses because of the difference in MAC addresses between the eth0 and wlan0 connections, so I'm leaning toward the 2nd. [131043970070] |What I want to know is: [131043970080] |
  • Would either of these methods be better than the other, (and/or should I use a different approach)?
  • [131043970090] |
  • Is there an easy way to back up my settings in case I screw something up?
  • [131043980010] |I'm a little confused by what you are trying to do. [131043980020] |You don't make it clear whether you are trying to extend an existing wireless network to include devices on your ethernet device or whether you are trying to create a new subnet and use NAT to hide this from the wireless router. [131043980030] |The good news is that both are possible and are fairly simple. [131043980040] |Personally if you are just wanting to temporarily make a few devices accessible via the wireless router I would tend to go via the bridge route. [131043980050] |That way your existing wireless router will handle IP address assignment etc. [131043980060] |The instructions for setting up a new subnet are a little more involved because you will likely need to setup a dhcp server on your laptop too. [131043980070] |Answering your 2nd question you can do most of this direct from the commandline on an adhoc basis. [131043980080] |That way if you mess things up a simple reboot would restore your original settings. [131043980090] |To use the bridge approach you need to install the bridge-utils package on Debian [131043980100] |Note you might need to prefix the line with sudo if you do not have a terminal window open as the root user. [131043980110] |Once you have bridge-utils installed then look at /usr/share/doc/bridge-utils/HOWTO and the other documents in that directory they give you a good explanation of how to set things up. [131043980120] |Note one issue you may have to workaround is if you are using network manager to manage your networks on the laptop. [131043980130] |That can tend to override what you do on the commandline you might need to temporarily stop it managing the wireless and wired interfaces on your laptop whilst you setup the bridge. [131043990010] |Unique synergy monitor setup [131043990020] |If anyone doesn't know about synergy, it's basically a KVM switch over the lan, but you don't have to switch anything. [131043990030] |It allows you to move your mouse from one machine to the other like if you had dual monitors. [131043990040] |My question is: is it possible to set up your config so that you have 1 server and 1 client, both have dual monitors, but the client machine has its monitors such that one is on the left of the server's left monitor, and the other is on the right of the server's right monitor? [131043990050] |So for example: [131043990060] |Hopefully my ascii is good enough to understand. [131043990070] |The reason I ask here is because both machines will be running linux, and I'm fairly certain that there's no supported way to do this in the synergy configs. [131043990080] |But I am completely willing to muck with X configs on the client to get it to work. [131043990090] |I would set this up so that the only way the client could be used is through this synergy setup, so any X mucking won't have to be changed. [131043990100] |How synergy config works is that on your server, you give it the configuration of your screens. [131043990110] |So you'll say client1 is right of server, and server is left of client1. [131043990120] |What I was thinking is, is there a way to somehow make X think each display is connected on a different server. [131043990130] |So I could say like clientS1(192.168.1.1:1234) is left of server. [131043990140] |And clientS2(192.168.1.1:1235) is right of server. [131043990150] |And X will know which screen it is? [131043990160] |I'm sure that last paragraph is confusing, but maybe someone who knows more about synergy or X can point me in the right direction. [131044000010] |This can't be done with the configs yet. ( or at least last time I checked )... [131044000020] |The closest you'll get to a sollution, without hacking into X, is to configure you screens like this: [131044000030] |And then stack them out like you wanted. [131044000040] |Will make life a bit confusing at first, but you will get used to it. [131044000050] |If you on the center two screens, you will have to move your mouse up to get to the outer screens. [131044000060] |And then down to get back to the center screens. [131044000070] |Have Fun and Good Luck! [131044010010] |What if you switch client screen1 with 2 ? [131044010020] |This way you are able to set the right of cl scr2 to left of srv scr1 and leftof cl scr1 to right of srv scr 2. [131044010030] |Then, if you need, you can just move your taskbar to the desired screen and set the DE's behavior to open new windows on the screen where the mouse cursor is located. [131044010040] |I had a similar setup, with the only exception that in the middle was a client with a single display and server with 2 screens on left and right... or something like this. [131044020010] |You might be able to set it using something similar to what's described in this situation: [131044020020] |http://groups.google.com/group/synergy-plus/msg/2da394d9ebb8357b [131044020030] |Took me a bit to get my head around this idea but it does make sense. [131044020040] |I have a similar situation to what's described here except my middle monitor is running Ubuntu server and so no X server. [131044020050] |I installed GPM (General Purpose Mouse) which allows a mouse and copy and paste in the terminal on the server. [131044020060] |I also then installed Synergy and tried it out but it doesn't work. [131044020070] |I've been thinking of using Actions --> Keystroke in the config to switch to the server monitor with a hotkey, but I doubt it'll work. [131044020080] |I think it requires an X session. [131044020090] |I think I just need a HW KVM. [131044020100] |Anyhow, enough about that. [131044020110] |So, you might be able to set this up by configuring your monitors backwards in the OS and then "tricking" synergy by defining left and right for the middle monitors somehow. with 4 monitors that alternate like that though it sounds like it might get pretty complicated. [131044020120] |I hope this helped. [131044030010] |autologin console as root on fedora [131044030020] |can someone help to autologin in console text mode as root in fedora, usually I can do using script like this : [131044030030] |/sbin/autologin.sh: [131044030040] |and on /etc/inittab do login by calling that script [131044030050] |now i can't do that, since fedora use /etc/init/tty.conf : [131044030060] |*I know its dangerous to autologin and moreover as root, but I don't care, i don't care about security [131044040010] |no problem I solved it: [131044040020] |on /etc/init/tty.conf [131044050010] |How to get GNOME volume applet back? [131044050020] |I'm running GNOME 2.30 (Squeeze) and have lost my Volume Control applet. [131044050030] |I can't find it in my Add to Panel window. [131044050040] |[update] Note that the Volume Control applet appears again in the window, and I have no idea what fixed the issue. [131044060010] |Add to Panel >Indicator Applet [131044060020] |OR [131044060030] |
  • Alt + F2 and run this: gnome-volume-control-applet
  • [131044060040] |
  • Also, add gnome-volume-control-applet to System >Preferences >Startup Applications
  • [131044070010] |I guess it is now under 'Indicator applet' or something like that. [131044070020] |Lost my too, but got it back. [131044080010] |It's called mixer_applet2 and should be part of the gnome-applets package. [131044080020] |On Debian Squeeze, it should be installed as /usr/lib/gnome-applets/mixer_applet2. [131044080030] |I'm not using Debian, but it shows up as Volume Control in my Add to Panel dialog. [131044080040] |You might try reinstalling gnome-applets. [131044090010] |Looking for a simple X Window panel/dock with icon "pinning" feature from Windows 7 [131044090020] |I am using OpenBox WM and I am looking for some simple dock application (that could be used along with OpenBox) that has this icon "pinning" feature. [131044090030] |It can also be a panel. [131044090040] |So far I have found this: [131044090050] |
  • Docky - it's fine but it needs compositing manager
  • [131044090060] |
  • wbar - compiles but isn't working for me (does not appear), and I am not sure if it has the "pin" feature
  • [131044090070] |Any other tools that can do this? [131044100010] |Docks that do not require compositing: [131044100020] |
  • tint2
  • [131044100030] |
  • simdock
  • [131044100040] |
  • tablaunch
  • [131044100050] |
  • bbdock
  • [131044110010] |
  • Cairo dock
  • [131044110020] |
  • ADeskBar
  • [131044120010] |adeskbar; dock on a diet bmpanel; tint2 like panel but with 'pinning' possible [131044130010] |Single CD install of a RHEL-like distribution? [131044130020] |Can someone suggest a RHEL-like distribution that can install from a single CD? [131044130030] |I am looking for a distribution where services are started from /etc/init.d, environment variables are set from scripts in /etc/profile.d and so-on (meaning that Ubuntu doesn't do the job). [131044130040] |A network installer isn't an option... [131044130050] |I think in terms of the OS's behaviour, CentOS would do the trick, except I can't find a single CD installation. [131044130060] |Any suggestions? [131044140010] |By "RHEL-like" are you referring to, as you mention, service and environment configuration and execution or are you also seeking an RPM-based distribution? [131044140020] |Why is network installation not an option? [131044140030] |Will this carry over to software maintenance and management as well? [131044140040] |Is there a reason why creating a live environment, either on a removable disk or other media such as a USB drive, then leveraging that environment to perform the install would not work? [131044140050] |Many, if not all, of the distributions listed on distrowatch include a reference to which other distribution(s) on which they are based. [131044150010] |Why don't you think of Fedora? [131044150020] |Perhaps you think it cannot be installed with a single CD? [131044150030] |It has always been an option, to install Fedora from the first ISO in the series. [131044150040] |That was quite misleading but if you read the description carefully enough there is text that says something like "Only first CD is required, the rest are just additional software". [131044150050] |In Fedora 14, however, the confusion is solved because the website makes it quite clear that you install Fedora using one CD only. [131044150060] |I guess you can still get the rest of the CDs in the series somewhere, but I don't think you will ever need to. [131044150070] |Update: I'm not sure about /etc/init.d or /etc/profile.d, but Fedora should be the closest thing to RHEL, excluding RHEL itself. [131044160010] |I would like to add the option of fully customizing your Fedora installation. [131044160020] |Have a look a Revisor for doing this. [131044160030] |http://revisor.fedoraunity.org/ [131044170010] |How to make my Linux tcsh prompt bold? [131044170020] |Greeting all, [131044170030] |I am attempting to make my Linux tcsh prompt bold. [131044170040] |However I'm failing miserably. [131044170050] |I know about escape codes and I can successfully make echo'ed output bold, but I can't seem to do it for my prompt. [131044170060] |For example, if I use the following command: [131044170070] |I correctly get an output line that has Hello and the text is bold text. [131044170080] |However, if I try to change my prompt using similar logic it, fails. [131044170090] |For example, If I attempt to change the prompt using the following command: [131044170100] |I get: [131044170110] |So it seems that my prompt is not being processes the same as echo lines? [131044170120] |Any tips on what my problem could be? [131044170130] |Following is a trimmed down version of my environment, which may give clues as to why I might need to use some other format for the prompt. [131044170140] |Thanks in advance. [131044180010] |The echo built-in performs backslash expansion on your system (this is configurable, and the default is system-dependent). [131044180020] |The prompt variable contains the literal backslashes, and prompt expansion is a little weird. [131044180030] |If you want to include terminal escape sequences in your prompt, they need to be between %{%}, as in [131044180040] |But it's simpler (and in principle more portable) to use the built-in escape sequence for bold text. [131044190010] |Where is 'kernel panic' used? [131044190020] |Is the name kernel panic being used outside of Linux-based systems? [131044200010] |The original v1 version of Unix had a label in the source code (assembly language) called panic:. [131044200020] |If something went wrong elsewhere, code would jump to there and the system would reboot (that's an assumption given a comment in the code, in contradiction to the Van Vleck quote). [131044200030] |The string "kernel panic" does not appear there, but this would appear to be the origin of kernel panic in Unix. [131044200040] |The term has continued to be used throughout the lifetime of Unix and its derivatives. [131044210010] |Yes, the term was handed down from the original Unix, and was coined by Dennis Ritchie.. [131044210020] |As recounted by Tom Van Vleck: [131044210030] |I remarked to Dennis that easily half the code I was writing in Multics was error recovery code. [131044210040] |He said, “We left all that stuff out. [131044210050] |If there's an error, we have this routine called panic, and when it is called, the machine crashes, and you holler down the hall, ‘Hey, reboot it.’” [131044220010] |truncating file names [131044220020] |I have a folder that has a number of files all of a similar form as: [131044220030] |And so forth... [131044220040] |I want to convert them all so that they appear as: [131044220050] |How can I do this? [131044230010] |You can use a for loop to loop over the files you want to modify. ${var/from/to} will replace the first occurrence of from with to in $var, so ${var/Dropkick Murphys - /} will replace "Dropkick Murphys - " with nothing: [131044240010] |for i in *.mp3; do mv "$i" "$(echo $i | sed 's/^Dropkick Murphys - //')"; done [131044240020] |or, more general, to remove first 3 space-delimited words from a file name [131044240030] |echo $i | cut -d' ' -f4- [131044250010] |Pick one. [131044260010] |Under Ubuntu or Debian, it is simply: [131044270010] |There is a rename.ul command (I guess by default in Ubuntu). [131044270020] |It gives you a simple way to rename files [131044270030] |Syntax: [131044280010] |Obligatory zsh answer: [131044280020] |Variants, to do the renaming for all artist names. [131044280030] |Note that the first command takes the longest match of the first *, e.g. it will rename Dropkick Murphys - 01 - Walk Away - concert.mp3 to Walk Away - concert.mp3. [131044290010] |Parsing log files for frequent IP's [131044290020] |So, I hacked this together while undergoing a DDOS attack to pull naughty ips out of my logs. [131044290030] |Anyone have any improvements or other suggestions to make it better? [131044290040] |Here's the general idea: [131044290050] |
  • pull ip's only out of log file
  • [131044290060] |
  • sort them
  • [131044290070] |
  • uniq and count them
  • [131044290080] |
  • sort them again
  • [131044290090] |And the string o'pipes: cut --delim " " -f7 /var/log/apache_access | sort | uniq -c | sort -rn >sorted-ips.txt [131044300010] |It sounds like you're in the middle of reinventing the fail2ban wheel. [131044300020] |Give fail2ban a look. [131044300030] |It probably does what you want already, and if not, it's easy to customize. [131044310010] |I've always used this: [131044310020] |tail -1000 /var/log/apache_access | awk '{print $1}' | sort -nk1 | uniq -c | sort -nk1 [131044310030] |With tail I'm able to set the limit of how far back I really want to go - good if you don't use log rotate (for whatever reason), second I'm making use of awk - since most logs are space delimited I've left my self with the ability to pull additional information out (possibly what URLs they were hitting, statuses, browsers, etc) by adding the appropriate $ variable. [131044310040] |Lastly a flaw in uniq it only works in touching pairs - IE: [131044310050] |Will produce: [131044310060] |Not the desired output. [131044310070] |So we sort the first column (in this case the ips, but we could sort other columns) then uniq them, finally sort the count ascending so I can see the highest offenders. [131044320010] |Reason for ksh obsoleting -eq [131044320020] |The latest version of ksh obsoletes using -eq within [[ ]] blocks, prefering (( )) instead. [131044320030] |Why is this? [131044320040] |I can't find any documentation on the advantages of (( )) over [[ ]] anywhere, and I find that syntax considerably more obvious. [131044320050] |For example: [131044320060] |gives [131044330010] |According to this post, there may be more information in Rosenblatt's Learning the Korn Shell [131044340010] |If you do [131044340020] |you get the message [131044340030] |as you've seen. [131044340040] |Now try this: [131044340050] |This works: [131044340060] |Remember that the first message is only a warning. [131044340070] |You can continue to use that form. [131044340080] |I doubt that it will be removed since it would break too many existing scripts. [131044340090] |By the way, this is accepted without a warning: [131044340100] |One of the main reasons that double parentheses is preferred is that the comparison operators are the more familiar <, <=, ==, etc., (at least when compared to other languages). [131044340110] |Double parentheses also work in Bash and zsh. [131044340120] |A related form, arithmetic substition, works in all of them, plus it's specified by POSIX. [131044340130] |Korn, Bash and Z can also do it this way: [131044340140] |Even though Dash, as an example of a POSIX shell, doesn't support double parentheses comparisons in the form if (( ... )), you can still do them using arithmetic substitution, but the result is the opposite from what you'd expect (this is also true for the others). [131044350010] |How to remove KDE and XFCE applications from GNOME menu? [131044350020] |I am new to Linux. [131044350030] |I installed kubuntu-desktop and xubuntu-desktop over the default Ubuntu 10.10. [131044350040] |I want to unclutter the menu, so that applications related to a particular desktop appear in menu only during their respective sessions. (i.e., No KDE and XFCE apps in menu during Ubuntu GNOME session. [131044350050] |Similarly in KDE and XFCE sessions.) [131044350060] |How can this be done via command line? [131044350070] |(I want to learn things the command-line way.) [131044350080] |Should I backup anything before I do this? [131044350090] |Extra Information: I googled and found this and other solutions in forums, but these address only the KDE on GNOME scenario. [131044350100] |Perhaps this can be modified to include XFCE as well, but since I am a newbie, I couldn't figure out how to do it. [131044350110] |I have also cross-posted at askubuntu. [131044350120] |Gracias! [131044350130] |Thanks! [131044360010] |The code to show something only in XFCE follows the same idea: [131044360020] |Unfortunately, as far as I know, the way XFCE stores it's .desktop files is the same as the GNOME stores them, whereas KDE stores them in a separate folder (within /usr/share/applications). [131044360030] |This is why the separation of KDE/GNOME, as described in the post you link to, is much easier to do en-mass. [131044360040] |All the files are stored in /usr/share/applications. [131044360050] |The format of them is very simple, and you can copy any one of them to /home/you/.local/share/applications and it will override that menu entry for that user so you can more easily edit them without needing root privileges. [131044360060] |There is no simple way to separate XFCE apps from GNOME, especially since it's often a matter of opinion what you want to see. [131044360070] |This also goes for KDE, since as long as you have the KDE libraries Dolphin or Konqueror will run in GNOME. [131044360080] |I suppose if you're intent on using the cmd line you could come up with some grep/sed junk to selectively find and replace text inside certain .desktop files, but I thnk the easiest way would be to copy the files to ~/.local/share/applications so they don't get overwritten by updates and edit them by hand. [131044360090] |Unless you've got a gazillion things installed it shouldn't be too difficult. [131044360100] |The menu works under the freedektop.org specification, which you can learn more about here: [131044360110] |http://standards.freedesktop.org/menu-spec/latest/index.html [131044370010] |All your preferences will be saved inside the .gconf folder in xml files; you can manually edit those, or use the GUI interface, gconf-editor. [131044370020] |The proper way to remove is to use System -> Preferences -> Main menu or the command alacarte [131044380010] |How to insert text into a root-owned file using sudo? [131044380020] |Possible Duplicate: Redirecting stdout to a file you don't have write permission on [131044380030] |Running a command like sudo echo 'text' >>/file.txt fails with: [131044390010] |You are telling bash to open a file and append the output of the command sudo echo 'text' to it, which of course doesn't work since your bash runs as non-root. [131044390020] |Interactively, I usually run sudo -s to get around this (since then the shell runs as root and can open the file). [131044390030] |Alternatively, you can run sudo sh -c "echo 'text' >>/file.txt", which also works, but is a bit of a hassle with all the interpolation/escaping that can interfere if you have complicated expressions. [131044400010] |This doesn't work because the redirection is executed by the shell, not by the command it applies to. [131044400020] |But your shell is not running as root, only echo 'text' is. [131044400030] |A common trick when you need have root permissions to write to a file, but not to generate the data, is to use tee: [131044400040] |If you do need root permissions to generate the data, you can run two separate sudo commands, or run a shell inside sudo and do the redirection there (careful with the quoting). [131044400050] |When overwriting rather than appending, if you're used to your shell refusing to truncate an existing file with the >operator (set -o noclobber), remember that this protection will not apply. sudo 'echo >/etc/passwd' and sudo tee /etc/passwd will overwrite /etc/passwd. [131044410010] |What is the difference between ls and l? [131044410020] |I accidentally typed l instead of ls today and found that the command still printed a list of the files in my current directory. [131044410030] |Trying l --help brings up the help file for ls suggesting that l is just an alias of ls. [131044410040] |Howver, each file was suffixed by a *. [131044410050] |Why is this and what does it mean? [131044410060] |In case it makes a difference, this is when running the latest stable version of Ubuntu. [131044420010] |Looks like you have an alias set up in your environment. [131044420020] |Perhaps you have inherited a .profile, .bashrc or similar containing something like alias l='ls -F'. [131044420030] |Try which l and alias to track down its definition. [131044430010] |A good way to inspect what a command is: [131044430020] |If it's a program or a script, it will give you its location, if it is an alias, it will tell you what it's aliased to, if it's a function, it will print the funciton; otherwise, it will tell you if it is a built-in or a keyword. [131044430030] |Examples: [131044440010] |FIXED: l is an alias for ls -CF ( I am not really sure ) in the default .bashrc in ubuntu [131044440020] |You can just type alias to check out all the aliases. [131044440030] |It would be mentioned there. [131044450010] |By default, it is an alias for ls -CF in ubuntu. [131044460010] |I redefined all my ls shortcuts in my .zshrc. [131044460020] |This is the relevant section: [131044460030] |Note that ls is redefined itself: [131044470010] |How do I get sudo -u $user to use the users env? [131044470020] |It seems when sudoing down that using sudo -u $user that the environment of root is still being used. [131044470030] |How can I make sudo use the users environment? as a special note not all users that I will be using this on have login shells. [131044480010] |Try sudo -i -u $user [131044490010] |How do I get kopete to hide/ignore status changes? [131044490020] |I'm tired of kopete showing me every time someone goes away, online, it's annoying as it doesn't matter to me. [131044490030] |How do I get kopete to hide these messages, or at least not alert me to them. [131044500010] |This one is well hidden :-) [131044500020] |To remove the KDE event notification [131044500030] |
  • Go to KDE system settings
  • [131044500040] |
  • Select "Application and System Notifications".
  • [131044500050] |
  • Choose Kopete Messenger in Event source,
  • [131044500060] |
  • Select "Status Change" and uncheck all options.
  • [131044500070] |To remove the event in the Kopete chat window [131044500080] |
  • In Kopete, go to menu Settings / Configure...
  • [131044500090] |
  • Select Behavior / Chat
  • [131044500100] |
  • Uncheck "Show events in chat window".
  • [131044510010] |You should be able to configure what you do and don't get notified about by Kopete and how it notifies you by going to Settings->Configure Notifications. [131044520010] |How do I pg_upgrade my database on Arch Linux? [131044520020] |I was running postgres 8.4 on arch but now have 9 installed I want to use pg_upgrade to upgrade but I don't know what all the options I have to use are, and all the directories that I have to point it to. [131044520030] |I think it asks for a previous pg binary directory... but that's gone. [131044520040] |Will it still work? note: I've no important data, just play db's I just want to know how to do it. [131044520050] |I also realize this is borderline serverfault, but I feel it has as much to do with arch's install process and paths, so I thought I'd ask here [131044530010] |I asked this question on serverfault, because I hadn't gotten an answer here, and this was the answer I got, it basically contains docs links. [131044530020] |But the most important take home, in my opinion, is that to use pg_upgrade you have to have 2 versions of postgres installed side by side, as such I filed a bug with arch to build it into the package upgrade process [131044540010] |Is there a way to dynamically refresh the less command? [131044540020] |I like the watch command, but it has its limitations. [131044540030] |I'm curious to know whether I could mimic the functionality of watch with less. [131044540040] |I'm mainly looking for the ability to scroll through my directory as it dynamically gets modified via a running script. [131044550010] |The "F" key when running less will do a "follow" similar to tail -f, but I'm not sure if that will achieve what you're looking for here. [131044560010] |Shift+F will make less similar to tailf. [131044560020] |That is, it gets refreshed if more data is appended to the file. [131044570010] |You could pipe it to tail -f instead, it would result in you following the output. [131044570020] |You'd be losing the ability to move (scroll) through your output though. [131044580010] |There's no good way to do this in less. [131044580020] |You can type F to keep reading at the end of a file (like tail -f). [131044580030] |You can type :e and a file name to view a different file, but unfortunately, if you enter the name of the current file, less doesn't reload the file. [131044580040] |If you're looking for an alternative to watch ls, here are a few: [131044580050] |
  • Modern file managers (e.g. Nautilus, Thunar, Konqueror, Dolphin, Finder) refresh views in real time.
  • [131044580060] |
  • Emacs doesn't have real-time refresh, but with auto-revert-mode, it will reload the file or directory every 5 seconds (the delay is configurable).
  • [131044580070] |
  • Although w3m is primarily a web browser, it makes a passable directory and text file viewer. [131044580080] |Press R to reload the (local) URL.
  • [131044590010] |Recursively compare directory contents by name, ignoring file extensions [131044590020] |I have a directory containing about 7,000 music files. [131044590030] |I used lame to recursively re-encode all files in it to a separate directory, outputting all files with the same relative path and file name. [131044590040] |The output files have a .mp3 extension, but some of the input files had different extensions (.wma, .aac, etc). [131044590050] |I can see that there is a file count difference of ~100 files missing in the output directory. [131044590060] |What I want to do is run a compare of the two directories and obtain a list of the files that exist in the source, but not in the destination. [131044590070] |This would be simple enough except I need to ignore differences in file extension. [131044590080] |I've tried using rsync with dry-run turned on but I couldn't figure out a way to ignore file extensions. [131044590090] |I've also tried diff but was unable to find an option to only check by name but ignore file extensions. [131044590100] |I started thinking I could just do a recursive ls on both directories, remove the file extensions, and then compare the outputs, but I really have no idea on where to start with modifying the ls output using sed or awk since I'm a compete noob with those. [131044600010] |To see a listing, here are two variants, one that recurses into subdirectories and one that doesn't. [131044600020] |All use syntax specific to bash, ksh and zsh. [131044600030] |Shorter, in zsh: [131044600040] |The comm command lists the lines that are common to two files (comm -12), that are only in the first file (comm -23) or that are only in the second file (comm -13). [131044600050] |The numbers indicate what is subtracted from the output¹. [131044600060] |The two input files must be sorted. [131044600070] |Here, the files are in fact the output of a command. [131044600080] |The shell evaluates the <(…) construct by providing a “fake” file (a FIFO or a /dev/fd/ named file descriptor) as the argument to the command. [131044600090] |¹ So here the minus sayers are fully justified. [131044600100] |If you want to perform actions on the files, you'll probably want to iterate over the source files. [131044610010] |Grub Won't Boot Arch Linux [131044610020] |Notice: This is not about dual booting, I can setup GRUB to dual boot with Windows 7 later. [131044610030] |I just need to be able to get into Arch Linux. [131044610040] |Last night I installed Arch onto my computer via netinstall and it all went smoothly, but when I went to reboot... it loaded up the GRUB menu and it listed Arch Linux, but when I select it, I get "Error 15: File not found." [131044610050] |I've been googling and trying various way to fix this problem but I always get the same error. [131044610060] |Some info about my partitions: [131044610070] |/dev/sda: [131044610080] |
  • Windows 7 System Reserved
  • [131044610090] |
  • Windows 7
  • [131044610100] |/dev/sdb: [131044610110] |
  • Data (Movies, Music, etc..)
  • [131044610120] |/dev/sdc: [131044610130] |
  • Seperate Boot Partition
  • [131044610140] |
  • Swap
  • [131044610150] |
  • Seperate Home Partition
  • [131044610160] |
  • Root
  • [131044610170] |/dev/sdd: [131044610180] |
  • PENDRIVE
  • [131044610190] |ubuntu@ubuntu:~$ sudo blkid [131044610200] |menu.lst [131044610210] |fstab [131044620010] |The main thing that seems wrong here is that in the line [131044620020] |kernel /vmlinuz26 root=/dev/disk/by-uuid/2a53bdc8-7a9a-4dd2-9aef-5b7b4c3e74a4 ro vga=775 [131044620030] |You are using the uuid for /dev/sdc3 which is your /home partition, you should be using the uuid for /dev/sdc2 which is your / partition. [131044620040] |Also... the output from sudo blkid does not match what is shown in fstab. [131044620050] |In blkid the swap partition is /dev/sdc2, but in fstab the swap partition is /dev/sdc4... [131044620060] |You need to figure out these descrepencies.... then you can try to re-configure your grub.conf [131044620070] |Some pointers: [131044620080] |
  • Have you tried other values of root, like root (hd2,1) ?
  • [131044620090] |
  • Instead of [131044620100] |kernel /vmlinuz26 root=/dev/disk/by-uuid/2a53bdc8-7a9a-4dd2-9aef-5b7b4c3e74a4 ro vga=775` [131044620110] |you could try things like [131044620120] |kernel /vmlinuz26 root=/dev/sdc2 ro vga=775
  • [131044620130] |
  • Make sure that /boot/kernel26.img exists.
  • [131044630010] |Xorg Server Failing to Startup [131044630020] |I am having difficulty starting up the Xorg server within my Gentoo installation. [131044630030] |I set it up via The X Server Configuration HOWTO. [131044630040] |When I get to the part where I startx, the screen flickers a bit, and then it drops me back into the terminal with the following message: [131044630050] |Two things that are weird to me - I am not using vesa or fbdev drivers. [131044630060] |I am using intel and evdev in my /etc/make.conf. [131044630070] |Secondly, I don't use modules in my kernel. [131044630080] |I specifically remove them. [131044630090] |This hasn't caused a problem before. [131044630100] |I'm not really sure what is going on. [131044630110] |Any help would be much appreciated. [131044640010] |FATAL: Could not load /lib/modules/2.6.35-gentoo-r12/modules.dep: No such file or directory [131044640020] |Make sure you ran make modules_install for your kernel. [131044650010] |I am using intel and evdev in my /etc/make.conf [131044650020] |That means that xorg will be compiled with intel and evdev support :) Xorg doesn't read your make.conf, it tries to guess your hardware if there's no xorg.conf and it looks like it can't guess your hardware. [131044650030] |emerge sys-apps/lshw sys-apps/pciutils and look for UNCLAIMED and DISABLED devices in lshw output. lspci can also be usefull. [131044650040] |Try running: [131044650050] |Then customize (put correct driver in appropriate place in) it's output ~/xorg.conf.new and use it as your xorg.conf [131044650060] |I generally don't use modular kernel [131044650070] |That doesn't matter in this case, but that means that you can't load module with parameters, which sometimes useful. [131044660010] |How to convert a PDF file to a DVD movie? [131044660020] |Each page would be navigable with the player's 'next' button. [131044660030] |The result should have a directory called VIDEO_TS, to ensure it will play in old players. [131044670010] |I would be very surprised if there is software that does this automatically, but if you take a screenshot of every page and save this as a graphics image, then most DVD creation software will allow you to take each image into a menu structure. [131044670020] |If its a long PDF, then its going to be quite a bit of work. [131044680010] |First that you need to do is convert PDF file into series of images - one image for one page. [131044680020] |To achieve this we could use convert from ImageMagick program: [131044680030] |This command convert pdffile.pdf into series of somename-NUMBER.jpg files. [131044680040] |Next thing is to create slideshow from these files. [131044680050] |For this we could use dvd-slideshow tool. [131044680060] |First command will create file with description of slideshow with name NAME, time for picture 5 sec from pictures in directory DIR. [131044680070] |Second command will generate vob file that you need to burn to DVD (to VIDEO_TS dir). [131044680080] |Quick introduction to dvd-slideshow you could read in this blog. [131044680090] |In example that I presented there pages are changed automatically (-t option in dir2slideshow). [131044680100] |I'm not sure if navigation that you want could be easily achieved. [131044680110] |My only idea is create DVD with chapters - one chapter for one JPG file and constantly loop each chapter until the 'next' button is pressed. [131044680120] |In this solution you could change slide time to 2 seconds and pause it after change, so when you unpause it next slide will be displayed after one second. [131044690010] |After fork(), where does the child begin its execution? [131044690020] |I'm trying to learn UNIX programming and came across a question regarding fork(). [131044690030] |I understand that fork() creates an identical process of the currently running process, but where does it start? [131044690040] |For example, if I have code [131044690050] |The output is: [131044690060] |This is most definitely the parent process Which process printed this? [131044690070] |Which process printed this? [131044690080] |I thought that fork() creates a same process, so I initially that that in that program, the fork() call would be recursively called forever. [131044690090] |I guess that new process created from fork() starts after the fork() call? [131044690100] |If I add the following code, to differentiate between a parent and child process, [131044690110] |after the fork() call, where does the child process begin its execution? [131044700010] |The new process will be created within the fork() call, and will start by returning from it just like the parent. [131044700020] |The return value (which you stored in retval) from fork() will be: [131044700030] |
  • 0 in the child process
  • [131044700040] |
  • The PID of the child in the parent process
  • [131044700050] |
  • -1 in the parent if there was a failure (there is no child, naturally)
  • [131044700060] |Your testing code works correctly; it stores the return value from fork() in child_pid and uses if to check if it's 0 or not (although it doesn't check for an error) [131044710010] |I thought that fork() creates a same process, so I initially that that in that program, the fork() call would be recursively called forever. [131044710020] |I guess that new process created from fork() starts after the fork() call? [131044710030] |Yes. [131044710040] |Let's number the lines: [131044710050] |The execution flow is: [131044710060] |...which explains exactly the output you received. [131044710070] |If you want to know how the original and forked program can possibly behave differently, since they necessarily share the same code, see Michael Mrozek's answer. [131044720010] |How to open multiple files from `find` output? [131044720020] |I know I can open multiple files found in a dir like so: [131044720030] |find -name *.foo -xargs {} \; [131044720040] |This works, but when trying to open a bunch of textfiles in gedit at the same time, it opens them successively (when one files is closed, the next one is opened). [131044720050] |I would like to open all of those files at the same time? [131044720060] |How can I achieve this? [131044730010] |I think that in this case you could use [131044740010] |To act on multiple files at once with find, use + instead of \;: [131044740020] |With zsh, or with bash ≥4 if you put shopt -s globstar in your ~/.bashrc, you can use **/ to recurse into subdirectories: [131044740030] |Zsh also has many glob qualifiers which can replace most uses of find. [131044750010] |Why should a user program mess with kernel space? [131044750020] |I'm not even sure what the problem is, but I'm talking about the kernel attack described here. [131044750030] |Down this list of comments somebody asked about renicing the process. [131044750040] |The trick didn't improve the situation (the machine still runs in a very sluggish fashion) and the replying comment says something about kernel space vs user space. [131044750050] |First of, is the replying comment correct? [131044750060] |If so, why does renice work for things in user space and not for things in kernel space? [131044750070] |Also, according to what I read, all programs that a user starts emself should be in user space, what did I miss? [131044750080] |If it is incorrect, then why doesn't renice improve the situation? [131044760010] |There are services a kernel provides to user-space (such as opening sockets). There is a well-defined interface (API) that user-space programs can interact with the kernel through. [131044760020] |In this case, the user-space program is repeatedly opening sockets and sending file descriptors through them, then closing the sockets. [131044760030] |These actions are performed by the kernel. [131044760040] |It will hold the file descriptor in a buffer until the other end of the socket reads it. [131044760050] |The particular bug is that a garbage collector should eventually free the file descriptor, but it doesn't - the fd gets leaked. [131044760060] |The leaked fds add up and sit there consuming resources. [131044760070] |Killing the program doesn't free the resources because they are not owned by the program. [131044770010] |Sync writes very slow. Ubuntu 10.10, 32 bits, ext4 [131044770020] |I am running ActiveMQ on my Macbook Pro that runs Ubuntu 10.10, 32 bits with an ext4 partition. [131044770030] |If I enable persistence in ActiveMQ the performance drops terribly. [131044770040] |I've tested the same thing on other machines and the difference is of 2 orders of magnitude. [131044770050] |There is a tool with activeMQ to test the HD, here are the results: [131044770060] |Performance for Sync Writes is s**t. [131044770070] |There must be something misconfigured, but this is the only app where I've noticed a HD performace issue. [131044770080] |hdparm throws expected values: [131044780010] |The major limiting factor for synchronous IO isn't throughput of your harddrive, but rather the time it takes from when the write is issued and it being committed to disk. [131044780020] |The most relevant performance metric for a harddrive in this regard would be the seek time of the harddrive and not it's throughput under ideal circumstances. [131044780030] |In addition to the hardware working against you, so are the kernel, I'm guessing you might see a small improvement (although, probably nowhere near what you'll get from doing async IO) if you can ionice the benchmark (application) to run under the realtime IO scheduling class. [131044780040] |By default, applications will be scheduled under the best effort class, which probably also will add to the wait time of your writes. [131044780050] |Use the realtime scheduling class at your own risk, as it'll have adverse effects on other applications performance when accessing disk. [131044780060] |In general, I don't really thing there's anything horribly wrong with the synchronous write performance you're seeing. [131044780070] |Synchronous IO will in general perform horribly compared to asynchronous IO. [131044780080] |As a side note a quick google of activemq and synchronous io gave the following: [131044780090] |For performance reasons you may wish to stream messages to the broker as fast as possible even if you are using persistent messages [131044790010] |A synchronous write must receive back an acknowlegement that the write has been committed (wether the commit was a success or error) before it can return itself. [131044790020] |This is by design, and inherently makes synchronous writes much slower due to the high latency times involved with a spinning metal disk (on disk ram cache doesn't count). [131044790030] |Asynchronous writes are usually written to RAM and the OS deals with committing it to disk later (later usually being mere seconds or less (I believe ZFS is 5x/second, or every 5 seconds)). [131044790040] |Disk seek times are measured in ms while RAM seek times are measured in ns. [131044790050] |That's a difference of 1000x. [131044790060] |Use synchronous writes when it's absolutely critical that the data is permanently stored before continuing and a 1 second delay where power loss may occur is unacceptable. [131044790070] |Use asynchronous writes at all other times. [131044800010] |keep log file size fixed without logrotate [131044800020] |is there any way to keep file size of log file is fixed without rotating it by new empty file and delete (or archive the old file), for example if I set log file maximum size is 1MB, after the file size increase beyond that limit it will be automatically clamped, the text is added on 'tail' and the oldest part of text is poped out to keep the file size 1MB [131044810010] |You could write a little bash script to do this. [131044810020] |Just tail the file to a certain byte count using tail -c and overwrite the file. [131044810030] |from man tail: [131044820010] |Your only solution may be to write your own userspace file system or contribute to an existing one. [131044820020] |Look at the partial list at Filesystem in Userspace [131044820030] |If you don't have the skills to contribute, offer a project publicity or $$$ or both, to add it for you. [131044820040] |I wish I had the time to do it, I have always wanted something exactly like this. [131044830010] |You can do something similar using a FIFO, which is sort of like a zero-byte sized file. [131044830020] |However, note that if nothing is READING from this file, then the syslog process may become blocked, and will stop writing to ALL of your logfiles. [131044830030] |I'm not sure if this behavior has been changed with newer versions of Ubuntu/CentOS. [131044830040] |One example here [131044830050] |For another example, try something like this. [131044830060] |Make your FIFO: [131044830070] |And add this to (r)syslog.conf, then restart syslog: [131044830080] |Then view the FIFO from one window: [131044830090] |And in another window, send some stuff to syslog: [131044830100] |You should see the "Test*" lines in the output of cat above. [131044830110] |This feature can be great for debugging, especially if you don't care to keep the data around for longer. [131044830120] |For example, if you only want to see everything except for thefirewall spam, you can do something like this: [131044840010] |Here's my second answer. [131044840020] |This is a pretty hackish. [131044840030] |Use watch(1) to repeatedly execute tail --bytes=1024 (the last 1024 bytes of the logfile, thanks to @jjclarkson for that answer). [131044840040] |And then view the file with: [131044840050] |The difference between watch and a while loop is that watch will only update /tmp/messages.watch if there were changes to /var/log/messages . [131044840060] |And well, I guess you could put a test in the while loop so that tail is only executed if /var/log/messages was updated, but I won't figure that out now. [131044850010] |How to calculate the volume of data transferred between two Unix machines [131044850020] |I have two Linux machines that keep pinging each other. [131044850030] |With each ping request they attach a data packet in the response. [131044850040] |The frequency of the pings can not be determined. [131044850050] |How do I determine how many GB's of data they transfer to each other via the Network ? [131044860010] |you can see statistics with ifconfig. [131044870010] |You can check which program is using data with nethogs (http://nethogs.sourceforge.net/). [131044880010] |Assuming you have root access to s Linux machine somewhere on the path (either endpoint, or even a router in between), you can write an iptables rule that matches the application traffic and directs it to a particular chain that does nothing but accept all packets. [131044880020] |The kernel maintains a byte and packet counter on each chain. [131044880030] |Assuming the packets you want to count go from IP 10.1.2.3 TCP port 42123 to IP 10.7.8.9 TCP port 42789: [131044880040] |Replace FORWARD by OUTPUT on the source host, by INPUT on the destination host. [131044880050] |You can read the counters with iptables -nvxL FORWARD 42 where 42 is the number of the rules (the first rule is number 1). [131044880060] |Do this for each direction if you want to count both directions. [131044880070] |Read the counters at known time intervals to measure bandwidth usage. [131044880080] |You can gain a little flexibility if you create an intermediate chain. [131044880090] |With this setup, the counter for the myapp_counter will include traffic in both directions. [131044880100] |Another benefit of going through a chain is that you can atomically read the counter on the chain and set it to 0 with iptables -nvxZL myapp_counter. [131044880110] |And you don't need to figure out the rule number, so it's easier to automate the setup. [131044890010] |Which GUI svn client allows searching through history? [131044890020] |I'm looking for GUI tool that allows searching svn history, and more than just log messages. [131044900010] |If you want to search through an entire svn repository, one setup that comes to mind is to serve the repository over HTTP with WebSVN, ViewVC or other similar package, plug in your favorite website indexer, and use a web browser to perform searches. [131044910010] |How to make Fedora user a sudoer? [131044910020] |I want to give a Fedora user sudo powers. [131044910030] |How to do that? [131044920010] |I suppose that the first question is, do you have sudo installed on the server(s) in question? [131044920020] |Assuming so, it is just a matter of deciding whether you want to treat the user as a unique entity or as part of a group, a group which may have only 1 member. [131044920030] |The command visudo as root will give you access to edit the sudoers file, often /etc/sudoers. [131044920040] |the former: [131044920050] |the latter: [131044920060] |These are merely two examples, the sudo package has a tremendous number of features and settings options at your disposal. [131044920070] |I recommend reading the sudoers, sudo's configuration file, manual. [131044920080] |I would also recommend starting simple and building up to the actual desired configuration. [131044930010] |Not sure if this has been deprecated, but in FC6 you could simply: [131044930020] |add the user to the wheel group [131044940010] |Add the user to the wheel group: [131044940020] |and the use visudo to edit the sudoers file, removing the # from this line: [131044940030] |Work is in progress to make this the default in Fedora 15. [131044940040] |See also this question and answer over on Server Fault for information on granting sudo-like "auth as self" behavior to wheel group members for graphical apps which use consolehelper or PackageKit. [131044950010] |How to set visudo to use a different editor than the default on Fedora? [131044950020] |Fedora 14 uses vi by default when one runs visudo. [131044950030] |Is there a way to change this to something else? [131044960010] |Adding Defaults editor=/path/to/editor in the sudoers file will cause visudo to use the specified editor for changes. [131044960020] |Additionally, if your sudo package has been built with --with-env-editor, as is the default on some Linux distributions, you can also set the EDITOR environment variable by executing export EDITOR=/path/to/editor. [131044960030] |Performed on the command line this will revert as soon as that shell session is terminated, setting the variable in a ~/.bashrc or /etc/profile will cause the change to persist. [131044970010] |A normal unix program that wants to invoke an editor will run the program whose name is in the EDITOR or VISUAL environment variable, and if the variable is unset, a system-dependent default. [131044970020] |Many, but not all, programs check both EDITOR and VISUAL; the distinction is long obsolete (once you would run EDITOR on a teletype and VISUAL on a “glass” terminal…) so you should set both to the same value. [131044970030] |There is some disagreement as to whether the contents of the variable should be the full path to an executable, an executable name that's looked up in $PATH, or a shell snippet, so you should stick to a path to an executable not containing any shell metacharacter. [131044970040] |The system default when neither variable is set is traditionally vi, though some distributions have changed this to a more newbie-friendly editor such as nano. [131044970050] |visudo checks both VISUAL and EDITOR (this can be compiled out, presumably to dissuade root from using an editor whose security the distribution maker doesn't trust, but even OpenBSD doesn't do this). [131044980010] |How do I copy DVDs [131044980020] |Preamble: [131044980030] |We are down to the final stages for creating a school-play dvd. [131044980040] |Editing is almost done, discs are printed and ready. [131044980050] |Just need to burn the dvd's now. [131044980060] |However, doing our pencil calculations, if we burned every disc with our production computer ( Apple G5 , taking a estimated 10-20 minutes ) we don't really have enough time to finish all the DVD's ( 100 or so ) before deadline. ( 11 hours away ). [131044980070] |The solution to this problem is to include my linux laptop into the burning process to reduce the workload. [131044980080] |So my question is: [131044980090] |If I had one DVD ( no security encryptions or licencing issues ) and I wanted to make 20 perfect copies really fast. [131044980100] |What tools would I need and and what how would I use them? [131044980110] |Would prefer command line here. [131044980120] |Bonus question: [131044980130] |Any tips on speeding up the Apple's Burn Proccess? [131044980140] |Using Pro Studio 4. [131044990010] |Not very difficult. [131045000010] |If you don't want to go through the command line, k3b is the KDE burning software. [131045000020] |I'm not sure what gnome would use. [131045010010] |Why is the printer reversing black and white? [131045010020] |I'm printing documents and images to a Samsung ML1630. [131045010030] |It used to work fine, but now it prints white instead of black, black instead of white. [131045010040] |Text documents come out white text on solid black background. [131045010050] |Of course, it used to work fine. [131045010060] |Before declaring the printer itself guilty, is it possible that something in my Linux setup, the kernel or printer driver or some hidden setting somewhere is causing this trouble? [131045010070] |Since this problem appeared about a month ago, I've updated everything with the package manager, rebooted a couple times, and the problem persists. [131045010080] |Can't blame it on a cosmic ray! [131045020010] |I had something like this happen a while back and we eventually tracked it down to some Postscript code which told the printer to print in negative, but was not revoked, and was persistent through reboot. [131045020020] |Rest to defaults fixed it, but it took us a while going back through the logs to figure it out. [131045030010] |Delete from cursor to end of line on VI [131045030020] |I know I've probably looked over this a million times in all the VI documents I've read, but I can't seem to find the delete from cursor to end of line command. [131045040010] |The command dw will delete from the current cursor position to the beginning of the next word character. [131045040020] |The command d$ will delete from the current cursor position to the end of the current line. [131045050010] |One of the nice things about vi is its logical command structure. d followed by a motion command deletes to the target of that motion. $ moves to the end of the line (mnemonic: like in regexps). [131045050020] |So d$ deletes to the end of the line. [131045050030] |Similarly, e moves to the end of the current word, and w moves to the beginning of the next word; so de deletes the end of the current word, and dw additionally deletes the following whitespace. [131045060010] |You probably want to use D. Move the cursor to the first character you want to delete, then hit shift-D. [131045060020] |Everything gone. [131045060030] |Actually, it's in the default cut buffer, so you can P or p paste it back in. [131045060040] |I use Dp (delete to end of line, then put it back), move to the end of some other line, then p again to paste the same text in at the end of this other line. [131045060050] |Works wonders in config files, where you need to put some complicated URL in two or more places. [131045070010] |Is gnu coreutils sort broken? [131045070020] |Consider the following input to sort: [131045070030] |Now try running sort foo [131045070040] |The output is not sorted when trying this on any of my linux boxes (gnu coreutils versions 6.9-7.4). [131045070050] |The output is sorted when run under cygwin (gnu coretuils 8.5). [131045070060] |Comments? [131045080010] |Sorting depends on the locale; specifically, it depends on $LC_COLLATE (possibly overridden by $LC_ALL), falling back to $LANG if it doesn't exist. [131045080020] |The command locale will show you what values you're effectively working with. [131045080030] |See man 3 strcoll, man 3 setlocale, etc. [131045080040] |LC_COLLATE=C (or POSIX or no locale at all) results in a strict byte-by-byte comparison. [131045080050] |LC_COLLATE=en_US.utf8 results in an alphabetical-equivalence sort, with punctuation ignored and characters within the same equivalence class treated equally. [131045080060] |(I think.) [131045090010] |Activating WiFi in Fedora [131045090020] |I am using a Fedora 13 OS and i see that in the network connections the WiFi thing has been disabled. [131045090030] |Generally when there is a WiFi connection around it would show in the Wireless networks option, but it is not showing for me. [131045090040] |What to do, in order to keep the WiFi mode always active. [131045090050] |ADDED [131045090060] |I have tried the following [131045090070] |It says the mode is off. [131045090080] |ifconfig wlan0 gives me the following output: [131045090090] |wlan0 Link encap:Ethernet HWaddr 00:19:7D3:0C:FD UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [131045090100] |iwconfig has the following: [131045090110] |wlan0 IEEE 802.11bg Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off [131045100010] |Why do you bother with weird iwconfig commands. [131045100020] |Have you used "nm-applet" command? [131045100030] |This is a GNOME Network Management applet. [131045100040] |I tried to manage wireless connections with iwconfig on my Fedora's laptop but gave up. nm-applet does all the job you need. [131045100050] |Just select auto-connect option for your wireless connection and it will connect you each time wifi is up. [131045100060] |I use this applet in PekWM window manager with bmpanel application. [131045100070] |This is because Pekwm does not have panel itself. [131045110010] |Access to original contents of mount point [131045110020] |On my headless NAS I have sdf1 (a flash-card) mounted as / while /home is mounted from lv00 (an LVM volume backed by a software RAID). [131045110030] |To be able to access the machine when the RAID fails, I have a copy of my ssh public key, etc. in /home/foo/.ssh on the file-system from sdf1. [131045110040] |To update the files that are hidden by the mounted /home I normally remount lv00 in /mnt/home, do what I have to do, and then move lv00 back in place. [131045110050] |Is there a way to achieve this without unmounting /home? [131045120010] |You can move the mount to a new location without unmounting it, using mount --move: [131045130010] |As long as you use --bind (as opposed to --rbind), you get a clone of the mount without the stuff mounted on top of it. [131045140010] |Why do we use "./" to execute a file? [131045140020] |Why do we use ./filename to execute a file in linux? [131045140030] |Why not just enter it like other commands gcc, ls etc... [131045150010] |If you mean, why do you need ./ at the start - that's because (unlike in Windows), the current directory isn't part of your path by default. [131045150020] |If you run: [131045150030] |your shell looks for ls in the directories in your PATH environment variable (echo $PATH to see it), and runs the first executable called ls that it finds. [131045150040] |If you type: [131045150050] |the shell will do likewise - but it probably won't find an executable called a.out. [131045150060] |You need to tell the shell where a.out is - it it's in the current directory (.) then the path is ./a.out. [131045150070] |If you're asking why it's called "a.out", that's just the default output file name for gcc. [131045150080] |You can change it with the -o command line arg. [131045150090] |For example: [131045160010] |You need the ./ bit to tell the shell where the executable is, since the current directory is unlikely to be in $PATH. [131045160020] |You can use which to get the full path to "other commands." [131045170010] |The literal answer is as others have given: because the current directory isn't in your $PATH. [131045170020] |But why? [131045170030] |In short, it's for security. [131045170040] |If you're looking in someone else's home directory (or /tmp), and type just gcc or ls, you want to know you're running the real one, not a malicious version your prankster friend has written which erases all your files. [131045170050] |Having . as the last entry in your path is a bit safer, but there are other attacks which make use of that. [131045180010] |Clarification on PowerVM [131045180020] |I have a few things that I was hoping someone with more experience could clarify in regards to using PowerVM (specifically to virtualise via LPARs AIX). [131045180030] |So here is what I think I understand regarding PowerVM/LPAR's etc: [131045180040] |
  • PowerVM itself (i.e. the Hyper-visor/firmware) has no hostname or IP Address of it's own (Excluding things like RSA cards).
  • [131045180050] |
  • PowerVM is just a hyper-visor/firmware and not a full Operating System.
  • [131045180060] |
  • Resources are controlled/distributed to the individual LPAR OS's via a VIOS LPAR, which in turn is managed by either a HMC and/or an IVM.
  • [131045180070] |Now I'm not overly familiar with IBM virtualisation (More used to Windows/Linux/Solaris) so what I was looking for is if someone could either confirm or clarify these points for me? [131045190010] |How can produce an "installer" in Linux ? [131045190020] |How can I produce an installer for a set of source codes for a specific application in Linux? [131045190030] |Also, what are the actions happening when one installs software in Linux? [131045200010] |Prepare a makefile and make a tarball with just the source code and let every user compile it as they seem fit, and/or build an RPM package (or a .deb or something else, RPM packages are supposed to be standard). [131045210010] |Some commercial software or games sometimes uses Nixstaller: [131045210020] |Nixstaller is an Open Source project with the goal to create user friendly and flexible installers that work on various UNIX like systems. [131045210030] |Using Nixstaller we can create installers that works on most modern distributions, can install app locally or in system and looks like Windows installers ;). [131045210040] |But the best solution is to create native packages for each distribution so it could be managed via system package manager. [131045210050] |For more details information about this you need to write more details about what you want to accomplish. [131045220010] |As there's more than one Linux distro, there's also more than one package management solution. [131045220020] |I think that creating an app installer depends more on the target audience than on the target system. [131045220030] |
  • If you plan to produce an installer for confirmed Linux users, then a source tarball will suffice.
  • [131045220040] |
  • If you target desktop users or non-confirmed Linux users, then produce DEB and RPM packages since those two package management tools cover the major Linux distros.
  • [131045220050] |Also what is the actions happening when we install a software in Linux? [131045220060] |For source tarballs, nothing actually. [131045220070] |The user is left alone to compile the source archive and figure out what are the dependencies (libraries and so on) without what the application wouldn't run. [131045220080] |For DEB and RPM (and other package management tools) the process of figuring out what dependencies are needed and the installation operation, is managed entirely by the package management tool(a connection to the Internet is needed to download the dependencies). [131045220090] |The package management tool is responsible for registering the just installed app and all its dependencies in a local registry system so it wouldn't be necessary to install them once more for future needs. [131045220100] |WIKI [131045220110] |DEB: a Debian package file. apt is Debian's package management tool. [131045220120] |RPM: RedHat Package Manager file. [131045220130] |The same name goes for the package management tool. [131045230010] |New to unix, Where should i start? [131045230020] |Possible Duplicate: Beginning to learn Unix and Linux [131045230030] |I was working with .net for the past few years and now i am put into a project that has unix. [131045230040] |I really dont know unix. where should i start? [131045230050] |Any suggestion... [131045240010] |There are many resources available if you simply do a google search for an example this turns up in a a search and looks like a decent introduction: [131045240020] |http://structbio.vanderbilt.edu/comp/unix/part01.php [131045240030] |Of course depending on exactly what Unix OS(s) you'll be working with you will want to look at some details for that particular OS as there are some differences. [131045250010] |Things that come to mind: [131045250020] |
  • Learn from you co-workers which are already on the project.
  • [131045250030] |
  • Read a book a two about Unices and the variant you're involved in.
  • [131045250040] |
  • When in trouble: think, read the manuals, use the web search, ask colleagues, ask here (in that order!)
  • [131045250050] |
  • Learn from your errors.
  • [131045250060] |
  • Enjoy
  • [131045260010] |How do I autostart an application in Gnome when a volume is mounted? [131045260020] |According to Gnome's Desktop Application Autostart Specification, I should be able to have a program execute simply by naming it any of ".autorun", "autorun", or "autorun.sh". [131045260030] |None of these seem to work: I get a prompt from nautilus-autorun-software asking if I want to let it run, I say "Run", and it results in a dialog that says "Error autorunning software: Cannot find the autorun program". [131045260040] |Is it a bug or am I not doing something correctly? [131045260050] |The autorun file contains the following: [131045260060] |It works if I manually run the autorun file. [131045260070] |The filesystem is fat, here's the mtab entry: [131045270010] |How to shut down the computer after a task has been completed? [131045270020] |I usually start a download before I go to school. [131045270030] |Which command should I use to automatically make the necessary saves and turn off the computer after a particular task has been completed? [131045270040] |(Say, after installing the updates, or after downloading a large file.) [131045270050] |I have also cross-posted at askubuntu. [131045280010] |You can use the &&and || operators to chain commands together. [131045280020] |For example: [131045280030] |which will perform an update to the system using aptitude, wait 2 seconds, and go to runlevel 0, depending on your system this may or may not actually power off the hardware. [131045280040] |To speak to one or more operations following a more arbitrary operation, such as a, presumably web browser, download you would require additional logic to watch the downloading file to verify that the download has in fact completed, however, the shell logic is unchanged. [131045290010] |It depends you started task. [131045290020] |If it is some command line tool you could simply run halt or shutdown -h now: [131045290030] |
  • wget http://..../somelargefile; halt - halt will be executed after wget
  • [131045290040] |
  • wget http://..../somelargefile &&halt - halt will be executed if wget return no errors
  • [131045290050] |
  • wget http://..../somelargefile || halt - halt will be executed if wget return errors
  • [131045290060] |Alternative to this is using kshutdown - in this app you can specify what action should be done (reboot/shutdown/hibernate/etc or command execution) and when (after some time or when another application exits). [131045290070] |If you want to use this tool you need to chose correct process - some update utilities starts few subprocesses. [131045300010] |What is Debian's stance regarding GCJ and OpenJDK? [131045300020] |Both OpenJDK and GCJ are available for install on Debian, and now I wonder what's happening. [131045300030] |Don't these provide same functionality? [131045310010] |They are fine with both for the most part, OpenJDK is installed by default on supported platforms, when it's not available they use GCJ instead. [131045310020] |Reference : http://wiki.debian.org/Java [131045320010] |Debian's stance is that, beyond certain critical system components which are considered required¹, there is no preferred software. [131045320020] |If two programs provide similar functionality, and they're both suitable for Debian², and there's a Debian developper willing to maintain each package, then both programs will end up in Debian. [131045320030] |The idea is that it's up to the user to choose which program to use. [131045320040] |On a given system, at most one Java implementation can be /usr/bin/java. [131045320050] |This is decided through the alternatives mechanism: each Java implementation has a priority (decided by common agreement amongst the maintainers of the Debian packages involved), and whichever implementation that is installed on a particular system has the highest priority gets to be /usr/bin/java. [131045320060] |The system administrator can override this by manually changing the /etc/alternatives/java symbolic link. [131045320070] |And if there are several JVMs installed, users can choose on a case-by-case basis to run /usr/lib/jvm/java-6-openjdk/jre/bin/java, /usr/lib/jvm/java-6-sun/jre/bin/java, etc. [131045320080] |¹ Or at least strongly advised. ² The best-known requirement is that the program must be free software, with some exceptions (non-free); another is that it must not be too buggy. [131045330010] |Solaris find previous log line. [131045330020] |Hi [131045330030] |We are running solaris 10 at work. [131045330040] |What I'd like to do is find the line previous to another line. [131045330050] |Real live example. [131045330060] |I can find out that some of our requests are timing out with the following query. [131045330070] |grep timeout log.log. [131045330080] |This gives me something similar to: [131045330090] |In the log files though but it may be several lines previous we log about to call [131045330100] |2010-11-30 20:56:57,495 INFO [82.69.73.87 - 342E15CB9651927BE715780FC40DEC53 - 3675058] about to call http://www.example.com [131045330110] |So what I would like to do is identify all timeouts and then identify all the "about to call" lines which are directly previous and have the same IP address or session. [131045330120] |In the above example it would be finding the previous row containing "342E15CB9651927BE715780FC40DEC53" is this possible with the standard shell tools? [131045350010] |Untested, but something like [131045350020] |probably works. [131045360010] |This looks like a job for awk. [131045360020] |Assuming your logs are sufficiently regular (in particular I'm extracting the session cookie as the 6th field): [131045370010] |Using nohup on Solaris 10 [131045370020] |I need to transfer a large number of files over SFTP (only between Solaris servers) which takes a very long time. [131045370030] |I cannot keep my PC on for this duration. [131045370040] |I tried: [131045370050] |While the shell is open, I see files are downloaded. [131045370060] |When I close the shell it stops. [131045370070] |In ps -ef I don't see the sftp process. [131045370080] |The file nohup.out states: Killed by signal 15 [131045370090] |If instead I do ctrl-z, bg, disown it works. [131045370100] |However this requires the bash shell; how can I do this in ksh? [131045380010] |You can do Ctrl+Z, bg, disown in ksh as well. [131045380020] |You'd want that in addition to nohup, i.e., [131045380030] |However my recommendation here would be to use screen. [131045380040] |In OpenSolaris, it's in the SUNWscreen package. [131045380050] |Run screen, which starts a shell in a new virtual terminal. [131045380060] |Run sftp server inside that shell (you can also directly run screen sftp server). [131045380070] |Initiate your transfer, then type Ctrl+A D to disconnect (“detach”) from the screen session. [131045380080] |The processes inside the session will keep running. [131045380090] |Later, you can reattach to that screen session with screen -rd. [131045390010] |
  • SFTP as normal
  • [131045390020] |
  • Ctrl-z
  • [131045390030] |
  • nohup -ga $(pgrep sftp)
  • [131045400010] |Why is Debian not creating the 'wheel' group by default? [131045400020] |It appears to be Unix tradition that a wheel group is created automatically, but Debian (and children, naturally) doesn't do so. [131045400030] |Is there a rationale somewhere? [131045400040] |Where else have you seen this tradition discarded? [131045410010] |Because wheel is a tool of oppression! [131045410020] |From info su: [131045410030] |

    Why GNU 'su' does not support the 'wheel' group

    [131045410040] |(This section is by Richard Stallman.) [131045410050] |Sometimes a few of the users try to hold total power over all the rest. [131045410060] |For example, in 1984, a few users at the MIT AI lab decided to seize power by changing the operator password on the Twenex system and keeping it secret from everyone else. [131045410070] |(I was able to thwart this coup and give power back to the users by patching the kernel, but I wouldn't know how to do that in Unix.) [131045410080] |However, occasionally the rulers do tell someone. [131045410090] |Under the usual `su' mechanism, once someone learns the root password who sympathizes with the ordinary users, he or she can tell the rest. [131045410100] |The "wheel group" feature would make this impossible, and thus cement the power of the rulers. [131045410110] |I'm on the side of the masses, not that of the rulers. [131045410120] |If you are used to supporting the bosses and sysadmins in whatever they do, you might find this idea strange at first. [131045410130] |See also the Debian Reference. [131045410140] |Anyways, the sudo group is built in so who needs wheel? [131045420010] |Some unix systems allow only members of the wheel group to use su. Others allow anyone to use su if they know the password of the target user. [131045420020] |There are even systems where being in the wheel group grants passwordless root access; Ubuntu does this, except that the group is called sudo (and doesn't have id 0). [131045420030] |I think wheel is mostly a BSD thing. [131045420040] |Linux is a mix of BSD and System V, and the various distributions have different default policies with respect to granting root access. [131045420050] |Debian happens not to implement a wheel group by default; if you want to enable it, uncomment the auth required pam_wheel.so line in /etc/pam.d/su. [131045430010] |Pacman/Arch: Install package(s) without really installing them [131045430020] |Possible Duplicate: Make package explicitly installed in pacman [131045430030] |So I've been stupid and removed my /var/lib/pacman/local dir. Without backup, but with a root shell open at tty4. [131045430040] |O yeah, pacman -Sf with the base repo also overwrites your /etc/passwd. [131045430050] |Thank god for .pacorig. [131045430060] |I still have my pacman logs, but all the packages are already installed. [131045430070] |Pacman outputs errors that the files already exist. [131045430080] |How can I install packages without modifying files? (pacman -S --fake --noextract) I've also tried the -D switch but that only works for installed packages. [131045440010] |Linux advice for datalogging machine [131045440020] |I've been asked whats the cheapest/easiest/most reliable way to use Linux as a webserver/mysql DB machine. [131045440030] |Is it going to be buying a really old PC and putting Linux on it or what i'd rather do is get one of these SBC (single board computers) to cut down on cost and just house it in a casing. [131045440040] |This is going to sit on an ethernet network and be UPS'd up. [131045440050] |But i'm just wondering from a hardware point of view what people would/have done? [131045450010] |If you use an old PC it is more likely to fail at some point because of its age. [131045450020] |If it is not very heavy work what you are going to do on it then I would suggest an atom nettop like the acer aspire revo or the msi wind box. [131045450030] |They are cheap, I've got one running here also (debian, motion webcam server). [131045450040] |Maybe you could look at a VPS, those are also not more than 10-20 dollars/month. [131045450050] |You then don't have the power cost. [131045450060] |Overall Linux runs fine on almost everything, but if you want reliable hardware then I would suggest something modern (with warranty :P) [131045460010] |Using an old PC for a low-computing-power application is often a false economy. [131045460020] |You're likely to have to do a lot of maintenance as part fail (and direct costs to replace these parts if you can't find spares). [131045460030] |You'll also be using ~100W of power where a single-board computer might use ~10W. [131045460040] |If you already have an always-on modern PC, and your application doesn't need to be physically separate, running it in a virtual machine is the cheapest solution. [131045460050] |Failing that, go for an ARM-based appliance (usually ends up cheaper than Intel, especially if electricity is expensive in your locale). [131045470010] |If you do want to use an old PC, get 2 with the same specs. [131045470020] |You not only can use them in a redundant mirrored mode, but you can replace parts from the others to keep 1 running if (or when) failures occur. [131045470030] |to be fair, I've only seen failures from HDDs generally. [131045470040] |Old PCs just keep on running, but I have had a motherboard fail on me once in all my years of playing with old PC kit. [131045470050] |RAM has never failed, nor has a graphics card. [131045470060] |You'll want to RAID your HDDs, and run with relatively modern units. [131045470070] |Otherwise, if you're buying new or need reliability/support, it's probably better to go with the other answers given: ARM or Atom based mini/htpc style PCs. [131045480010] |Screen turns on automatically (xset dpms force off) [131045480020] |I am using xset dpms force off to manually turn my screen off to save power. [131045480030] |However, it turns back on after some time (20 - 40 seconds). [131045480040] |Distro: Ubuntu-Lucid [131045480050] |Graphics: Intel 4500 MHD [131045480060] |Trying steps in this solution (Turning off screensaver or wireless) did not work. [131045480070] |Can it be due to any other reasons like network (magic packet) or usb devices? [131045480080] |Result of xset -p: [131045490010] |I've had that problem before, basically my mouse was causing it, flip the side on it's back when you aren't using it. [131045500010] |This seems to be a known bug and you can read more detail on launchpad as well as on ubuntuforums. [131045500020] |The issue is that somehow gnome-power-manager and the xset commands conflict with each other. [131045500030] |The solution is to run xset dpms force off in a loop, a python script pretty much works for most of us. [131045500040] |Give it a try, and see how it goes. [131045510010] |e2fsck: unable to set superblock flags on LogicalVolume [131045510020] |When I boot my machine either in normal mode or runlevel 1 it throws following error and I'm unable to boot the machine: [131045510030] |checking filesystems /dev/MyGroup/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANNUALLY (i.e., without -a or -p options) [131045510040] |*** An error occured during the file system check *** Dropping you to a shell; the system will reboot *** when you leave the shell Give root password for maintenance (or type Control-D to continue): [131045510050] |I enter the password and run fsck and e2fsck, but both gives the same error format as shown below: [131045510060] |OR [131045510070] |Now I decide to use alternate superblock as follows: [131045510080] |To repair file system by alternative-superblock use command as follows: [131045510090] |After using all alternate superblocks I am getting the same error message as shown below: [131045510100] |e2fsck 1.39 (29-May-2006) /dev/MyGroup/LogVol00: recovering journel e2fsck: unable to set superblock flags on /dev/MyGroup/LogVol00: [131045510110] |How can I troubleshoot this type of problem? [131045520010] |You don't mention that you were making configuration changes before you rebooted and got the error. [131045520020] |If you were making changes then that might give a clue as to where to look. [131045520030] |However assuming that this just happened without any configuration being changed. [131045520040] |First off you may have a real disk problem. [131045520050] |Look at the output from the [131045520060] |command and see if that lists any issues after you have run the e2fsck command. [131045520070] |If that doesn't show any likely causes then check the status of your logical volume. [131045520080] |Use [131045520090] |That will list a number of things. [131045520100] |In particular look at the LV Write Access, LV Status and "LV Size" entries in the output. [131045520110] |Readonly access or the wrong partition size would cause things to go wrong. [131045530010] |Disable mouse (not touchpad!) in Xorg while idle [131045530020] |I am an avid keyboard user, but I still need the mouse every now and then. [131045530030] |To minimize the hand travel, I have the mouse located below my keyboard. [131045530040] |(On a side note, using the mouse this way feels more natural to my hand.) [131045530050] |I am currently using unclutter to hide the pointer while I don’t use the mouse. [131045530060] |Unfortunately, I am nudging it at times while typing, which causes the pointer to reappear. [131045530070] |Sometimes this will move the pointer over another window, which in turn takes the focus away from my current window. [131045530080] |(I am using sloppy focus, and changing this is not an option.) [131045530090] |I am now searching for a possibility to not only hide the pointer after a certain amount of idle time, but disable the mouse altogether. [131045530100] |Clicking any mouse button or using the mouse wheel should then re-enable the mouse. [131045540010] |Have you tried a "Pointer Capture" Gnome panel applet? [131045540020] |The mouse pointer can be locked into an area of the screen so the pointing device is free for other tasks. [131045540030] |For example, this capability allows a powerchair user to control both the powerchair and the mouse pointer with a single powerchair joystick [131045540040] |The Pointer Capture panel applet creates such an area on the panel, into which the user can lock the pointer until released in a determined way. [131045540050] |The Pointer Capture panel applet can be installed by right-clicking the GNOME Desktop menu bar / system panel, selecting Add to Panel, choosing Pointer Capture and clicking the Add button [131045540060] |In case the description from gnome.org isn't clear, this will create an area in the panel where when the mouse enters (or you clic), the cursor will disappear and won't reappear until a defined action occurs, for example a second click. [131045540070] |Sounds like exactly what you need? [131045550010] |First thing that we need to accomplish is turning off mouse, but only in X. For this we could use xinput. [131045550020] |We need to discover input devices that are connected to computer (to X server): [131045550030] |Device that we need to use is A4Tech USB Mouse with id=10. [131045550040] |Next we need to check properties of that device: [131045550050] |To turn off device we need to change property Device Enabled: [131045550060] |To turn it on: [131045550070] |Next thing is to do it automatically... ;) In this example we will be disabling mouse by keyboard shortcut and enable it by pressing left + right mouse button. [131045550080] |For this we could use actkbd - keyboard (but not only) shortcut daemon that works outside of X server. [131045550090] |First we need to create empty configuration file for actkbd: touch /etc/actkbd.conf. [131045550100] |Next thing is to discover devices connected to computer: [131045550110] |In this part most interesting for use are names and handlers of keyboard and mouse devices. [131045550120] |First we handle turning off mouse by keyboard shortcut, so we need to discover key ids: [131045550130] |When we know what are keys ids we need to put them to config file (/etc/actkbd.conf): [131045550140] |To test it out we need to run actkbd in daemon mode: [131045550150] |In the same way we need to handle "turn on" event: [131045550160] |
  • Check handlers of mouse device
  • [131045550170] |
  • Check key codes of left+right mouse button using actkbd
  • [131045550180] |
  • Put it to actkbd.conf
  • [131045550190] |
  • Run actkbd daemon to monitor mouse input device
  • [131045550200] |Running daemons could be realized as init script or autorun script in environment. [131045550210] |To automatically turning mouse off we could monitor input device (cat /dev/input/event5) and turn it off when there is no input... [131045550220] |I hope that my short intro will help you... ;)