[131014430010] |Which less popular shells do you use and what are their advantages? [131014430020] |Apart from what you can (arguably?) call the more popular shells (bash, csh, Korn, zsh) what other ones do you know and use and what unique features do they have? [131014430030] |ps - One answer per shell would be ideal to gather a meaningful survey [131014430040] |Thank you! [131014440010] |I'm currently using Zsh, but I believe it's the new trend in shells. [131014440020] |I haven't gotten down and dirty with it so far, but as far as i can tell it has nifty autocompletion support, right-side prompt, multiline command editing and some other nifty stuff. [131014450010] |I've been using tcsh for years. [131014450020] |Its backwards compatible with csh, but adds a bunch of useful features like command completion, command history, etc. [131014450030] |This is just for interactive use. [131014450040] |For scripting, I don't think there is any reason to use anything other than bash. [131014460010] |I like fish, although I rarely use it myself. [131014460020] |It's tremendously helpful for beginners who haven't met sh and think bash is unfriendly. [131014470010] |Vim 7.3 with Lua: How do I use it? [131014470020] |The latest Vim release is awesome! [131014470030] |I compiled it with --enable-luainterp=yes and it does have the Lua feature: [131014470040] |But how do I actually use it? [131014470050] |Up until now, I was always using Vim script for my files, but how do I let it interpret Lua? [131014470060] |And what are the bindings that I can use from inside Lua? [131014480010] |So Vim 7.3 is new enough that there isn't much information about the Lua integration. [131014480020] |However, vim has had similar support for python, ruby, perl, and tcl. [131014480030] |So: [131014480040] |Simple tutorial for python [131014480050] |Another python guide [131014480060] |As well as example tutorials for the other languages, you should definitely read the vim help for Lua, do [131014480070] |to see comprehensive help and some examples. [131014480080] |Have fun! [131014490010] |Redirecting stdout to a file you don't have write permission on [131014490020] |When you attempt to modify a file without having write permissions on it, you get an error: [131014490030] |Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway: [131014490040] |Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way? [131014500010] |Yes, using tee. [131014500020] |So echo test >/tmp/foo becomes [131014500030] |You can also append (>>) [131014510010] |tee is surely a good choice, but how about this? [131014510020] |EDIT: as per hop's comment, there is a better way [131014530010] |What does "Empty print file" mean and how can I diagnose it? [131014530020] |When trying to print I get this error. [131014530030] |What does it mean? [131014530040] |How can I diagnose it? [131014540010] |This question can't be simply answered. [131014540020] |It usually means that something with your printing device driver is messed up. [131014540030] |Any additional information? [131014540040] |Most likely you are using CUPS. [131014540050] |Did you have a look at the logfiles? /var/log/cups/ ? [131014540060] |Maybe this will help you, to specify your questions. [131014540070] |Try to do some printing at a low level to eliminate any error sources with some applications. [131014540080] |Have a read through the manual: http://www.cups.org/documentation.php especially at "Command Line Printing" http://www.cups.org/documentation.php/doc-1.4/options.html [131014540090] |This will give you some basic diagnostic tools. [131014550010] |Is there a way to limit the amount of memory a particular process can use in Unix? [131014550020] |I need to test a process for memory management. [131014550030] |
  • I do not have the source, so I need to do all the testing from the OS side.
  • [131014550040] |
  • I want to be able to say something like limitmemory 400k -p
  • [131014550050] |Is there a way to do this in unix? [131014550060] |Any common unix utility would be excellent. [131014560010] |ulimit -v, it's a shell builtin, but it should do what you want. [131014560020] |I use that in init scripts sometimes: [131014560030] |It seems however, that you want ways of manipulating the maximum allocatable memory while the program is running, is that correct? [131014560040] |Probably something like renice for manipulating the Priority. [131014560050] |There is, however, no such tool to my knowledge. [131014570010] |There is the setrlimit() function, which allows to configure a process' limits in C. Write a C program to call setrlimit then to exec the command you want to be limited. setrlimit cannot change other processes' limits. [131014570020] |Luckily someone already wrote something similar. [131014570030] |It can be downloaded from freshmeat. [131014570040] |I had a quick look at the source code and it seems to be fine. [131014570050] |Use rlimit at your own discretion. [131014570060] |Note that rlimit also cannot change other processes' limits. [131014570070] |Edit: Gilles proposed a nice hack with gdb: Attach to the process with gdb then make the process call setrlimit. [131014570080] |This would perhaps solve the problem to limit an already running process. [131014580010] |If you just want to test and measure the memory usage of your program please look at time. [131014580020] |You can measure the resource usage of your program in many aspects including the terms of CPU Time and memory usage. [131014580030] |Following command will give you the memory usage and CPU time usage of myProgram: [131014580040] |(Be sure to give the absolute path to distinguish it from bash built-in time command.) [131014580050] |If you just want to limit the resources of your process, i recommend you to create a test user for this specific task. [131014580060] |Limit the resources of this user according to your needs and run the process by the user. [131014580070] |It seems that, in *nix world, resource management based on users is much more advanced than resource management based on processes. [131014580080] |You can check /etc/security/limits.conf to limit the resources of a user. [131014580090] |Or you can use ulimit after logged in with the to-be-limited user. [131014590010] |To set the limit when starting the program, use ulimit -v 400, as indicated by polemon. [131014590020] |This sets the limit for the shell and all its descendants, so in a script you might want to use something like (ulimit -v 400; myprogram) to limit the scope. [131014590030] |If you need to change the limit for a running process, there's no utility for that. [131014590040] |You have to get the process to execute the setrlimit system call. [131014590050] |This can often be done with a debugger, although it doesn't always work reliably. [131014590060] |Here's how you might do this with gdb (untested; 9 is the value of RLIMIT_AS on Linux): [131014600010] |I'm not very sure about this, but you could also use cgroups to limit the memory usage. [131014600020] |The advantage of cgroups is that you can control processes that are already running. [131014600030] |By the way systemd will use cgroups to control the system services. [131014600040] |Unfortunately I've experimented a bit and they don't seem to work very well on my Fedora 13 system. [131014610010] |How do you choose a distribution? [131014610020] |I'm currently looking at putting a Linux (although BSD is still an option) distribution on my old laptop. [131014610030] |However, I'm not sure how to wade through all of my options - rolling releases versus not, Distribution X versus Distribution Y (I, personally, have been looking at Debian, Ubuntu, Fedora, Arch, and OpenSUSE, but I suppose that's a personal preference), and so on. [131014610040] |To be honest, it's difficult to make a choice. [131014610050] |When you are installing a distribution, how do you decide which one you want to use? [131014610060] |Is it personal preference (you use your favorite distribution) or is there some guidance as to what distributions are better at specific tasks or for specific users? [131014620010] |If you know polish there is wonderful quiz and 1 vs. 1 comparation. [131014620020] |Unfortunatly I don't think it was translated (maybe Google Translator would work?) - there are however other quizes [131014620030] |Generally it depends how much: [131014620040] |
  • You know about systems
  • [131014620050] |
  • You want to have it automated - do you want to fine-tune system or have it 'just working'
  • [131014620060] |
  • What is the purpose
  • [131014620070] |Especially if you don't know anything and you don't want to spent much time I would advise Ubuntu as both user-friendly and having large and active community. [131014620080] |You may want to try other user-friendly systems. [131014620090] |If you want to go into deep of system I'd advice using more command-line oriented systems like Arch Linux, Gentoo Linux or Slackware. [131014620100] |IMHO especially Gentoo Linux is good for crash run as you will run into various problems from inexperience and you will learn to solve it. [131014620110] |On servers traditionally Debian or Slackware is used however there are many other systems. [131014620120] |However there are people who uses Debian testing or unstable as desktop systems successfully or use Gentoo Linux on production servers. [131014620130] |As of BSD they tend to have smaller communities which is disadvantage with the first-contact-with-*nix situations. [131014620140] |FreeBSD traditionally is all around operating system while NetBSD tends to run on everything. [131014620150] |OpenBSD tends to sacrifice everything in name of security and is considered rock stable even if sometimes somehow slowish. [131014620160] |The good thing is that most distribution are free so you can just try them. [131014620170] |Many have Live CD or Live USB which allows you to try them without installing (some of them functions only as Live CD - such as for example Knoppix or System Rescue CD). [131014620180] |There are many distributions which I haven't listed such as those written specificly for router. [131014620190] |Yes - the variety of choises is mixed blessing and I'm afraid the only way is to try them to find something for yourself. [131014620200] |If you don't want to try and you want to have something just working - probably Ubuntu should be your first shot. [131014620210] |As of my configuration - I use Gentoo Linux on semi-production laptop and FreeBSD on home server but I would considered myself an advanced user. [131014630010] |Personally I prefer to use a Debian based distro, I like aptitude better than yum and I know you can use another package manager if you want, but I still prefer to have the one I like preinstalled. [131014630020] |It just feels snappier. [131014630030] |I've been using Ubuntu on my main machine, but if you want better performance you should try Crunchbang Linux. [131014640010] |Generally you choose the distribution you are most familiar with and you tend to get to be familiar with the distribution you like the most. [131014640020] |If there is no particular feature in a distribution that is unique to one distribution (user-friendliness in ubuntu, commitment to open source in debian, commercial support in SuSE and Red Hat and so on) that is a must-have for you then you'll just have to choose any one and stick to it for a time. [131014640030] |If there were no reason for a distribution to exist and be popular, it wouldn't be around any more. [131014650010] |I think the various major distros have few if any large differences in technical merit between them, and such differences tend to be greatly exaggerated by the partisans. [131014650020] |In light of this, my theory is that the more users and developers are on a distro, the faster things will improve, the more hardware combinations will be well-tested, and the more software packages will supported on it. [131014650030] |So I favor picking one of the most popular, and sticking with it until it is clearly eclipsed by another. [131014650040] |Exception: There are special cases for which this rule can be superseded - for example, if you work in an industry that favors some particular distribution, it may be more important for you to be just like everybody else in your industry, rather than use the most popular distro in the Linux world as a whole. [131014660010] |I start by looking at what I want to use the machine for: [131014660020] |
  • Primary machine - distro I know well and I'm comfortable with
  • [131014660030] |
  • Spare machine - distro I don't know, and I want to learn it
  • [131014660040] |
  • Special cases: HTPC, MAME box, proxy - distro catered to these needs
  • [131014660050] |The great thing about the *nixes is that you can configure any one of them for any specific need you want. [131014660060] |Distros just allow you to reach those niches without all the manual config. [131014660070] |DistroWatch would be a good place to research. [131014660080] |You can find the latest distros if you want to go the cutting-edge route, or the most popular if you want to go that route. [131014660090] |The Weekly column could also give you some insight. [131014660100] |I don't have too much BSD experience, so I would go that route. [131014660110] |But that's just me. [131014670010] |The differences among Linux distributions are not cosmically significant. [131014670020] |In fact, it is something of a mystery why there are so many different distributions, each claiming “easy installation” and “a massive software library” as its distinguishing features. [131014670030] |It’s hard to avoid the conclusion that people just like to make new Linux distributions. [131014670040] |The most viable distributions are not necessarily the most corporate. [131014670050] |For example, we expect Debian GNU/Linux to remain viable for a long time despite the fact that Debian is not a company, doesn’t sell anything, and offers no formal, on-demand support. [131014670060] |Debian itself isn’t one of the most widely used distributions, but it benefits from a committed group of contributors and from the enormous popularity of the Ubuntu distribution, which is based on it. [131014670070] |When you adopt a distribution, you are making an investment in a particular vendor’s way of doing things. [131014670080] |Instead of looking only at the features of the installed software, it’s wise to consider how your organization and that vendor are going to work with each other in the years to come. [131014670090] |**Some important questions to ask are: [131014670100] |• Is this distribution going to be around in five years? [131014670110] |• Is this distribution going to stay on top of the latest security patches? [131014670120] |• Is this distribution going to release updated software promptly? [131014670130] |• If I have problems, will the vendor talk to me?** [131014670140] |If you're looking for a GNU/Linux distro you should definitely check these websites: [131014670150] |
  • http://lwn.net/Distributions/
  • [131014670160] |
  • http://distrowatch.com/
  • [131014670170] |
  • http://www.linux.org/dist
  • [131014670180] |If you're looking for a BSD you should check: http://bsdstats.org/ [131014670190] |Credit: Some information in this post is taken from "UNIX and Linux System Administration Handbook" [131014680010] |The one with the prettiest desktop. [131014680020] |Admittedly, I only see it for a few seconds before opening an application, but basically there is surprisingly little difference between the distributions. [131014680030] |For me, they all work well, and all have the same functionality. [131014680040] |I don't care that the graphical package manager has a different name or looks a bit different. [131014680050] |I don't care what form the packages come in. [131014680060] |I don't care what the file manager is called. [131014680070] |For a new user interested in finding the best distribution for him or herself, there are some points that I would make. [131014680080] |Firstly, use a major "easy to use" distribution. [131014680090] |The major distributions are not labeled "easy to use" in competition with each other, but as a comparison with the "hard to use" (or "not quite so easy to use") stuff like Linux From Scratch, Arch etc. [131014680100] |Similarly they all have a "great range of software" to distinguish themselves from stuff like Damn Small Linux. [131014680110] |Secondly, try different distributions. [131014680120] |As said in the question, personal preference is a large part of the choice, so make sure that you try the choices available. [131014680130] |As you try different distributions, you will become more familiar with Linux rather than, say Fedora, and with your experience you can try those "not quite so easy to use" distributions. [131014680140] |(But don't feel like you have to try them all. [131014680150] |And don't feel that you have to change to a schedule. [131014680160] |Something along the lines of install a new distribution rather than install a major update.) [131014680170] |Thirdly, try the software that is available. [131014680180] |You may like Banshee or Amarok or something else as your media player and you should be able to install them all in any distribution. [131014680190] |This particularly applies to the available desktops, Gnome, KDE, XFCE, LXDE etc. [131014680200] |At least try a couple of them. [131014680210] |For a new user not all that interested in trying different distributions, I would suggest just going for one of the top 5 on Distrowatch. [131014680220] |Personally I'd suggest Opensuse, because that at least manages to have lots of desktops available and working properly. [131014690010] |Assuming you want it as a laptop to get some sort of work done, not as part of learning a new distro or the Linux kernel or something like that: [131014690020] |Get a fairly popular one with a package manager and a desktop you like. [131014690030] |Then install whatever else you want. [131014690040] |The desktop is how you're going to interact with the system, the package manager is how you're going to get the software you want, and the people who use it are your support system. [131014690050] |All else is minor. [131014700010] |I currently use openSUSE, but have used Fedora in the past. [131014700020] |I changed because Fedora stopped working for the video card I had. openSUSE is sensitive to video cards, too. [131014700030] |Though, most of the Nvidia cards work. [131014700040] |An ATI board I bought once, didn't work, and it is still in the box unused. [131014700050] |Check as much as you can, before deciding, whether a distro supports your video card. [131014700060] |If you have problems with the video, it's probably easiest to try another distro. [131014710010] |This is a great resource: http://www.zegeniestudios.net/ldc/index.php [131014720010] |How to power off a system but still keep it available on the network [131014720020] |I'm looking into installing a file server on my network, for serving data and backups. [131014720030] |I want this machine to be available at all times, but I would rather not keep it on all the time (as to conserve power). [131014720040] |Is it possible to set things up so that the thing automatically suspends (or powers off) after some time and then automatically powers back on when I try to connect to it (using some wake-up on LAN magic, without having to send explicit WOL packets)? [131014730010] |OS X can do this now, as of Snow Leopard. [131014730020] |It's made possible through the Sleep Proxy Service. [131014730030] |It's pretty much automatic. [131014730040] |The only requirement is that you have a second always-on Apple device on your LAN that can act as the sleep proxy. [131014730050] |Their current low-power embedded boxes all support this, I believe: Airport, Time Machine, and Apple TV. [131014730060] |In the general case, though, I believe the answer is no. [131014730070] |I'm not aware of any other OS that has implemented a service like this. [131014730080] |The technology is open source, so there's no reason this couldn't be everywhere eventually. [131014730090] |It's probably too new to see widespread adoption just yet. [131014730100] |You might now be asking, why do you need a second Apple box on the LAN? [131014730110] |When a PC is asleep, the kernel —and therefore the network stack —is not running, so there is no code in your OS that can respond to a "magic" packet of the sort you're wishing for. [131014730120] |Wake-on-LAN magic packets aren't handled by the OS. They're recognized by the network interface IC, which responds by sending a signal to the CPU that releases it from the sleep state. [131014730130] |It can do this because the IC remains powered up in some sleep states. [131014730140] |(This is why the Ethernet link light stays on while a PC is "off" on some machines.) [131014730150] |The reason the Apple technology works is that just before the PC goes to sleep, it notifies the sleep proxy. [131014730160] |The sleep proxy then arranges to temporarily accept traffic for the sleeping machine, and if it gets something interesting, it sends a WOL packet to the PC and hands off the traffic it received. [131014740010] |I have had luck using PowerNap (it is packaged for ubuntu-sever, but the source is there so you should be able to compile it on anything) to suspend backup machines when they aren't doing anything. [131014740020] |However, this won't wake them up automatically. [131014740030] |There is also a PowerWake program bundled with the PowerNap source tarball (packaged as powerwake in Ubuntu) that provides a bit of abstraction to the Wake-On-Lan process (makes it easy to send WOL just with the hostname, for instance), but it is still not automatic. [131014740040] |Edit. [131014740050] |Another Option: [131014740060] |I don't know much about it because I've never used it, but some cards are capable of waking on any unicast message. [131014740070] |You can see if your card has the capability using ethtool [131014740080] |Substitute eth0 for your network device. [131014740090] |Then look at the output for the line starting with "Supports Wake-on:". [131014740100] |If "u" is listed on that line, then you can do the following at boot(ie, in an init script or something similar): [131014740110] |Combined with PowerNap or anything else that puts the machine to sleep under some conditions, this should provide what you are looking for. [131014750010] |How does fcron knows whether the job was run? [131014750020] |I recently migrated from vixie-cron to fcron on my laptop. [131014750030] |I have a question: how does fcron knows if a particular job was run in given period of time? [131014750040] |As a file can change during running, what constitute a different job? if I change for example from running daily to weekly, will it be re-run? [131014760010] |During initialization (and at any time a user runs fcrontab -z), fcron loads and compiles the fcrontabs. [131014760020] |Fcron then computes the time before the next job execution and sleeps for that time. [131014760030] |The time remaining until next execution is saved each time the system is stopped. [131014770010] |Rock-stable filesystem for large files (backups) for linux [131014770020] |What filesystem would be best for backups? [131014770030] |I'm interested primary in stability (especially uncorruptability of files during hard reboots etc.) but how efficiently it handles large (>5GB) files is also important. [131014770040] |Also, which mount parameters should I use? [131014770050] |Kernel is Linux >= 2.6.34. [131014770060] |EDIT: I do not want backup methods. [131014770070] |I need the filesystem to store them. [131014780010] |btrfs has transparent checksumming of data written to disk and a fast ordered-writes mode that is always on (and many other backup-friendly features) which makes it appealing for backups. [131014780020] |See https://btrfs.wiki.kernel.org/index.php/Main_Page for more details. [131014790010] |Just use a backup tool that support checksums. [131014790020] |For example Dar does, and it supports incremental backups. [131014790030] |Then you can backup to a rock solid filesystem like ext3. [131014790040] |For backups you want something rock solid/very stable. [131014790050] |And btrfs or ZFS are simply not ready today. [131014800010] |You can use ext4 but I would recommend mounting with journal_data mode which will turn off dealloc (delayed allocation) which 'caused some earlier problems. [131014800020] |The disabling of dealloc will make new data writes slower, but make writes in the event of power failure less likely to have loss. [131014800030] |I should also mention that you can disable dealloc without using journal_data which has some other benefits (or at least it did in ext3), such as slightly improved reads, and I believe better recovery. [131014800040] |Extents will still help with fragmentation. [131014800050] |Extents make delete's of large files much faster than ext3, a delete of any sized data (single file) should be near instantaneous on ext4 but can take a long time on ext3. (any extent based FS has this advantage) [131014800060] |ext4 also fsck 's faster than ext3. [131014800070] |One last note, there were bugfixes in ext4 up to like 2.6.31? [131014800080] |I would basically make sure you aren't running a kernel pre 2.6.32 which is an LTS kernel. [131014810010] |XFS is rock solid and has been in the kernel for ages. [131014810020] |Examine tools like xfs_freeze and see if it is what you are looking for. [131014810030] |I know this is highly subjective but I have used XFS for data storage for years without incident. [131014820010] |What does LIBGL_ALWAYS_INDIRECT=1 actually do? [131014820020] |KDE SC 4.5.0 has some problems with some video cards including mine. [131014820030] |Upon Release Arch recommended several workarounds. [131014820040] |One of which was [131014820050] |export "LIBGL_ALWAYS_INDIRECT=1" before starting KDE [131014820060] |I decided that it was the easiest, best method. [131014820070] |But I don't know what it does or how it impacts my system. [131014820080] |Is it slower than the default? should I remember to keep an eye on the problem and disable it later once it's fixed? [131014830010] |Indirect rendering means that the GLX protocol will be used to transmit OpenGL commands and the X.org will do the real drawing. [131014830020] |Direct rendering means that application can access hardware directly without communication with X.org first via mesa. [131014830030] |The direct rendering is faster as it does not require change of context into X.org process. [131014830040] |Clarification: In both cases the rendering is done by GPU (or technically - may be done by GPU). [131014830050] |However in indirect rendering the process looks like: [131014830060] |
  • Program calls a command(s)
  • [131014830070] |
  • Command(s) is/are sent to X.org by GLX protocol
  • [131014830080] |
  • X.org calls hardware (i.e. GPU) to draw
  • [131014830090] |In direct rendering [131014830100] |
  • Program calls a command(s)
  • [131014830110] |
  • Command(s) is/are sent to GPU
  • [131014830120] |Please note that because OpenGL was designed in such way that may operate over network the indirect rendering is faster then would be naive implementation of architecture i.e. allows to send a buch of commands in one go. [131014830130] |However there is some overhead in terms of CPU time spent for context switches and handling protocol. [131014840010] |Is it possible to use named colors in Zsh beyond ANSI names? [131014840020] |I know there are ways to use ANSI color names in Zsh (such as red), but Zsh supports 256 colors by number. [131014840030] |I'm curious if there's any way to refer to the non-ANSI colors by a name? [131014840040] |(Without just sticking them in a variable) [131014850010] |The first 16 colors have been standard for a long time (and have mostly standard hues). [131014850020] |256 colors are a more recent extension defined by xterm and compatible terminals. [131014850030] |The xterm documentation has this to say about colors 16–255: [131014850040] |These specify the colors for the 256-color extension. [131014850050] |The default resource values are for colors 16 through 231 to make a 6x6x6 color cube, and colors 232 through 255 to make a grayscale ramp. [131014850060] |The colors can be changed from within the terminal; see the ctlseqs file. [131014850070] |For example print '\e]4;42;taupe\a' changes color 42 to be taupe (the color names are available in /etc/X11/rgb.txt or some other distribution-dependent location). [131014850080] |If you're content to assume that the colors above 16 have their default values, you could extend the $color array with names from rgb.txt. [131014850090] |You'll need to do a bit of arithmetic to find the closest approximation of 8-bit colors in lg(6)-bit colors. [131014860010] |what is commit=0 for ext4? does mdadm not support it? [131014860020] |I see this in my dmesg log [131014860030] |I think that means that dealloc is disabled? does mdadm not support dealloc? [131014870010] |mdadm supports dealloc. [131014870020] |commit=sec is the time, the filesystem syncs its data and metadata. [131014870030] |Setting this to 0 has the same effect as using the default value 5. [131014870040] |So I don't get the link between mdadm and commit=0 in your question? [131014880010] |Version Control System. Similar to Bazaar needed for CentOS 4.8 dedicated hosting server [131014880020] |I have recently had to have our dedicated server rebuilt as core system files where deleted. [131014880030] |But that's another story... [131014880040] |Before the rebuild we where merging, branching and committing changes to a number of different projects with Bazarr. [131014880050] |Now it seems that the hosting company has rebuilt the server at Centos 4.8 rather than 5.0, which I guess it was before. [131014880060] |According to the support staff Bazaar is not compatible with the new OS. [131014880070] |The support staff have said: [131014880080] |I have installed all of the Bazaar Dependencies, however the missing dependencies for example; [131014880090] |
  • Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package bzr
  • [131014880100] |Is for a higher version of CentOS. [131014880110] |My question is. [131014880120] |Is this entirely true and is there anyway to get Bazaar working on Centos 4.8? [131014880130] |If not, are there any other version control systems similar to Bazaar? [131014880140] |Below is the log for the attempted installation of Bazaar. [131014880150] |P.S I am new to Linux administration and version control. [131014880160] |So go easy on me :) [131014890010] |If you really need to stay on RHEL4 / CentOS4 (think about this, read my comment to your original post), you can find RPM's for at least git and mercurial in EPEL for RHEL4. [131014890020] |Both are comparable to bazaar, but lack the Launchpad integration that (I think) Bazaar has. [131014900010] |You could install it from sources. [131014900020] |I has quite a few dependencies and apparently some parts seem to be written in C though. [131014900030] |It seems however not especially complicated. [131014900040] |There is a fairly detailed description here: [131014900050] |http://wiki.bazaar.canonical.com/SourceDownloads [131014910010] |Lightweight outgoing SMTP server [131014910020] |What do you use as a lightweight SMTP for outgoing e-mails only? [131014910030] |I am running an app that sends e-mails via SMTP when events occur once in a while, and I dont need a fully featured e-mail server. [131014910040] |EDIT: I am more than happy to use something like postfix (and do), if thats the best choice. [131014910050] |I was thinking there may be something much simpler, that runs out the box. [131014920010] |You may find sSMTP suitable for your needs. [131014920020] |Read this article on it and its limitations. [131014920030] |Honestly though, I wouldn't be too stressed about installing postfix or exim, even if it is only for sending emails. [131014920040] |Just stay the hell away from sendmail. :-) [131014930010] |You technically don't need an e-mail server on your host, what you need (and probably already have) is an smtp-client (or MUA) that can connect to your corporate SMTP Server (which could be anywhere you can connect to.) [131014930020] |Depending on the App (and the programming language it was written in) there are many different ways for your app to connect to the 'the' SMTP Server on your network. [131014930030] |Usually, with PHP or Python, there's a configuration file with the app to specify the "SMTP" Server (which can be on your host or elsewhere on your network.) [131014930040] |If you already have a mail server on the network, then just point the configuration to that server. [131014930050] |If no other options exist, the app can generate the e-mail message to standard output that you can process with something like: [131014930060] |listoftargets="me@example.com jab@example.com" echo "Test Content" | mail -s "Test Subject" $listoftargets [131014930070] |On some systems, there is already a minimal mailserver for sending only. [131014930080] |Sam T. [131014940010] |ESMTP is a relay only mail transfer server that may work for your application. [131014950010] |Assuming you need a program you can run from the shell like sendmail(8), perhaps MSMTP will fit your needs? [131014950020] |It can connect to a remote SMTP server and submit mail it gets as stdin, just like sendmail. [131014960010] |There are several choices of minimal, relay-only mail transfer agents (MTAs, or "mail servers"), some of which have been mentioned in other answers: [131014960020] |
  • esmtp http://esmtp.sourceforge.net/
  • [131014960030] |
  • nullmailer http://untroubled.org/nullmailer/ (my personal favourite)
  • [131014960040] |
  • sSMTP http://packages.debian.org/source/sid/ssmtp (development has stopped, i think)
  • [131014960050] |For either of those to work, you need a full fledged MTA somewhere that will further relay your messages (known as "mail hub"). [131014970010] |IMHO, the easiest way to do this is to install postfix (if debconf asks you questions, pick "internet site"), then run these commands: [131014970020] |As long as the SMTP server specified in relayhost doesn't require authentication, allows you to relay or is a valid destination for the recipient address this will work. [131014970030] |The mailname parameter will be the default domain name. [131014970040] |So if you send mail to foo it will go to foo@my.domainname.com. [131014970050] |Mail sent by user bar will be from bar@my.domainname.com. [131014970060] |If you do need to authenticate and want to support TLS, also run the following commands: [131014970070] |Then in /etc/postfix/sasl_password_maps have this content: [131014970080] |All mail will be sent to your relayhost with the specified username and password. [131014980010] |Is their a 'friction free' way to convert RAID1 to RAID5? [131014980020] |What's the best way to convert Linux software RAID 1 array to RAID 5? ( I have already bought the 3rd Hard Disc !) [131014990010] |Before doing anything of this sort back up your data to separate media and verify the backup via sha1sum. [131014990020] |The process from there would look like [131014990030] |
  • Break the RAID1 mirroring so that one of the drives is free
  • [131014990040] |
  • Add the third drive to your system
  • [131014990050] |
  • Create a degraded RAID5 out of the new drive and the one freed from the RAID1
  • [131014990060] |
  • Copy the data over to the RAID5 volume
  • [131014990070] |
  • Add the RAID1 disk to the RAID5 volume, and give it plenty of time to synchronize itself properly.
  • [131014990080] |
  • Verify that the data on the new volume matches the backup
  • [131014990090] |I've assumed that you're using Linux's software RAID support, in which case all of this would be managed by the mdadm command. [131015000010] |Many nice RAID controllers can take a RAID 1 array, and when you add another drive, allow you to convert it on the fly to RAID5, of course, now twice the size. [131015000020] |The AMI/LSI based controllers have been doing this for a few years (is it a decade yet?). [131015000030] |Dell PERC's, Compaq/HP's Smart Array controllers have often used these chipsets. [131015010010] |How do I make the "1.9.2" Ruby string point to the final release with RVM? [131015010020] |I'm using RVM to manage my Ruby environment on OSX, and currently it's interpreting '1.9.2' as ruby-1.9.2-rc2 instead of the final release. [131015010030] |How can I update this to make it behave as expected? [131015020010] |Since this got no response I asked this question and got an answer here: [131015020020] |http://stackoverflow.com/questions/3620798/how-do-i-make-the-1-9-2-ruby-string-point-to-the-final-release-with-rvm [131015030010] |Remote for loop over SSH [131015030020] |Hi [131015030030] |I have the following in a script [131015030040] |But it doesn't work. [131015030050] |Weird thing, I see $i amount of return lines. [131015030060] |So if I have ten files, I see ten blank lines. [131015040010] |Your local shell interpretes the ${i} within double quotes ("), so the command works out to [131015040020] |Simply use single quotes (') instead and your problem will disappear: [131015050010] |Why are the X11 colours different from Wikipedia's? [131015050020] |In this Wikipedia article it gives a bunch of X11 colours but they are different from the ones on my FreeBSD system. [131015050030] |For example I have no "aqua" or "fuchsia" but, e.g. aquamarine1, etc. and many other numbered colours. [131015050040] |Why is that? [131015060010] |The article explains it pretty well [131015060020] |These charts are not a standard set of colors to be found on any X Window system. [131015060030] |Rather it is the standardised "X11 colors" accepted by browsers following the HTML and CSS standards. [131015060040] |This set is cut down and rationalised, and has a few differences from a typical rgb.txt... [131015060050] |http://en.wikipedia.org/wiki/X11_color_names [131015070010] |I use this page as color reference when looking for an X11 color: [131015070020] |http://sedition.com/perl/rgb.html [131015080010] |vim auto indenting even after setting noai opetion [131015080020] |I am using vim 7.2 from putty terminal. [131015080030] |Even if I run set noai it seems vim still trying to indent code. [131015080040] |I am copying my code from Notepad++ to vim. following is from Notepad++ [131015080050] |and following what I got in vim: [131015080060] |I don't have any tab in my file. [131015080070] |As a workaround I am opening old vi run set noai paste save and open in vim again. [131015080080] |Any suggestion how to correct this behavior ? [131015090010] |This has nothing to do with the noai option. [131015090020] |What you are experiencing, is a little trouble copy-pasting a load of text with existing indents to vim. [131015090030] |What I usually do (I have this 'problem' a lot), is bind F4 to invpaste and then, before I paste stuff into vim, hit that key. [131015090040] |It makes the problem go away. [131015090050] |Read more about this using [131015090060] |inside vim [131015100010] |Disable apache's auto directory "/" completion [131015100020] |I'm in the following situation: [131015100030] |I have a directory named test at the top level of my site. [131015100040] |When I request http://mysite.com/test, apache automatically adds a trailing slash and gives me http://mysite.com/test/. [131015100050] |Is there a way to disable that? [131015110010] |There are several ways to fix missing slashes, but the most likely one in your case is the Directory Slash Directive of mod_dir, which by default is on. [131015110020] |I'd recommend not to change that configuration, though, because there are good reasons for its existence. [131015120010] |I found it! http://httpd.apache.org/docs/current/mod/mod_dir.html [131015130010] |bash directory shortcuts [131015130020] |When I type cd ~foo, I'd like bash to take me to some directory foo as a shortcut for typing the full directory path of foo. and I'd like to be able to cp ~foo/bar.txt ~/bar.txt to copy a file from the /foo/ directory to the home directory... [131015130030] |So basically, I want something that works exactly like ~/ does, but where I specify what the directory should be. [131015130040] |[I'm sure I should jfgi, but I don't know what to fg] [131015140010] |with bash: [131015140020] |~foo is reserved for the home directory of the user foo. [131015140030] |I would not recommend creating users just for that convenience. [131015140040] |You can make your life easier (or harder) when changing directories by setting the CDPATH environment variable (look it up in bash(1)). [131015140050] |Apart from that, the only way to think of would be to set environment variables for those directories you want to abbreviate. [131015150010] |The way I used to do this is to create a directory that contains symlinks to the directories you want shortcuts do, and add that directory to your CDPATH. [131015150020] |CDPATH controls where cd will search when you switch directories, so if that directory of symlinks is in your CDPATH you can cd to any of the symlinked directories instantly: [131015150030] |The downside of course is it won't work if there's a directory in your current directory named "b" -- that takes precedence over the CDPATH [131015150040] |I normally dislike answers that say "first you need to switch shells", but this exact feature exists in ZSH, if you're willing to use that instead; it's called named directories. [131015150050] |You export a variable foo, and when you refer to ~foo it resolves to the value of $foo. [131015150060] |This is especially convenient because it works in commands besides cd: [131015160010] |You could write a wrapper function for cd and call it "cd" (ultimately the function will call builtin cd - using the builtin keyword). [131015160020] |You could use a prefix character that Bash won't expand on the command line before your function sees it and that's unlikely to appear as the initial character in your directory names, perhaps ":". [131015160030] |You would want to make it more robust, but here's a simple outline: [131015170010] |An way would be creating an alias for cd which replaces ~c to the wanted path. [131015170020] |Or just use zsh ;) [131015180010] |For changing directories, you could use wcd: Wherever Change Directory [131015180020] |With that, it'll be like wcd plugin_root. [131015190010] |Navigate through a stack of locations in vim? [131015190020] |Typing `` at location X brings you back to the last visited location in the text file. [131015190030] |Hitting it again brings you back to X [131015190040] |This switching is similar to Ctrl+6 to open the last opened file. [131015190050] |But how do can I hop several levels of locations backwards (and then forward)? [131015190060] |I mean something like the Ctrl+] and Ctrl+T feature for navigate through the stack of visited tags. [131015200010] |Ctrl-o and Ctrl-i while in command-mode jump through a stack of locations that you've visited. [131015210010] |Linux replacement for Apple Keynote software? [131015210020] |Sorry for my ignorance, this is a newbie question: [131015210030] |I am trying to migrate from Mac OS X to a Linux distribution, maybe/probably Ubuntu. [131015210040] |One of my favorite applications for the Mac was Apple Keynote, which makes amazing sideshow presentations. [131015210050] |Is there an equivalent solution for Linux distributions that matches/comes close to Keynote in terms of its polish and ease of use? [131015210060] |I know about OpenOffice.org Impress but, no pun intended, I am not very Impress-ed... [131015220010] |Here's what I found at OSALT [131015220020] |They're (Impress and KPresenter) probably pretty comparable. [131015220030] |I haven't used KPresenter but it's worth a look. [131015230010] |I just asked an Apple-minded buddy of mine what makes Keynote so cool, and he basically said that Keynote has a nifty screen while presenting, showing your notes and stuff. [131015230020] |He couldn't name one unique feature that made Keynote cool apart from that. [131015230030] |And as it happens, OpenOffice.org has the exact same thing. [131015230040] |Sure the interface will be a bit different, but - as I understand it - there is nothing you can do with Keynote that you cannot do with Impress. [131015240010] |If you are willing to go outside your comfort zone, LaTeX Beamer is really the only thing I have found that can match Keynote's output for Linux. [131015240020] |Ease of use is a problem with LaTeX though, look at LyX for a nice editor, and some examples. [131015250010] |You can try the browser based ones and this in my opinion, stands out: Prezi [131015250020] |And ofcourse you have the online MS Office which has Powerpoint in it. [131015260010] |One option that rarely gets mentioned is a little program called Ipe, which can be useful especially if you presentations are heavy in graphics. [131015260020] |Ipe is essentially a vector drawing program that can export pdf and has support for pages and layers, which makes it suitable for designing presentation. [131015260030] |It uses LaTeX for text, so you need to learn at least some basic latex, but all positioning and drawing is done interactively in a GUI way. [131015260040] |It is also scriptable in lua. [131015270010] |Colorizing your terminal and shell environment? [131015270020] |I spend most of my time working in Unix environments and using Terminal emulators. [131015270030] |I try to use color on the command-line, because color makes the output more useful and intuitive. [131015270040] |What are some good ways to add color to my terminal environment? [131015270050] |What tricks do you do? [131015270060] |What pitfalls have you encountered? [131015270070] |Unfortunately, support for color is wildly variable depending on terminal type, OS, TERM setting, utility, buggy implementations, etc. [131015270080] |Here's what I do currently, after a lot of experimentation: [131015270090] |
  • I tend to set TERM=xterm-color, which is supported on most hosts (but not all).
  • [131015270100] |
  • I work on a number of different hosts, different OS versions, etc. [131015270110] |I'm trying to keep things simple and generic, if possible.
  • [131015270120] |
  • Many OSs set things like dircolors and by default, and I don't want to modify this on a hundred different hosts. [131015270130] |So I try to stick with the defaults. [131015270140] |Instead tweak my Terminal's color configuration.
  • [131015270150] |
  • Use color for some unix commands (ls, grep, less, vim) and the Bash prompt. [131015270160] |These commands seem to the standard "ANSI escape sequences". [131015270170] |For example: [131015270180] |alias less='less --RAW-CONTROL-CHARS' [131015270190] |export LS_OPTS='--color=auto' [131015270200] |alias ls='ls ${LS_OPTS}
  • [131015270210] |I'll post my .bashrc and answer my own question Jeopardy Style. [131015280010] |Set a bold/colored prompt. [131015280020] |From cyberciti.biz and the BashFAQ [131015280030] |I've also managed to find color settings which are widely supported, and which don't print gobbledygook characters in older environments (even FreeBSD4!), and seems to work fine if TERM=vt100, xterm, xterm-color. [131015280040] |(For the most part). [131015280050] |From my .bashrc: [131015290010] |Here are a couple of things you can do: [131015290020] |Editors + Code A lot of editors have syntax highlighting support. vim and emacs have it on by default. [131015290030] |You can also enable it under nano. [131015290040] |You can also syntax highlight code on the terminal by using Pygments as a command-line tool. [131015290050] |grep grep --color=auto highlights all matches. [131015290060] |You can also use export GREP_OPTIONS='--color=auto' to make it persistent without an alias. [131015290070] |If you use --color=always, it'll use colour even when piping, which confuses things. [131015290080] |PS1 You can set your PS1 (shell prompt) to use colours. [131015290090] |For example: [131015290100] |Will produce a PS1 like: [131015290110] |[yellow]lucas@ubuntu: [red]~[normal]$ [131015290120] |You can get really creative with this. [131015290130] |As an idea: [131015290140] |Puts a bar at the top of your terminal with some random info. [131015290150] |(For best results, also use alias clear="echo -e '\e[2J\n\n'".) [131015290160] |Getting Rid of Escape Sequences [131015290170] |If something is stuck outputting colour when you don't want it to, I use this sed line to strip the escape sequences: [131015290180] |If you want a more authentic experience, you can also get rid of lines starting with \e[8m, which instructs the terminal to hide the text. [131015290190] |(Not widely supported.) [131015290200] |Also note that those ^[s should be actual, literal ^[s. [131015290210] |You can type them by pressing ^V^[ in bash. [131015300010] |grep and LS have already been mentioned, if you want a lot more colors check out Generic Coloriser, it's initial purpose was to colorize logfiles, but right out of the box it also colorizes ping, traceroute, gcc, make, netstat, diff, last, ldap and cvs. [131015300020] |It's easily extended if you know regex. [131015300030] |I've added ps and nmap to the list (if you get into grc I'll be more than glad to share the .conf files for those two tools) [131015300040] |(btw, to install it via synaptic, pacman and alike you might have better luck searching for "grc") [131015310010] |I also use: [131015310020] |And if you like colorizing your prompt, defined color vars can be useful: [131015310030] |And then my prompt is something like this: [131015310040] |$(vcprompt) is calling a python script in my ~/sbin which prints version control information about the current path. [131015310050] |It includes support for Mercurial, Git, Svn, Cvs, etc. [131015310060] |The author of the script has the source here. [131015320010] |There's a good tool for setting up your colours for the ls command - http://geoff.greer.fm/lscolors/ [131015330010] |Changing my toolchain architecture (in gentoo) [131015330020] |This is somewhat gentoo-specific, so I'll explain it in that context, then try to abstract it to a generic linux machine. [131015330030] |I accidently set my CHOST to "i686-pc-linux-gnu" in the beginning, not paying attention, when my machine is a Athlon64. [131015330040] |I would like to change it to "x86_64-pc-linux-gnu". [131015330050] |There is a guide for this. [131015330060] |It doesn't work. [131015330070] |The first step is "Recompile binutils, then recompile gcc" [131015330080] |Here's the problem illustrated: [131015330090] |
  • Compile binutils using gcc - this succeeds producing new as, ar, and the like files
  • [131015330100] |
  • This breaks gcc. gcc is now trying to use the new /usr/bin/as - but it can't work with them
  • [131015330110] |
  • Since gcc can't compile anything, I can't compile gcc. [131015330120] |I have to revert as, ar, etc; then revert the CHOST change, and recompile binutils.
  • [131015330130] |So I tried the following: [131015330140] |
  • back up as, ar, etc
  • [131015330150] |
  • Compile binutils, rendering gcc inoperabe
  • [131015330160] |
  • link ar, as, etc to the old versions I backed up
  • [131015330170] |
  • try to compile gcc
  • [131015330180] |The gcc compile fails with: [131015330190] |This is a glibc error (completing the chain). [131015330200] |So it seems: [131015330210] |
  • for gcc to compile it has a dependency on the new version glibc
  • [131015330220] |
  • for gcc to run, binutils must be the older version
  • [131015330230] |The steps I haven't tried, because it's so complicated I wanted to get opinions first, are: [131015330240] |
  • compile binutils under new architecture,
  • [131015330250] |
  • relink as, ar, etc to old executables
  • [131015330260] |
  • compile new glibc with old-gcc and old-binutils
  • [131015330270] |
  • compile new-gcc with old-gcc and old-binutils but new-glibc
  • [131015330280] |
  • relink as, ars, etc to new-binutils
  • [131015330290] |
  • recompile everything like a boss
  • [131015330300] |Is there any chance of #4 above working? [131015330310] |Do I have any hope of accomplishing this without a complete reinstall? [131015340010] |As far as I know it is not possible. [131015340020] |Please remember that toolchain does not exist in vaccum and is interlinked. [131015340030] |What might work is to build cross-compiler of new infrastructure but I really doubt it - the "atomicity" on update of glibc will break everything. [131015340040] |I would advice backup &reinstall of system. [131015350010] |Have you tried downloading the amd64 stage3 tarball and using the copy of gcc with that? [131015360010] |If your kernel is 64-bit (and so you can run 64-bit binaries), you can start a new x86_64 Gentoo install in a chroot, following the usual instructions. [131015360020] |I've done similar before — effectively a reinstall, but while still running the old system. [131015360030] |If you don't have a spare block device to install to, you can use a subdirectory and either boot with init=chroot\040/new\040/bin/sinit or drop down to a minimal environment to shuffle directories around. [131015360040] |If your kernel is 32-bit, find a 64-bit kernel or build a cross-compiler to 64-bit to build a 64-bit kernel, boot it, then see above. [131015370010] |find executable binaries files within dir [131015370020] |how do I list all executable files recursively within dir? [131015370030] |currently I used find command like this: [131015370040] |all executable files are listed (excluding directory), and including executable script file (like script.sh, etc), what I want to do is how to list only binary executable file, can we do that? [131015380010] |Here's a way to exclude scripts, i.e., files whose first two characters are #!: [131015380020] |For some kinds of files, it's not clear whether you want them classified as scripts or binary, for example bytecode files. [131015380030] |Depending on how things are set up, these may or may not start with #!. [131015380040] |If these matter to you, you'll have to make the inner shell script more complex. [131015380050] |For example, here's how you might include ELF binaries and Mono executables and Objective Caml bytecode programs but not other kinds of executables like shell scripts or perl scripts or JVM bytecode programs: [131015390010] |You might try the file utility. [131015390020] |According to the manpage the "magic tests" it does can find binary files: [131015390030] |The magic tests are used to check for files with data in particular fixed formats. [131015390040] |The canonical example of this is a binary executable (compiled program) a.out file, whose format is defined in , and possibly in the standard include directory. [131015390050] |You might have to play around with the regular expression but something like: [131015390060] |file has lots of options, so you might want to take a closer look at the man page. [131015390070] |I used the first option I found that seemed to output easily-to-grep output. [131015400010] |How do I change Xfce 4 "theme" tab colors? [131015400020] |I recently switched over to Xfce and really enjoy it. [131015400030] |However, when I went in to my settings to change the appearance, the theme that I liked best was "Xfce-dusk" with one exception: [131015400040] |The default colors for application tabs are so dark that it's hard to tell where they are. [131015400050] |I hunted around for a little while looking anywhere I could to see where the styles for the tabs are set in the theme configuration file and couldn't find anything that looked like it would do what I need. [131015400060] |The file I've found to define the theme was: [131015400070] |But looking through that file, I can't find anything that seems to apply. [131015400080] |Any suggestions? [131015400090] |Normally I'm a command-line only sort of guy and don't really know much about WMs or theming, and don't even know the terms of what I'm trying to modify, so my Google searches are coming up painfully empty. [131015400100] |Here is a screenshot of the type of tabs I want to modify. [131015410010] |I can't give you a precise answer but this will get you started. [131015410020] |If that's too much work, you might want to check out other themes for something similar with higher contrast tabs. [131015420010] |Is Mac OS X, UNIX? [131015420020] |I have this argument recently saying OSX was not UNIX, but Unix-like. [131015420030] |I know there is a Single Unix Specification and those spec complaint could use the UNIX trade mark. [131015420040] |Is Mac OS X a UNIX operating system or is it a Unix-like? [131015430010] |OS X is certified as UNIX by The Open Group, starting with 10.5 and renewed for 10.6. [131015430020] |This is called out in Apple's Unix technology brief, which also has other good technical bits in it that will help you compare it to other UNIX® and Unix-like systems. [131015440010] |Well, given that it's fully POSIX compliant I would say yes. [131015450010] |One big difference is that X11 integration is a little different. [131015450020] |X11 app will not looks good on a Mac, you have to manually start an XServer that's not given too much love. [131015450030] |Other than that I think it's a Mach micro-kernel with the FreeBSD network stack, and the userland is like Linux. [131015460010] |Why doesn't my Bash script recognize aliases? [131015460020] |In my ~/.bashrc file reside two definitions: [131015460030] |
  • commandA, which is an alias to a longer path
  • [131015460040] |
  • commandB, which is an alias to a Bash script
  • [131015460050] |I want to process the same file with these two commands, so I wrote the following Bash script: [131015460060] |Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script. [131015460070] |What am I doing wrong? [131015470010] |If you look into the bash manpage you find: [131015470020] |Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below). [131015470030] |So put a [131015470040] |in your script. [131015480010] |First of all, as ddeimeke said, aliases by default are not expanded in non-interactive shells. [131015480020] |Second, .bashrc is not read by non-interactive shells unless you set the BASH_ENV environment variable. [131015480030] |But most importantly: don't do that! [131015480040] |Please? [131015480050] |One day you will move that script somewhere where the necessary aliases are not set and it will break again. [131015480060] |Instead set and use environment variables as shortcuts in your script: [131015490010] |Aliases can't be exported so they're not available in shell scripts in which they aren't defined. [131015490020] |In other words, if you define them in ~/.bashrc they're not available to your_script.sh (unless you source ~/.bashrc in the script, which I wouldn't recommend but there are ways to do this properly). [131015490030] |However, functions can be exported and would be available to shell scripts that are run from an environment in which they are defined. [131015490040] |As the Bash manual says, "For almost every purpose, shell functions are preferred over aliases." [131015500010] |the lightest way to have a GUI in Linux? [131015500020] |Hello fellows, [131015500030] |I have been using Gnome and KDE for a while, and I am now running Compiz standalone... [131015500040] |Regarding system resource, I think the most heavy ones are feature-rich desktop environments (Gnome, KDE), then lightweight environments (XFCE, LXDE), then Compiz standalone without any desktop environments (which I just discovered recently in another question). [131015500050] |I wonder if I have come to the end of the list yet? [131015500060] |(As the minimum, I want something that can run GUI apps like Firefox. [131015500070] |I imagine something with a terminal from which I can start other applications...) [131015510010] |Did you have a look at some other "lighterweight" ;-) window managers? [131015510020] |I'm completly happy with i3 for example: http://i3.zekjur.net/ [131015510030] |It's just a tiling windowmanger with demnu for launching applications. [131015510040] |No desktop, no other special features and the binary is just some Kbs. [131015510050] |There are a lot others in this range: [131015510060] |
  • evilwm - http://www.6809.org.uk/evilwm/
  • [131015510070] |
  • dwm - http://dwm.suckless.org/
  • [131015510080] |
  • ...
  • [131015510090] |The absolut minimum would be running your X-Server without any windowmanager and just with something like dmenu (http://tools.suckless.org/dmenu/) to launch applications. [131015510100] |I'm not sure if this is really what you want, because you won't be able to resize the application windows, move them, etc. [131015520010] |The OpenBSD implementation of cwm, is an awesome balance between lightweight and feature rich. [131015520020] |By default, only an xterm comes up when you login. [131015520030] |There are no decorations around the windows, and nothing on the desktop. [131015520040] |Everything is done via keyboard (and, yes, I mean everything). [131015520050] |If you want to ssh somewhere Alt+. will pull up an ssh dialog. [131015520060] |If you want to execute a program Shift+Alt+/ will bring up an exec dialog. [131015520070] |Full list of features/commands is available as a man page. [131015520080] |Unfortunately, this is only available on OpenBSD as far as I can tell. [131015520090] |Though the source can be compiled and run on linux, which is what I do when I'm not allowed to use OpenBSD. [131015530010] |The Wikipedia page on Comparison of X Window Managers sorts the various Window Managers into four categories: Heavyweight, Middleweight, Lightweight, and minimal. [131015530020] |You'd probably be interested in those in the minimal category. [131015530030] |Right now, those include Matchbox, sithWM, evilwm, dwm, WMFS, wmii, and scrotwm. (i3 gets put into Lightweight; Xfwm (used by default in Xfce) and Openbox (used by default in LXDE) are both considered Middleweight by this classification.) [131015530040] |I don't know what grounds were used to sort these out, and haven't tried enough of these to know how accurate it is. [131015530050] |Regarding the point you made about Compiz standalone, however, I would not consider that more lightweight than using LXDE with Openbox or XFCE with XFWM. [131015530060] |Compiz is a resource beast; using it alone is not going to be much different than using it under GNOME, so long as you don't load anything in GNOME you don't need. [131015530070] |(Remember that XFCE and LXDE are desktop environments; you could run their default window managers without using the rest of these desktop environments, just like you can run Compiz without a Desktop environment too. [131015530080] |Well, at least I know you can run Openbox without LXDE. [131015530090] |I've never tried running XFWM without XFCE.) [131015540010] |My engineers love ratpoison as a minimalist window manager. [131015540020] |When I want lightweight, I go through the pain of rebuilding Open Look (olwm and olvwm), although I have not wanted that much pain for a while. [131015550010] |I used jwm for quite a while on my old 199MHz Laptop with only 32MB RAM. [131015550020] |Worked quite well and was looking quite good. [131015550030] |Configuration is also nicely done with an XML file. [131015560010] |Before I moved to KDE I was a hardcore Fluxbox user. [131015560020] |It has command interface fbrun that can be used to launch programs along with a rightclick customizable menu. [131015560030] |It also has window tabs, I believe it's one of the first WM's to have this. [131015560040] |IIRC Fluxbox is the WM that Damn Small Linux uses. [131015570010] |You don't need X11 to have a window manager. [131015570020] |You can use TWIN, the Text-mode window manager, along with GPM for mouse. [131015570030] |You might have to switch your primary web browser to Links and your chat program to Finch, though. [131015580010] |Ubuntu Remap script for UK Logitech Cordless Wave Keyboard [131015580020] |I have just bought a Logitech Cordless Wave UK Keyboard and mouse and I'm trying to get the keymapping sorted but not having much luck! [131015580030] |The main problem I have is none of the key seem to give me the HASH symbol. [131015580040] |Ideally I'm after a remapping script that I can get to run at start up or even a GUI based remapping software so I can get my keys to print what is actually label on each key! [131015580050] |I have tried HIDPoint but I'm using VMWare to run Ubuntu 10.04 and it didn't recognise the keyboard or mouse [131015580060] |Does anyone know how I can fix this? [131015590010] |You should be able to see what keyboard layout is being used by opening the Keyboard settings dialog (System >Preferences >Keyboard) and selecting the Layouts tab. [131015590020] |Also, there is a bug report on Launchpad (#592371) related to the Logitech Cordless Wave Pro key mappings. [131015590030] |I'm using Ubuntu 10.04 and it looks like the changes made by the upstream patch referenced in that bug have been applied in the current udev package (151-12.1). [131015600010] |CLI interace to KDE's notifier [131015600020] |I think KDE's notifier is pretty sweet. [131015600030] |I was thinking... how useful might it be if my system logs were also sent there, so they would pop so I could see them. [131015600040] |I think the first step of this is to figure out how to send messages to the notifier via CLI. [131015600050] |here's the kde forum discussion on dbus interface. [131015600060] |I'm not really sure how to use this interface. [131015600070] |If anyone is more familiar with dbus perhaps they can write an answer detailing various ways to access it via dbus. [131015610010] |kdialog method [131015620010] |dpkg and google-chrome don't get along with gnome [131015620020] |Install fine. [131015620030] |Works fine. [131015620040] |Next day the logo and apps menu entry is gone. [131015620050] |Doesn't seem to matter what I do. [131015620060] |On installation, GDebi refused to install the package, and crashed instead, so I used dpkg -i. [131015620070] |As for the logo and apps menu entry, I suppose I'll just have to glue it in place. [131015620080] |Sorry Firefox. [131015620090] |I install the latest version with dpkg, I use it for a while, it goes into the Internet tab fine. [131015620100] |Then I shut down, and the next time I start up it's missing. [131015620110] |The program runs fine from a terminal as google-chrome [131015620120] |So, my question is, where are the details of this stuff stored? [131015620130] |Is it a single text file in /usr? [131015620140] |Is it a bunch of stuff that's hard to edit by hand? [131015620150] |And where is the logo likely to reside? [131015620160] |I know there's probably a GUI way to do this, but it will be more satisfying, and possibly less error-prone, if I simply override whatever's causing Ubuntu/GNOME to lose the icon and applications menu entry. [131015630010] |I've heard the same complaints from several people who tried to use recent development builds of Google Chrome. [131015630020] |You probably should use a more stable version of it (or use the Chromium browser provided in the Ubuntu repositories, which is the open source version of Google Chrome). [131015630030] |Or otherwise you can wait until Google fixes this bug... [131015640010] |maybe you can try [131015640020] |
  • uninstal google-chrome completely sudo apt-get purge google-chrome
  • [131015640030] |
  • check within your $HOME that there's nothing left (configuration is in ~/.config/google-chrome)
  • [131015640040] |
  • also check that the application shortcut that is gone using find ~ -iname "*chrome*" (it's a .desktop file)
  • [131015640050] |
  • then cross your fingers and reinstall?
  • [131015640060] |(As I'm running chromium-browser and not google-chrome the names above might be different, but that shouldn't be a problem.) [131015650010] |Can I send the ouput of a log to a command as an argument to an option in syslog-ng? [131015650020] |According to the documentation I can execute a program like so-ish: [131015650030] |and it will send the log to the stdin of the executable. [131015650040] |But what if the program I'm executing would need the input as an argument to an option? is there a way to do that? or do I have to write a wrapper for the program I'm executing? [131015660010] |If I understand you correctly and if this is on Linux, you may try using [131015660020] |/proc/self/fd/0 [131015660030] |as the argument. [131015660040] |This should be a symlink to the standard input of the process. [131015660050] |Equivalently, on some systems, you could use [131015660060] |/dev/stdin [131015660070] |which is often just a symlink to /proc/self/fd/0. [131015660080] |I don't have a system with syslog-ng to test this on, but I think something like the following should work: [131015660090] |where -i would be substituted for whatever command line switch the executable needs if any. [131015660100] |I've also seen /dev/fd/0 used, but I tend to stick with using /proc directly. [131015660110] |For more info see man proc. [131015670010] |For most commands a wrapper will have to be written because Syslog-ng will only execute the command when it starts. [131015670020] |This means that the command has to effectively be a daemon itself always accepting input from stdin. [131015670030] |That's simple though... [131015670040] |unfortunately this script doesn't work for me, probably because it doesn't know which display to use. [131015670050] |But if your script doesn't need an X server then a simple format like this should work you. [131015670060] |Although this is no way helpful due to the fact that Syslog-ng will only start the program on startup I found the fact that xargs can create positional arguments from standard input interesting. [131015680010] |Remove a corrupted file in a Linux system. [131015680020] |How to remove a file that is corrupted? [131015680030] |In Linux (Fedora based), when I type: ls -l I get [131015680040] |I can't do anything with this CorruptedFile. [131015680050] |I can't use it in delete or anything. [131015680060] |It's the only file in the entire system that is like this. [131015680070] |What causes this, and how can I remove it? [131015680080] |File system is ext2. [131015690010] |you could have been writing to a file during a hard reset, or your hard drive could have problems. a fsck should fix it (you will have to umount the fs to do this). [131015690020] |I'd check dmesg and smartctl -a /dev/hdx (latter is part of smartmontools ) to see if your HD is reporting any errors. [131015690030] |I'd also run a non-destructive badblocks on the partition. [131015690040] |You should also ask yourself why you are running ext2, because journaling tends to help with these kinds of problems. [131015700010] |How do I delete a file whose name begins with "--"? [131015700020] |How do you remove a file whose filename begins with "--"? [131015700030] |I'm ssh'd into a remote OSX server and I have this file in my directory: [131015700040] |How in the world can I delete --help from a CLI? [131015700050] |This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of. [131015700060] |I have tried using backslash [131015700070] |I have tried quotes [131015700080] |Any ideas? [131015710010] |Use "--" to make rm stop parsing command line options, like this: [131015720010] |Or you can do [131015730010] |The answers of Vegar Nilsen and edfuh are very good and the proper solutions to a problem like this. [131015730020] |I do want to add a general response to this question that allows you to delete any file with a difficult file name. [131015730030] |First its inode number is obtained using ls -i or some form of stat and then the file is removed by searching for files in the current directory by inode number and executing the rm command on the file with a matching inode number [131015730040] |Since inode numbers are unique in each file system you can remove any file using this; unicode or using escape characters. [131015730050] |It is how ever very annoying to type out so I would recommend adding the line [131015730060] |into your .inputrc file if you're using bash. [131015730070] |This allows you to cycle through the list of possible completions (for further information). [131015740010] |How do I change folder timestamps recursively? [131015740020] |I was wondering if anyone knows how to change the timestamps of folders recursively based on the latest timestamp found of the files in that folder. [131015740030] |So for example: [131015740040] |The folder "(1997-05-20) The Colour and The Shape" would have its timestamp set to 2010-04-18 00:52. [131015740050] |Thanks in advance! [131015750010] |That's not "recursively", it's just changing all the timestamps in a folder. [131015750020] |If that's what you mean, there's two steps. [131015750030] |stat -c '%Y' filename will output the timestamp of filename, and stat -c '%Y %n' * will output the timestamp and filename of every file in the folder, so this will find the filename of the most recently modified file in the current folder: [131015750040] |On second thought, there's a way easier way to get the highest timestamp in the folder: [131015750050] |Then you want to change all the files in the folder to have the same timestamp as that file. touch -r foo bar will change bar to have the same modified timestamp as foo, so this will change all the files in the folder to have the same modified timestamp as your most recently modified file: [131015750060] |So, the one-liner is: [131015760010] |Here are two solutions. [131015760020] |In each solution, the first command changes the modification time of the directory to that of the newest file immediately under it, and the second command looks at the whole directory tree recursively. [131015760030] |Change to the directory (cd '.../(1997-05-20) The Colour and The Shape') before running any of the commands. [131015760040] |In zsh (remove the D to ignore dot files): [131015760050] |On Linux (or more generally with GNU find): [131015770010] |bash eval array variable name [131015770020] |here is my bash case [131015770030] |first case, this what i want to do "aliasing" var with myvarA [131015770040] |second case for array variable and looping its members, which is trivial [131015770050] |now somehow i need to use "aliasing" technique like example 1, but this time for array variable: [131015770060] |but for last case, only first member of myvarA is printed, which is eval evaluate to value of the variable, how should I do var array variable so eval is evaluate to the name of array variable not the value of the variable [131015780010] |sorry, I solved it myself, last example should be like this : [131015790010] |In your answer, varAlias isn't an array, so you can do for varItem in $varAlias which is just doing word splitting. [131015790020] |Because of that if any of your original array elements include spaces, they will be treated as separate words. [131015790030] |You can do scalar indirection like this: a=42; b=a; echo ${!b}. [131015790040] |You can do indirection to an array of scalars like this: [131015790050] |Unfortunately, there's no satisfactory way to do the type of array indirection you're trying to do. [131015790060] |You should be able to rework your code so that no indirection is needed. [131015790070] |See also BashFAQ/006. [131015800010] |Invalid greeting from server [131015800020] |I'm trying to csup and i'm getting "Invalid greeting from server" [131015810010] |This means that the server is down. [131015810020] |It might be updating or have a problem; try again later. [131015820010] |Measure pipe throughput in the shell [131015820020] |There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. [131015820030] |So instead of: [131015820040] |you can do something like: [131015820050] |And throughput stats (bytes/sec) are prited to stderr, I think. [131015820060] |But I can't for the life of me remember what that command was. [131015820070] |Hints? [131015830010] |You need a utility called cpipe. [131015830020] |Usage: [131015830030] |Output: [131015840010] |cpipe is probably better for these purposes, but another related program is pv (Pipe Viewer): [131015840020] |If you give it the --rate flag it will show the transfer rate [131015850010] |Directory filenames with sed with whitespaces [131015850020] |I'm working on a script and I'm stuck, even with the help of teh googles. [131015850030] |Here's my code: [131015850040] |This will replace only the first instance of " " with "\ " but not the rest. [131015850050] |Any ideas? [131015860010] |Forget about structuring your command that way and use find -execdir instead: [131015860020] |Or use zsh: [131015870010] |You can use xargs instead of a loop for executing the same command on a list of elements. [131015870020] |There are options to take care of whitespaces. [131015880010] |I think that you are complicating everything. [131015880020] |Maybe you only need this: [131015890010] |redirect output of a running program to /dev/null [131015890020] |Hi there, [131015890030] |I know that in order to suppress the output of a program I can redirect it to /dev/null, for example to hide all error and warning messages from chromium I can start the program like this [131015890040] |However, if I happen to forget about the error messages and type [131015890050] |(which is quite annoying when they appear in the middle of a command) I don't know what to do except for stopping the application and starting it again properly. [131015890060] |Can I somehow redirect error output without restarting the application? [131015890070] |Thanks [131015900010] |This was answered here : here by vladr. [131015900020] |The answer is (quoting) : [131015900030] |
  • attach to the process in question using gdb, and run:
  • [131015900040] |
  • p dup2(open("/dev/null", 0), 1) (for stdout redirection)
  • [131015900050] |
  • p dup2(open("/dev/null", 0), 2) (for stderr redirection)
  • [131015900060] |
  • detach
  • [131015900070] |
  • quit
  • [131015900080] |I tried it on the following script : [131015900090] |[edition after first comment :] [131015900100] |I disabled the stderr output before the son process was created, here is the output : [131015900110] |I hope this answer your question : the son process stderr was redirected too. [131015910010] |You could also setup an alias for "chromium-browser" to instead run "chromium-browser 2> /dev/null" [131015910020] |e.g. if you are using bash, edit /home/username/.bashrc and add line: [131015910030] |
  • chromium-browser='chromium-browser 2> /dev/null'
  • [131015910040] |or better yet [131015910050] |
  • chrome='chromium-browser 2> /dev/null'
  • [131015910060] |and save some keystrokes. [131015920010] |You can also launch the browser with nohup and then close the terminal window with the following: [131015920020] |This way, the browser will launch and detach from the console, that can then be closed quietly. [131015930010] |Emacs mode in zsh: M-b M-f etc. show weird symbols [131015930020] |I have set up zsh to use emacs mode. [131015930030] |But typing Alt+f or Alt+b inserts weird symbols (accented letters and so on), rather than moving around by word in the shell like it should. [131015930040] |Since I don't ever want to insert the "ae" symbol into a shell prompt, how can I get zsh to behave? [131015930050] |I had the same problem with bash, but now that I'm actually taking the time to customise zsh, I thought I'd ask... [131015930060] |AltGr+b etc. produces different weird symbols... [131015930070] |I'm using Ubuntu 10.4 [131015940010] |It's not zsh that's misbehaving, it's xterm. [131015940020] |The reason it's misbehaving is an obsolete setting that causes xterm to send character number x+128 when you press Alt together with character number x. [131015940030] |The normal behavior in a text terminal is to have Alt+a send ESC a. [131015940040] |To tell xterm to leave 8-bit characters alone, turn off the XTerm.VT100.eightBitInput resource (despite the name, it doesn't affect what happens when you enter an 8-bit character). [131015940050] |You'd normally do this by adding the following line to ~/.Xresources: [131015940060] |~/.Xresources is read when you log in in most unix distributions. [131015940070] |To read it immediately, run the command [131015950010] |Zsh theme guides [131015950020] |Does anyone know any good tutorials (or books) for what goes into writing a theme? [131015960010] |Have a look at Robbie Russell's Oh My Zsh project on Github - http://github.com/robbyrussell/oh-my-zsh [131015960020] |There's a bunch of theme's in there that should give you a fair amount of info. [131015970010] |How can I move files by type recursively from a directory and its sub-directories to another directory? [131015970020] |What would be a good way to move a file type from a directory and all of its sub-directories? [131015970030] |Like "move all *.ogg in /thisdir recursively to /somedir". [131015970040] |I tried a couple of things; my best effort was (still not that great): [131015970050] |It returned on each line before each file name, [131015980010] |you can use find with xargs for this [131015980020] |find /thisdir -type f -name "*.ogg" -print0 | xargs -0 -Imysongs mv -i mysongs /somedir [131015980030] |The -I in the above command tells xargs what replacement string you want to use (otherwise it adds the arguments to the end of the command). [131015980040] |OR In your command just try to move '{}' after mv command. [131015980050] |find /thisdir -type f -name '*.ogg' -exec mv -i {} /somedir \; [131015990010] |You kinda interchanged the arguments for mv [131016000010] |In zsh or bash 4, to gather all *.ogg files into /somedir: [131016000020] |If you wanted to reproduce the directory hierarchy: (warning, typed directly into the browser) [131016010010] |"Xlib: extension "Generic Event Extension" missing on display" warnings [131016010020] |How to fix Xlib warning: "Xlib: extension "Generic Event Extension" missing on display" ? google search give many results but I still cant fix it :(. [131016010030] |Tried sudo apt-get install libxcb-event0 but it didnt helped. [131016010040] |I am using ubuntu on colinx on Windows XP. [131016020010] |This is because the libraries support an extension that isn't supported by the X server yet. [131016020020] |This message is harmless and can be ignored. [131016030010] |What happed to my terminal? Wherever I type some wrong command it tries to run that command in the background [131016030020] |Something strange started happening to my terminal. [131016030030] |Wherever I type some wrong command it tries to run that command in the background. [131016030040] |thegeek@colinux:~# l [9]+ Stopped l thegeek@colinux:~# fdsl [131016030050] |[10]+ Stopped fdsl [131016030060] |what could be the issue ? [131016030070] |EDIT: [131016030080] |After restarting the system the issue is solved. [131016030090] |But I am still curious what caused this issue. [131016030100] |I think it has to do something with command_not_found_handle shell function. [131016030110] |While trying to find command it was doing something weird. [131016040010] |That sounds like the command-not-found hook was acting up for some reason. [131016040020] |I've had problems with it before, but never could figure out how to fix it :-/. [131016050010] |Neworking getting Disabled [131016050020] |Hi-- [131016050030] |All, i am using fedora 13 and its working great. [131016050040] |The only problem which i am facing is the networking gets automatically disabled if i put my system on the "SUSPEND" mode for >30mins. [131016050050] |And i am not being able to enable even after right clicking. [131016050060] |Then i have to restart my system, to get the internet working. [131016050070] |Can anyone say me as to how to rectify this! [131016060010] |I have been having the same issue with Fedora 13. [131016060020] |It has been hit or miss when network does not work after suspend for me. [131016060030] |Here is what I run in a terminal to restart the network connection. [131016060040] |Update: this is a work around from this post at Fedora forums [131016060050] |In a text editor open [131016060060] |on each line that says (I had two entries) [131016060070] |dbus_send --system \ [131016060080] |add [131016060090] |--print-reply [131016060100] |so it looks like this: [131016060110] |dbus_send --system --print-reply \ [131016060120] |After the edit I tried suspend everything resumed fine, but; I have not given it any heavy testing. [131016070010] |Is there any possibilty of Linux to become Paid OS, when it became the most popular? [131016070020] |What are the chances Linux will turn into a paid OS after most people in the world start using it? [131016080010] |How to Update Apache to allow Pseudostreaming on CENTOS 5.5 & WHM [131016080020] |I can't figure out how to get pseudostreaming on my Apache server (CENTOS 5.5 i686). [131016080030] |I've read this article and these install instructions. [131016080040] |I cannot install httpd-devel or mod_ssl via yum; I get the error "package not found". [131016080050] |One person mentioned that they think WHM/CPanel breaks yum. [131016080060] |I have found some RPM packages: [131016080070] |rpm.pbone.net/index.php3/stat/4/idpl/13945478/dir/centos_5/com/mod_ssl-2.2.3-43.el5.centos.x86_64.rpm.html [131016080080] |rpm.pbone.net/index.php3/stat/4/idpl/13944425/dir/centos_5/com/httpd-devel-2.2.3-43.el5.centos.x86_64.rpm.html [131016080090] |But as I am not a unix admin, I am unsure of where to go from here. [131016080100] |Can someone point me in the right direction? [131016080110] |(Please remember that I am very junior in linux administration.) [131016090010] |I am sorry for not directly answering this one - I've got that module up and running with apache, but unfortunately on debian linux, so the packages are different, and perhaps you need to find correct packages for you as well (maybe download the files manually and then install them from files via "rpm -i filename"). [131016090020] |Anyway, I wanted to point out maybe a more plug and play solution for apache ... check out xmoovstream - it's doing the same job, but runs on php so it should work with your apache as well ;-) [131016100010] |You can always submit a ticket to cPanel support for help. [131016110010] |Meaning of root:wheel [131016110020] |What does root:wheel mean in the following? [131016110030] |chown root:wheel myfile [131016120010] |root is a user (the super user) and wheel is a group (of super users I guess). [131016120020] |means making myfile belong to the user root and the group wheel (read man chown for more information). [131016130010] |bash : get file extension [131016130020] |how do i get file extension from bash: [131016130030] |by doing that i can get extension of bz2 from path /dir/subdir/file.bz2 , but i have problem with path /dir/subdir/file-1.0.tar.bz2 [131016130040] |*I would better choose solution which using only bash without external program if it is possible. [131016130050] |edit: to make my question clear, I was creating bash script to extract any given archive just by single command of extract path_to_file , how to extract the file is determined by the script by seeing its compression or archiving type, that could be .tar.gz, .gz, .bz2 etc..., i think this should involve string manipulation, for example if i get extension of .gz i should check whether it is has string .tar before .gz if so, the extension should be .tar.gz. [131016140010] |Comments on this here: http://liquidat.wordpress.com/2007/09/29/short-tip-get-file-extension-in-shell-script/ [131016150010] |For example: [131016160010] |If the file name is file-1.0.tar.bz2, the extension is bz2. [131016160020] |The method you're using to extract the extension (fileext=${filename##*.}) is perfectly valid. [131016160030] |How do you decide that you want the extension to be tar.bz2 and not bz2 or 0.tar.bz2? [131016160040] |You need to answer this question first. [131016160050] |Then you can figure out what shell command matches your specification. [131016160060] |
  • One possible specification is that extensions must begin with a letter. [131016160070] |Here's a bash/ksh/zsh implementation: [131016160080] |ADDED: one common extension for which this heuristic fails is 7z.
  • [131016160090] |
  • Another possible specification is that some extensions denote encodings and indicate that further stripping is needed. [131016160100] |Here's a bash/ksh/zsh implementation (requiring shopt -s extglob under bash and setopt ksh_glob under zsh): [131016160110] |Note that this considers 0 to be an extension in file-1.0.gz.
  • [131016170010] |i solved it using this: [131016170020] |but this only work for known archiving type, in this case only tar [131016180010] |You might simplify matters by just doing pattern matching on the filename rather than extracting the extension twice: [131016190010] |Vlc Media Problem in Fedora! [131016190020] |I am using Fedora 13 and my VLC media player is showing this problem for the past one week. [131016190030] |How do i rectify this error. [131016190040] |Summary: [131016190050] |SELinux is preventing /usr/bin/vlc from loading /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. [131016190060] |Detailed Description: [131016190070] |The vlc application attempted to load /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. [131016190080] |This is a potential security problem. [131016190090] |Most libraries do not need this permission. [131016190100] |Libraries are sometimes coded incorrectly and request this permission. [131016190110] |The SELinux Memory Protection Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how to remove this requirement. [131016190120] |You can configure SELinux temporarily to allow /usr/lib/vlc/plugins/codec/libdmo_plugin.so to use relocation as a workaround, until the library is fixed. [131016190130] |Please file a bug report. [131016190140] |Allowing Access: [131016190150] |If you trust /usr/lib/vlc/plugins/codec/libdmo_plugin.so to run correctly, you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" [131016190160] |Fix Command: [131016190170] |chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so' [131016190180] |Additional Information: [131016190190] |Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1 023 Target Context system_u:object_r:lib_t:s0 Target Objects /usr/lib/vlc/plugins/codec/libdmo_plugin.so [ file ] Source vlc Source Path /usr/bin/vlc Port Host (removed) Source RPM Packages vlc-core-1.1.3-1.fc13 Target RPM Packages vlc-core-1.1.3-1.fc13 Policy RPM selinux-policy-3.7.19-51.fc13 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name allow_execmod Host Name (removed) Platform Linux (removed) 2.6.34.6-47.fc13.i686.PAE #1 SMP Fri Aug 27 09:29:49 UTC 2010 i686 i686 Alert Count 3 First Seen Sat 04 Sep 2010 08:26:05 PM IST Last Seen Sat 04 Sep 2010 08:35:40 PM IST Local ID 48840a90-fea4-403b-95a3-6cadc80b1a0a Line Numbers [131016190200] |Raw Audit Messages [131016190210] |node=(removed) type=AVC msg=audit(1283612740.262:117): avc: denied { execmod } for pid=9594 comm="vlc" path="/usr/lib/vlc/plugins/codec/libdmo_plugin.so" dev=sda2 ino=789070 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file [131016190220] |node=(removed) type=SYSCALL msg=audit(1283612740.262:117): arch=40000003 syscall=125 success=no exit=-13 a0=4439000 a1=1e000 a2=5 a3=bfbe2480 items=0 ppid=1 pid=9594 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="vlc" exe="/usr/bin/vlc" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) [131016190230] |Update Well, i tried that now in terminal and nothing seems to happen. [131016190240] |[chandru.math@chandru ~]$ chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so [131016190250] |It stops like this! [131016200010] |Did you run the fix command in the summary you posted? [131016210010] |Editing grub menu [131016210020] |I'd like to edit the Grub menu that comes up, to move one line and remove others. [131016210030] |I have an Inspiron 1420 that came with Ubuntu 7.10. [131016210040] |When it needed a new drive, I installed Windows 7, the original OS, and then it seemed that 10.04 wanted its own partition. [131016210050] |I probably should have checked exactly what I was doing first (famous last words). [131016210060] |What I'd like to do is remove the 7.10 lines entirely, so I can blow away everything in that partition and use it as /home for 10.04. [131016210070] |I'd also like to move the Windows 7 line up to second from the top, so booting in Windows would be a quick two keystrokes rather than following the line all the way down. [131016210080] |Hitting the Grub edit key came up with unclear instructions, and since this is the boot loader I'd kind of rather not screw it up too bad. [131016210090] |So, what's the best way to do this? [131016220010] |You should probably refer to the Ubuntu documentation [131016220020] |
  • Grub Legacy
  • [131016220030] |
  • Grub 2
  • [131016220040] |An example of menu.lst (for Grub Legacy) can be found by googling "grub menu.lst". [131016220050] |Here is the second result (the first is about Grub2). [131016230010] |Short answer: Delete the 7.10 partition, edit the files in /etc/grub.d/ as needed, then run sudo update-grub [131016230020] |Long answer: The edit mode in the boot menu is meant for temporary edits, for recovery or testing purposes usually. [131016230030] |To change the options permanently you need to boot into the OS that installed Grub to the boot block and change the Grub configuration there. [131016230040] |Ubuntu 10.04 uses Grub2 by default, which eliminates menu.lst and autogenerates grub.cfg each time update-grub is run. [131016230050] |I wouldn't edit that file manually as your changes will likely get blown away (update-grub is automatically run after various updates, especially those dealing with the kernel). [131016230060] |The first thing I'd do is make sure you're using Grub from your 10.04 partition, and not your 7.10. [131016230070] |I believe booting into 10.04 and running sudo update-grub should be sufficient. [131016230080] |If it runs fine, you're using the correct Grub. [131016230090] |If it doesn't, it should provide an error message you can use to figure out what needs to be done. [131016230100] |To remove the 7.10 entries, it might be as simple as just wiping that partition and then running sudo update-grub. [131016230110] |Most of the Grub2 entries are autodetected, so if it no longer detects the bootable kernel it won't list it. [131016230120] |If that doesn't clear it, the files to edit live in /etc/grub.d/, look for a file or section specific to 7.10 and delete it (making sure to back up any file you edit/delete first), then rerun sudo update-grub. [131016230130] |If you screw something up, you can fix it by putting your backed up files back and rerunning sudo update-grub, although you may need to boot off your recovery disc if you manage to blow away your 10.04 entry somehow. [131016230140] |Reordering is trickier, they come from the order of the files in /etc/grub.d/ and the order within those scripts. [131016230150] |The Windows entry comes from 30_os-prober, so you could rename it 11_os-prober to put it after the entries from 10_linux but that wouldn't make it the second entry and I'm not sure if that would break with updates. [131016230160] |If you don't mind having the Windows entry first and Linux second (but default) what I did instead was to copy 40_custom to 01_custom and then copied the Windows menuentry section from /boot/grub/grub.cfg verbatim. [131016230170] |That put Windows as the first entry, and you can then edit /etc/default/grub and put GRUB_DEFAULT=1 to make the second entry (it counts from 0) the default (assuming that's 10.04). [131016230180] |Note that this will duplicate the Windows entry in your boot menu, which you can eliminate the duplicate by removing the execute bit from 30_os-prober, but I suggest leaving it in case you need the autoprobed entries from os-prober later. [131016240010] |
  • Tell the Ubuntu 10.04 to impose its own Grub2 (grub-pc package) for booting, if you haven't done so already (the installation program may have reused the existing Grub from 7.04). [131016240020] |It may be as simple as [131016240030] |but check https://help.ubuntu.com/community/Grub2 if you have trouble. [131016240040] |Don't worry if you see something about 7.04: it's expected and harmless.
  • [131016240050] |
  • Remove the 7.04 installation.
  • [131016240060] |
  • Run update-grub again on the 10.04 system. [131016240070] |This time it should only offer to boot Ubuntu 10.04 and Windows.
  • [131016240080] |
  • I can't think of an easy way of having the Windows entry between the normal Linux entry and the rescue Linux entry. [131016240090] |But I think in your situation the Windows entry will be last, so you can boot it with End Enter.