[131042330010] |How to track down memory spikes? [131042330020] |I have an app running on rackspace cloud (ubuntu 10.04). [131042330030] |For some reason, over the last 3 nights, the memory has been spiking and then leveling off for about 7 hours before eventually falling off. [131042330040] |It seems to start at midnight and last through 7 am (ignore the times on the chart -- they're off by 4 hours). [131042330050] |Looking through Munin chart, there doesn't seem to be any increased activity in mysql, and the ethernet traffic doesn't seem to be spiking at all during that time (which would seem to negate something like a bot or crawler). [131042330060] |Which tools are available for linux to troubleshoot something like this? [131042340010] |In general I don't know what tool could help you, except logging ps regularly and analysing later the processes activities. [131042340020] |However, I can make a guess about the spikes around 6:00am on your graph, it could be the Ubuntu default daily cron jobs. [131042340030] |On my machine /etc/crontab, daily.d is configured to run at 6:25am. [131042340040] |But you said we should ignore the time, so the obvious question is, do you have cron jobs? [131042350010] |I'm not entirely sure it's going to be a perfect fit, but the process accounting package (mostly named psacct or acct) is able to keep record of who (which account) runs what (what program). [131042350020] |This might help you figure out what is running at the time you specified. [131042360010] |My default answer to such questions would be sar (System Activity Reporter) from the sysstat package. [131042360020] |But as far as I know, sar doesn't collect an equivalent to the output of ps. [131042360030] |So perhaps the combination of sar and elmarcos answer (regularly capture the output of ps) would help. [131042360040] |EDIT: [131042360050] |Steve D has mentioned pidstat in this question. [131042360060] |This seems more suited for your needs. [131042370010] |What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'? [131042370020] |I think these terms almost refer to the same thing, when used loosely: [131042370030] |
  • terminal
  • [131042370040] |
  • shell
  • [131042370050] |
  • tty
  • [131042370060] |
  • console
  • [131042370070] |What exactly do each of these terms refer to? [131042380010] |Pretty "Wikipedia answered question": [131042380020] |- tty is a Unix command that prints to standard output the name of the file connected to standard input. [131042380030] |The name of the program comes from teletypewriter, abbreviated "TTY". [131042380040] |- Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. [131042380050] |- Linux console is a system console support in the Linux kernel. [131042380060] |The Linux console was the first functionality of the kernel... [131042380070] |Basically terminal and console are the same thing ;) [131042390010] |A terminal or a console is a piece of hardware, using which a user can interact with an host. [131042390020] |Basically a keyboard coupled with a text screen. [131042390030] |Nowadays quite all terminals and consoles are "virtual" ones. [131042390040] |The file that represent a terminal is, traditionally, called a tty file. [131042390050] |If you look under the "/dev" directory of an unix system, you'll find a lot of tty* files connected to virtual consoles (e.g. tty1 on linux), virtual terminals (e.g. pts/0) or physical connected hardware (e.g. ttyS0 is the physical serial terminal, if any, attached on first serial port of the host). [131042390060] |A console must be a piece of hardware physically connected to (or part of) the host. [131042390070] |It has a special role in the system: it is the main point to access a system for maintenance and some special operation can be done only from a console (e.g. see single user mode). [131042390080] |A terminal can be, and usually is, a remote piece of hardware. [131042390090] |Last, but not least, a shell is a special program that interacts with a user through a controlling tty and offers, to the user, the way of launching other programs (e.g. bash, csh, tcsh). [131042390100] |A terminal emulator is a program that emulates a physical terminal (e.g. xterm, gnome-terminal, minicom). [131042390110] |So when you look to a "text window" on you linux system (under X11) you are looking to: a terminal emulator, connected to a virtual terminal, identified by a tty file, inside which runs a shell. [131042400010] |A terminal is at the end of an electric wire, a shell is the home of a turtle, tty is a strange abbreviation and a console is a kind of cabinet. [131042400020] |Well, etymologically speaking, anyway. [131042400030] |In unix terminology, the short answer is that [131042400040] |
  • terminal = tty = text input/output environment
  • [131042400050] |
  • console = physical terminal
  • [131042400060] |
  • shell = command line interpreter
  • [131042400070] |Console, terminal and tty are closely related. [131042400080] |Originally, they meant a piece of equipment through which you could interact with a computer: in the early days of unix, that meant a teleprinter-style device resembling a typewriter, sometimes called a teletypewriter, or “tty” in shorthand. [131042400090] |The name “terminal” came from the electronic point of view, and the name “console” from the furniture point of view. [131042400100] |Very early in unix history, electronic keyboards and displays became the norm for terminals. [131042400110] |In unix terminology, a tty is a particular kind of device file which implements a number of additional commands (ioctls) beyond read and write. [131042400120] |In its most common meaning, terminal is synonymous with tty. [131042400130] |Some ttys are provided by the kernel on behalf of a hardware device, for example with the input coming from the keyboard and the output going to a text mode screen, or with the input and output transmitted over a serial line. [131042400140] |Other ttys, sometimes called pseudo-ttys, are provided (through a thin kernel layer) by programs called terminal emulators, such as Xterm (running in the X Window System), Screen (which provides a layer of isolation between a program and another terminal), Ssh (which connects a terminal on one machine with programs on another machine), Expect (for scripting terminal interactions), etc. [131042400150] |The word terminal can also have a more traditional meaning of a device through which one interacts with a computer, typically with a keyboard and display. [131042400160] |For example an X terminal is a kind of thin client, a special-purpose computer whose only purpose is to drive a keyboard, display, mouse and occasionally other human interaction peripherals, with the actual applications running on another, more powerful computer. [131042400170] |A console is generally a terminal in the physical sense that is by some definition the primary terminal directly connected to a machine. [131042400180] |The console appears to the operating system as a (kernel-implemented) tty. [131042400190] |On some systems, such as Linux and FreeBSD, the console appears as several ttys (special key combinations switch between these ttys); just to confuse matters, the name given to each particular tty can be “console”, ”virtual console”, ”virtual terminal”, and other variations. [131042400200] |See also Why is a Virtual Terminal “virtual”, and what/why/where is the “real” Terminal?. [131042400210] |A shell is the primary interface that users see when they log in, whose primary purpose is to start other programs. [131042400220] |(I don't know whether the original metaphor is that the shell is the home environment for the user, or that the shell is what other programs are running in.) [131042400230] |In unix circles, shell has specialized to mean a command-line shell, centered around entering the name of the application one wants to start, followed by the names of files or other objects that the application should act on, and pressing the Enter key. [131042400240] |Other types of environments don't use the word “shell”; for example, window systems involve “window managers” and “desktop environments”, not a “shell”. [131042400250] |There are many different unix shells, but the most common ones have a common syntax based on the Bourne_shell. [131042400260] |When discussing “shell programming”, the shell is almost always implied to be a Bourne-style shell. [131042400270] |In unix system administration, a user's shell is the program that is invoked when they log in. Normal user accounts have a command-line shell, but users with restricted access may have a restricted shell or some other specific command (e.g. for file-transfer-only accounts). [131042400280] |The division of labor between the terminal and the shell is not completely obvious. [131042400290] |Here are their main tasks. [131042400300] |
  • Input: the terminal converts keys into control sequences (e.g. Left\e[D). [131042400310] |The shell converts control sequences into commands (e.g. \e[Dbackward-char).
  • [131042400320] |
  • Line edition, input history and completion are provided by the shell. [131042400330] |
  • The terminal may provide its own line edition, history and completion instead, and only send a line to the shell when it's ready to be executed. [131042400340] |The only common terminal that operates in this way is M-x shell in Emacs.
  • [131042400350] |
  • Output: the shell emits instructions such as “display foo”, “switch the foreground color to green”, “move the cursor to the next line”, etc. [131042400360] |The terminal acts on these instructions.
  • [131042400370] |
  • The prompt is purely a shell concept.
  • [131042400380] |
  • The shell never sees the output of the commands it runs (unless redirected). Output history (scrollback) is purely a terminal concept.
  • [131042400390] |
  • Inter-application copy-paste is provided by the terminal (usually with the mouse or key sequences such as Ctrl+Shift+V or Shift+Insert). [131042400400] |The shell may have its own internal copy-paste mechanism as well (e.g. Meta+W and Ctrl+Y).
  • [131042410010] |What happens to data in swap when your computer hibernates? [131042410020] |When a computer goes into hibernation mode, it saves the contents of the RAM into the swap space so that it can resume exactly where it left off when it powers back on. [131042410030] |So, what if you are currently using more memory than you have RAM. [131042410040] |In this case, some data that would otherwise be in RAM is saved to swap. [131042410050] |An example. [131042410060] |A computer has 1GB of RAM and 1GB of swap space. [131042410070] |It is currently using all but 100MB of RAM and 500MB of swap. [131042410080] |Thus, it is needing to remember about 1.4GB of memory to save its state. [131042410090] |However, swap is only 1GB. [131042410100] |What will happen in this case? [131042410110] |~~ edit ~~ [131042410120] |As answered below, the hibernate fails. [131042410130] |So then a follow-up question: [131042410140] |When this fails, where is the error reported? [131042420010] |That depends on the implementation of hibernation. [131042420020] |Even if you restrict the question to Linux, the implementation has evolved over time. [131042420030] |First, consider that some of the RAM is used for disk caches. [131042420040] |This doesn't need to be moved to the swap as it can be reloaded from the disk after the system resumes. [131042420050] |On a system with a good cost/efficiency balance, it's typical for about half of RAM being allocated to caches. [131042420060] |(See also Why use swap when there is more than enough RAM.) [131042420070] |Under Linux, some early implementations would store all allocated memory into the swap, but the current implementation(s?) of hibernation skip disk caches. [131042420080] |Second, some systems compress memory as it's written to the swap, which can make the exact required amount of swap hard to predict. [131042420090] |Some versions of Linux's hibernation support have supported compression; I don't know if current ones do. [131042420100] |What you can generally expect if there isn't enough swap space is that hibernation will fail: the system will try to store the (useful) contents of RAM into the swap, and as soon as it detects that there isn't enough space, the hibernation attempt is aborted (typically with an error message on the console and in the system logs). [131042420110] |As far as I know, Linux has always behaved like this (not that there's really another sensible behavior). [131042430010] |What is the most advanced image editing FLOSS? [131042430020] |Is it still GIMP? [131042430030] |Inkscape? [131042430040] |Are they too different to compare? [131042430050] |Does anything come close to the two? [131042430060] |Are they more/less advanced than Photoshop? [131042430070] |note: advanced = more features [131042440010] |GIMP and Inkscape aren't comparable: GIMP is a bitmap editor, Inkscape is a vector graphics editor. [131042440020] |GIMP is the uncontested leader amongst open source bitmap editors, feature-wise. [131042440030] |It ranks closely with Photoshop. [131042440040] |However GIMP has poor support for the CMYK color space, which is used by most “serious” color printers; I'm told this makes it unsuitable for many applications. [131042440050] |As usual Wikipedia has a comparison of raster graphics editors, which may or may not include all important criteria. [131042440060] |There are many different types of vector graphics. [131042440070] |Inkscape is a leader in its field, which is two-dimensional general-purpose schemas and scalable graphics, made mainly of straight lines, simple curves and filled regions. [131042440080] |Other programs may perform better for CAD, electronics schemas, geometrical constructions, state diagrams, fonts, 3D modeling, etc. [131042450010] |Krita is quite feature rich as far as capabilities if you like KDE software, I'm not really sure how it compare's to GIMP, as I'm I don't enjoy image editing, but I seem to recall reading it's better at some things (CMYK Maybe? or what is color depth?) than the GIMP. [131042450020] |From what I have seen/heard it's a powerful that most people never seem to hear about. [131042450030] |Here is a pre KDE 4 comparison of Krita and the GIMP. [131042460010] |Apache server 32 binaries vs 64 binaries? what's the difference [131042460020] |Hello guys. not sure if this is a silly question...apples and oranges maybe..but... [131042460030] |For Windows I used to download either 32 bit binaries from ASF site or 64 bit binaries from Apache lounge site (for no particular reason). [131042460040] |So - that was the way I new what version I have. [131042460050] |I've switched to ubuntu (for educational purposes) and got used to compiling from source...well...you know...make..make install etc. [131042460060] |mmmm [131042460070] |1) So - when I compile apache server from source - what binaries do i get? [131042460080] |32? [131042460090] |64? [131042460100] |2) Are there any benefits from having 64 bit Apache binaries? any cons? [131042460110] |Thnaks guys:) [131042470010] |Compiling is the process of building binaries from source. [131042470020] |The configure script and makefile will select what's appropriate for your system. [131042470030] |(64-bit executable for a 64-bit system, 32-bit for 32-bit.) [131042470040] |And if you have a 64-bit system, there is probably some potential for improved performance in using 64-bit binaries. [131042470050] |For some things it could be a huge boost; I'm guessing that for Apache it's not quite so big a deal, but I'm no expert there. [131042470060] |It certainly won't hurt, though, to build the appropriate binaries, and I don't see why you'd ever bother to mess with the build process to get 32-bit binaries if you have a 64-bit system. [131042480010] |How to have correct permissions of files from usb disks? [131042480020] |Hi, does anyone have the following problem? [131042480030] |I have an ubuntu box at work and also one at home. [131042480040] |I always copy folders/files to/from an usb disk to/from my boxes. [131042480050] |I have to change permissions of folders/files copied to boxes. [131042480060] |The permissions of folders and files are 700. [131042480070] |It is annoying to 'chmod 755 or 644' to folders/files after every transfer. [131042480080] |I found that the usb disk mounted on /media has undesirable permissions. [131042480090] |Can that be changed? [131042480100] |The usb disk has vfat or ntfs filesystem. [131042480110] |Any idea? [131042490010] |vfat and ntfs filesystem don't contain any information to represent your unix file permissions. [131042490020] |It will not be possible to set some specific permissions to the files and keep them. [131042490030] |It is possible to set the initial permissions to a specific value and use this also for the creation of new files. [131042490040] |This is called umask and supported by the mount command. [131042490050] |You can also differentiate between files and directories. [131042490060] |Here are some lines of man mount: [131042490070] |Use this in the option column in your /etc/fstab file, for example: [131042500010] |What are the benefits and downsides to use FuseFS filesystems? [131042500020] |I know some filesystems present themselves through Fuse and I was wondering about the pros and cons to this approach. [131042510010] |I'm not positive if you mean real, on-disk filesystems or any filesystem. [131042510020] |I've never seen a normal filesystem use FUSE, although I suppose it's possible; the main benefit of FUSE is it lets you present something to applications (or the user) that looks like a filesystem, but really just calls functions within your application when the user tries to do things like list the files in a directory or create a new file. [131042510030] |Plan9 is well known for trying to make everything accessible through the filesystem, and the /proc pseudo-filesystem comes from them; FUSE is a way for applications to easily follow that pattern [131042510040] |For example, here's a screenshot of a (very featureless) FUSE filesystem that gives access to SE site data: [131042510050] |Naturally none of those files actually exist; when ls asked for the list of files in the directory FUSE called a function in my program which did an API request to this site to load information about user 73 (me); cat trying to read from display_name and website_url called more functions that returned the cached data from memory, without anything actually existing on-disk [131042520010] |FUSE isn't really a file system per se but code that allows file systems to be implemented as processes instead of kernel modules. [131042520020] |One of the most useful benefit of FUSE is to allow GPL code to "mix" with non GPL one. [131042520030] |For example, Gnu/Linux and ZFS http://zfs-fuse.net/ or NTFS-3G on many OSes like OpenSolaris and *BSD http://www.tuxera.com/community/ntfs-3g-download/ [131042520040] |The main drawback is the performance impact compared to native (kernel) drivers. [131042530010] |Unix filesystems are traditionally implemented in the kernel. [131042530020] |FUSE allows filesystems to be implemented by a user program. [131042530030] |In-kernel filesystems are better suited for main filesystems for programs and data: [131042530040] |
  • They can be used on boot media (the program implementing a FUSE filesystem has to be loaded from somewhere).
  • [131042530050] |
  • They're more robust, in that they won't go away due to a process crashing or being killed by mistake.
  • [131042530060] |
  • They're somewhat faster.
  • [131042530070] |FUSE filesystems have other advantages, mostly revolving around their flexibility: [131042530080] |
  • They can be loaded and mounted by ordinary users, so they're convenient for file systems that users tend to mount by themselves: for network access, for going through archive files, for removable media, etc.
  • [131042530090] |
  • If a FUSE filesystem driver crashes, it won't panic your kernel: you'll see nothing worse than I/O errors in applications that were accessing the filesystem.
  • [131042530100] |
  • They can be programmed very quickly; there are FUSE bindings for many scripting languages where a useful FUSE filesystem driver can be written in a few hundred lines of code.
  • [131042530110] |
  • They can be deployed very quickly, both because there is no need for administrator intervention to install them and because they can be ported easily between supported OSes.
  • [131042530120] |
  • There are no licensing issues related to being statically linked with a kernel (this is affecting zfs).
  • [131042540010] |Resource needed to manage cert.db7 files for AIX [131042540020] |On AIX to get LDAP authentication working it has wanted to store the LDAP SSL certificate's trusted root in a cert.db7 file. [131042540030] |Mozilla stopped supporting it in NSS (Netscape Security Services) a while back. Cognos (also from IBM) used to use cert.db7 but in the latest versions switched to cert.db8 which is easy to make just using Firefox. [131042540040] |Anyone have good resources for making a cert.db7 file? [131042540050] |Converters? [131042550010] |I believe you mean cert7.db. [131042550020] |According to mozilla it's not a fixed format. [131042550030] |But there are lots of results if you google for cert7.db or edit cert7.db or create cert7.db or convert cert7.db that should point you in the right direction. [131042560010] |GVim compiled from source opened via SSH -X does not copy paste on selection [131042560020] |I'm using SSH (with -X specified) from a Ubuntu box to a RHEL4 box and running GVim. [131042560030] |It opens as expected in my local X, but the copy and paste via select doesn't work. [131042560040] |I cannot select text in GVim and paste in a local window, nor can I select text from a local window and paste in GVim. [131042560050] |This works, however, when I SSH (with -X specified) to a different RHEL4 box. [131042560060] |Is there something I need to install on the remote machine? [131042560070] |EDIT: I'm suspecting that it has something to do with the compile flags I used, but I don't have a clue which one. [131042560080] |I've tried --enable-gnome-check and --enable-gtk2-check, since I'm running gnome on my local machine, but that did not resolve the issue. [131042560090] |EDIT: Running vim --version on both versions of vim shows many differences, the most notable being that the machine which has no issue is for the GTK GUI and the machine which does have an issue is for the X11-Motif GUI. [131042560100] |I can't configure the problem box to use GTK though since I don't have everything I need installed. [131042560110] |EDIT [131042560120] |
  • Thanks for the help so far, guys.
  • [131042560130] |
  • To clarify, copy/paste via select works on a GVim window spawned from box A, but not on a GVim window spawned from box B. Both box A and box B are RHEL4 U8.
  • [131042560140] |
  • When I select some text in the GVim window, I can paste it via right-click within that window, but I cannot paste it into anything running locally. [131042560150] |When I select something locally, I can paste it locally but when I paste into the GVim window, it pastes the last thing selected in the GVim window, not the last thing selected locally.
  • [131042560160] |
  • Just to make it a bit freakier, sometimes I open a second GVim window from the same box, I can paste into that second window (though still not the first), but I still cannot select something in that window and paste it locally.
  • [131042560170] |
  • I get the same behaviour using Ctrl-Shift-C. [131042560180] |Holding shift while selecting with the mouse prevents selecting. [131042560190] |Ctrl-Shift-V starts block selection in vim, not pasting.
  • [131042560200] |
  • I am running Parcellite 0.9.2 on the local box, but closing it doesn't make the problem go away, and it is not interfering with the other box.
  • [131042560210] |EDIT [131042560220] |
  • The machine that is presenting the problem is a vitual machine running on VM Player.
  • [131042560230] |EDIT [131042560240] |
  • A co-worker that is also SSHing to a virtual RHES4 U8 box does not have the same issue but he used the stock vim install on the VM whereas myself and another co-worker with the problem compiled vim from source. [131042560250] |Could there be a compile flag we need?
  • [131042560260] |
  • I tried installing VM tools on one of the VMs, but it had no effect on this issue.
  • [131042560270] |EDIT [131042560280] |
  • The .vimrc between my two boxes is the same, scp'ed over.
  • [131042570010] |Just some thoughts without actually testing. [131042570020] |If you are using the shell to launch your ssh session, you can use Ctrl-Shift-c and Ctrl-Shift-v to paste. [131042570030] |Otherwise, would a right-click on your selection propose 'copy' to you? [131042580010] |One thing that I would try is to make sure that you actually let X handle the selection. [131042580020] |If you have set mouse=a in your vimrc file then vim will interpret the selection as its visual mode. [131042580030] |If this is the case, try holding Shift when selecting. [131042580040] |Your terminal emulator may have its own mechanism for copying and pasting, for example gnome-terminal uses Ctrl Shift c for copying and Ctrl Shift v for pasting (as Morlock stated in his answer). [131042580050] |You can use that instead. [131042590010] |Turns out the problem was that vim on the remote was not compiled with GTK. [131042590020] |This happened because the necessary package was not present on the remote box. [131042590030] |Thus, even with the --enable-gtk2-check compile flag set, it was not actually including GTK. [131042590040] |To fix it, log on to the remote machine and: [131042590050] |
  • Install gtk2-devel,
  • [131042590060] |
  • re-configure, re-make, &re-install vim
  • [131042590070] |A co-worker figured this out eventually. [131042600010] |What is the best way to do GUI development on a server machine? [131042600020] |This is a server at home. [131042600030] |I have 3 computers running Linux and they are all servers running dedicated tasks like MySQL/Samba, Web Server and DNS/DHCP. [131042600040] |Is it be a good idea to host a virtual machine and do the development on it? [131042600050] |Can the VM handle GUI, if possible a different GUI? [131042600060] |One of the computers is powerful enough to handle virtual machines. [131042600070] |Other two are old discards. [131042600080] |I won't be able to dual boot any of the servers though. [131042610010] |Developing on a virtual machine can be a good idea if you cannot dedicate a machine to a different OS. [131042610020] |For instance if you are writing an app for OS X you can fire up a VM and give it as much memory as it needs. [131042610030] |With most VMs you will need an extra margin of resources because you are running a host OS as well. [131042610040] |I've used VirtualBox to run Windows and Linux VMs and it works quite well. [131042610050] |For VirtualBox there is even a web based console called phpvirtualbox for controlling VMs remotely. [131042620010] |You can easily run remote desktops on a VM on a server. [131042620020] |However, you should consider the bandwidth requirements for this. [131042620030] |The advantage is that you can develop from anywhere, where you can connect to this remote desktop and all your development tools/IDEs etc are always there and setup in the same way. [131042620040] |If you run a VM on a server, I would recommend using kvm. [131042620050] |Virtualbox runs well on your desktop, because of its GUI, which is not the ideal thing on a server. [131042620060] |You can easily configure your kvm VMs with virt-manager. [131042620070] |This can also be done remotely, i.e. you run virt-manager on your desktop and virt-manager connects via i.e. ssh to your server. [131042630010] |Does $SHELL store the path to the default shell in Linux? [131042630020] |My administrator says that my default shell is set to bash, but [131042630030] |Is the default shell related to the SHELL variable at all? [131042630040] |Is not, what is the variable used for? [131042640010] |No, it is not related to default shell. [131042640020] |The system default shell is defined in /etc/default/useradd file. [131042640030] |Your default shell is defined in /etc/passwd file. [131042640040] |You can change it by chsh command. [131042640050] |The $SHELL variables usually stores the current shell executable path. [131042640060] |Each shell behaves differently on this point. [131042640070] |E.g. bash sets the SHELL variable if it is unset when it starts, otherwise it leaves it unchanged. tcsh does not support this variable at all. [131042650010] |The variable is for your information ("Hey, what shell am I running under?") rather than the way you set the shell. [131042650020] |Since Unix environment variables can only propagate down to child processes and not back up to parents, generally environment variables like this are descriptive rather than configuration options. [131042650030] |To see your default shell, look at your entry in /etc/passwd, and to change that, run chsh. [131042650040] |(This is assuming you're not using NIS or LDAP for this information; in that case it's unlikely to work in most real-world setups.) [131042650050] |And as andcoz notes, the initial defaults for new users added with the standard useradd program are in /etc/default/useradd. [131042660010] |That's not 100% true. [131042660020] |For example: [131042660030] |$SHELL contains the parent shell for your session, which is commonly your login shell as dictated by your user entry in /etc/passwd. [131042660040] |More clearly, $SHELL is the parent shell from which your current session spawned. [131042660050] |In my example the current shell, Korn, is technically running within BASH, which is why $SHELL was unmodified. [131042660060] |Obviously this is an almost exclusively semantic distinction, however, do not fall into the trap of believing that what you see is always what you get. [131042670010] |I always understood environmental variables to be advisory to programs you are running. $SHELL would be the shell you want a program to start when it needs to run a shell. [131042670020] |Compare with $EDITOR, you email program might use it to decide which editor to offer you. [131042670030] |B/c these environmental variables are so easy to change you can't really rely on them as the final word on what the world is really like. [131042670040] |Related to your question on default shell: chsh is a command that allows you to change your login shell. [131042670050] |Before changing it shows you what your current choice is. [131042680010] |The “default shell“ for a unix system administrator is what is stored in the “shell” column of the user database. [131042680020] |This is the program that is invoked when you log in in text mode (on a text mode console, or over the network via e.g. ssh). [131042680030] |The ”default shell” for a unix application is either sh or $SHELL. [131042680040] |There is some variation as to whether $SHELL is intended to be an interactive shell or a shell to run scripts. [131042680050] |The POSIX specification is ambiguous in that regard, reflecting diverging practice: [131042680060] |This variable shall represent a pathname of the user's preferred command language interpreter. [131042680070] |If this interpreter does not conform to the Shell Command Language in the Shell and Utilities volume of IEEE Std 1003.1-2001, Chapter 2, Shell Command Language, utilities may behave differently from those described in IEEE Std 1003.1-2001. [131042680080] |That bit about the preferred command language means that some applications may try to run commands in $SHELL, using POSIX shell command syntax. [131042680090] |However, the normal way to run a shell command in a unix application is through functions such as system, which is supposed to find a suitable shell regardless of the value of the $SHELL environment variable. [131042680100] |Bash and ksh are examples of POSIX-compliant shells. [131042680110] |Zsh comes close. [131042680120] |Csh is different, and you may occasionally run into trouble due to SHELL being set to csh (it's not very common as most applications do call sh and csh is compatible enough for basic use). [131042680130] |In practice, for a unix user, $SHELL is your preferred interactive shell, i.e., what you want to see when you start a terminal emulator. [131042680140] |It doesn't have to be the same as your login shell¹: you can set it in your .profile or .login. [131042680150] |¹ For example, I typically leave whatever login shell is the default, maintain a Bourne-compatible .profile, but set SHELL to zsh if it's available. [131042690010] |How would you create a user with the HOME_DIR field in /etc/passwd completely blank? [131042690020] |Closest I can come is: [131042690030] |But this creates an entry into /etc/htpasswd that looks something like this: [131042690040] |I want that '/' gone, so that it looks like this: [131042690050] |Which is achievable through usermod: [131042690060] |But I think this is a bit backwards. [131042690070] |Any ideas? [131042700010] |Really, it is not backwards. [131042700020] |An account with no login directory cannot login directly. [131042700030] |It can own resources and files. [131042700040] |What are you trying to do? [131042700050] |Does useradd complain without --home? [131042700060] |You can add users directly with vi or vim. [131042700070] |But you have to be painfully careful. [131042700080] |You also have added any groups ahead of time. [131042710010] |Firstly, I must agree with Jim that you should be very clear on your motivation to create such user account(s). [131042710020] |That being said: [131042710030] |This assumes, of course, that /REPLACEME is not used anywhere else as a valid home directory. [131042710040] |The more complex, but more precise, expression: [131042710050] |will ensure that only the user created by useradd above is modified. [131042720010] |Why do tar and gzip files usually have a file extension? [131042720020] |File extensions are not necessary on unices, still every tarred, gzipped or bzipped file I encounter has a file extension like .tar, .tar.gz or .tgz. [131042720030] |Is there any special reason for that or is that just convention? [131042730010] |They may not need an extension, but it sure makes identifying them easier in the output of ls. [131042740010] |File extensions are primarily a convention for the humans who use the system. [131042740020] |There are tools which do use the filename extension to do things. [131042740030] |For example Nautilus shows me a different icon based on the file extension. [131042740040] |If I gave you a file called file, you might not know how to open this file. [131042740050] |However, if I gave you a file named file.tar.gz or file.tar you could quickly and easily figure it out. [131042750010] |Originally, on unix systems, the extensions on file names were a matter of convention. [131042750020] |They allowed a human being to choose the right program to open a file. [131042750030] |The modern convention is to use extensions in most cases; common exceptions are: [131042750040] |
  • Only regular files have an extension, not directories or device names. [131042750050] |The mere fact of being a directory or device is enough file type indication.
  • [131042750060] |
  • Executables that are meant to be invoked directly don't have an extension. [131042750070] |The mere fact of being executable is enough information for the user, and the kernel doesn't care about file names.
  • [131042750080] |
  • Files beginning with a word in all caps are often text files, e.g. README, TODO. [131042750090] |Sometimes there is an additional part that indicate a subcategory, e.g. INSTALL.linux, INSTALL.solaris.
  • [131042750100] |
  • Files whose name begins with a dot are configuration or state files of a particular application, and often don't have an extension, e.g. .bashrc, .profile, .emacs.
  • [131042750110] |
  • There are a few traditional cases, e.g. Makefile.
  • [131042750120] |(These are common cases, not hard-and-fast rules.) [131042750130] |Most binary file formats also contain some kind of header that describes properties of the file, and typically allows the file format to be identified through magic numbers. [131042750140] |The file command looks at this information and shows you its guesses. [131042750150] |Sometimes the file extension gives more information than the file format, sometimes it's the other way round. [131042750160] |For example many file formats consist of a zip archive: Java libraries (.jar), OpenOffice documents (.odt, …), Microsoft Office document (.docx, …), etc. [131042750170] |Another example is source code files, where the extension indicates the programming language, which can be difficult for a computer to guess automatically from the file contents. [131042750180] |Conversely, some extensions are wildly ambiguous, for example .o is used for compiled code files (object files), but inspection of the file contents usually easily reveals what machine type and operating system the object file is for. [131042750190] |An advantage of the extension is that it's a lot faster to recognize it than to open the file and look for magic sequences. [131042750200] |For example completion of file names in shells is almost always based on the name (mainly the extension), because reading every file in a large directory can take a long time whereas just reading the file names is fast enough for a Tab press. [131042750210] |Sometimes changing a file's extension can allow you to say how a file is to be interpreted, when two file formats are almost, but not wholly identical. [131042750220] |For example a web server might treat .shtml and .html differently, the former undergoing some server-side preprocessing, the latter being served as-is. [131042750230] |In the case of gzip archives, gzip won't recompress files whose name ends in .gz, .tgz and a few other extensions. [131042750240] |That way you can run gzip * to compress every file in a directory, and already compressed files are not modified. [131042760010] |OpenBSD: 32 bit or 64 bit [131042760020] |I would like to use the 64 bit version of OpenBSD, but I'm not really sure how good it works. [131042760030] |Are there any known problems? [131042760040] |Is the 32 bit version more recommended for productive environment? [131042770010] |I assume that you're wondering about amd64 vs i386, the 64-bit and 32-bit architectures on PCs (there's also a choice of word size on Sparc64). [131042770020] |According to the official platform description: [131042770030] |The only major shortcoming at this time is that the kernel debugger ddb is somewhat poor. [131042770040] |Another mentioned limitation is that if your processor lacks the NX bit (most amd64 processors have it), on a 64-bit system, you won't get OpenBSD's protection against some exploits based on uploading executable code as data and exploiting a bug (e.g. a buffer overflow) to execute that code. [131042770050] |Another resource to check is the FAQ. [131042770060] |Most importantly, unlike on many other operating systems, you can't run 32-bit binaries on OpenBSD/amd64. [131042770070] |There are several virtualization technologies that allow running OpenBSD/amd64 and OpenBSD/i386 on the same machine (Xen, Vmware, and VirtualBox should support OpenBSD/amd64 guests with a 64-bit hypervisor or host OS; I don't know if there's a way to virtualize OpenBSD/i386 on an OpenBSD/amd64 host). [131042780010] |I have used 64bit OpenBSD as a firewall and router without problems for over 2 years, and would highly recomend its stability. [131042790010] |How to find files with names having a long string after the first dot [131042790020] |My Samsung Galaxy S doesn't like files where the name contains a long string after the first dot. [131042790030] |I guess some part of the software has a too short buffer for the file extension. [131042790040] |How can I find all files on my Micro-SD-Card mounted at /media/sd where the filename has more than five characters after the first dot? [131042790050] |Reading the find manpage, I thought [131042790060] |find . -regex '.*\..\{5,\}' [131042790070] |would work, but it doesn't give any hits, so I somehow don't get my regular expression right. [131042800010] |The problem is that the default type of regex's used by find is emacs-style. [131042800020] |Find's documentation for emacs style regexes doesn't include the \{n,\} construction--leading me to believe that it isn't supported in find's implemenation of emacs-style regular expressions. [131042800030] |The emacs-wiki lists this as valid, however it is possible that this wasn't always the case. [131042800040] |I found that your regex produced output if you do this: [131042810010] |Braces are not always included in basic regexp implementations. [131042810020] |I don't know if you have GNU find or Busybox find; Busybox may not have all the features of GNU find. [131042810030] |A portable way to search for files with a long extension is find . -name '*.?????*'. [131042810040] |Note that your regexp would match most files under a directory whose name contains a dot. [131042820010] |What's a good app for blogging? [131042820020] |A friend of mine recently converted from Windows to Linux and has been looking for a good app to replace Windows Livewriter. [131042820030] |From talking to him it sounds like handling images is the main feature he is looking for. [131042820040] |Are there any good apps for this? [131042820050] |Switching blog engines isn't really an option for him, so it needs to be a standalone app or a web app that generates html that he could cut and paste. [131042820060] |I myself use Markdown, but please no 'just write html', 'just write markdown', 'just write xml and use a custom xslt transform' type answers. [131042820070] |EDIT: I realized I've probably been a bit too restrictive in answer choices here. [131042820080] |Please give your suggestions for a solution. [131042820090] |Regardless of whether they meet my friends particular needs, they might meet someone else's needs. [131042830010] |Here is an article showing several blog publishing client tools for Linux. [131042830020] |However I host a wordpress blog and I haven't seen a better blogging platform anywhere as far as ease of use and extensibility. [131042830030] |You can also get them freely hosted by wordpress. [131042840010] |As a Blogger user who has been repeatedly burned by Blogger's web editor, I find myself using Tomboy to draft my blogs, and then I use the Tomboy Blogposter add-in to upload the blog as a draft, and make any necessary tweaks. [131042840020] |This is nice because I'm already a heavy Tomboy user so drafting blog posts in a Tomboy note feels natural. [131042840030] |Also, the add-in works on Windows and Mac, too. [131042840040] |Depending on your style, you may find the need to make these tweaks after uploading a deal-breaker: [131042840050] |
  • Creating proper hyperlinks (Tomboy does not let you link arbitrary text to arbitrary URLs)
  • [131042840060] |
  • Adding images (Tomboy does not have built-in image support)
  • [131042840070] |
  • Finally, making whatever style tweaks seem necessary, though for the most part I am very satisfied with the HTML uploaded by the Blogposter add-in
  • [131042840080] |The Blogposter add-in does not ship with Tomboy, but is packaged for most popular distros, and also available in source and binary form from the developer's website (in which case installation is as easy as dropping the .dll file into ~/.config/tomboy/addins). [131042840090] |The add-in seems to support most popular blogging platforms. [131042840100] |From the site: [131042840110] |Tomboy Blogposter is a Tomboy plugin to post notes to a blog from for instance Wordpress, Blogger or LiveJournal, or (hopefully) any other AtomPub enabled website. [131042850010] |I really like Wordpress' post editor. [131042850020] |If you are not using Wordpress you can always create a new post in Wordpress, make all kinds of editing you need, then copy and use the HTML without publishing the post. [131042850030] |For this you can go with a free wordpress.com account :D [131042850040] |It also looks like the only thing you need is a WYSIWYG HTML editor, a little googling might be good. [131042850050] |Try this online html editor, for example. [131042860010] |BloGTK is a little old but I like its simplicity [131042870010] |Jaws is a Framework and Content Management System for building dynamic web sites. [131042870020] |It aims to be User Friendly giving ease of use and lots of ways to customize web sites, but at the same time is Developer Friendly, it offers a simple and powerful framework to hack your own modules. [131042870030] |Jaws Project Site [131042880010] |Automounting plugged devices in linux [131042880020] |Auto-mounting seems to be a bit of a messy thing in linux. [131042880030] |The options to automount ranges from autofs, udev, hal or even filemanagers. [131042880040] |What is the best-practice method to enable automounting on devices? [131042880050] |Is there one shinning way that cuts out all the mess? [131042890010] |I would say the best practice is to go with what works best with your "desktop envorinment", as some automounting methods may not work well with, say KDE, since KDE wants to handle it. [131042900010] |Hanging install blocks new installations on WebOS [131042900020] |I tried to install an application via AppScoop. [131042900030] |From that point on no further installs were possible because of a hanging install (see picture). [131042900040] |Can you please advice how to cancel the hanging install? [131042900050] |I have shell access so don't mind sending shell commands. [131042910010] |Is it possible to name windows in emacs [131042910020] |I would like to be able to name a window in emacs, and specify that window when opening and creating new buffers. [131042910030] |I've looked through the manual but all I can find is find-file-other-window, which doesn't allow me to specify which window to open the buffer in. [131042910040] |Perhaps I'm trying to use emacs in a way it wasn't intended to be used, but what I am trying to achieve is a workspace similar to an IDE: [131042910050] |For example, I would like to have all internal help and python docs open in the right window, and all .py files in the main window by default. [131042910060] |Any ideas? [131042910070] |EDIT: I should mention that I'm using emacs in no-window console mode. [131042920010] |After extensive googling and head-scratching, I have discovered that what I was looking for is a function called set-window-dedicated-p. [131042920020] |Documentation can be found here, for anyone else who happens upon this page: [131042920030] |http://www.gnu.org/s/emacs/manual/html_node/elisp/Dedicated-Windows.html [131042920040] |Binding a key to this function will cause the selected window to refuse splitting or displaying other buffers. [131042930010] |sort output by column [131042930020] |I'd like to take this command find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" | wc -l; done ( from here ). which has an output of basically [131042930030] |and sort it by the numbers largest to smallest. but I'm not sure how to make sort, or whatever operate on a different column. [131042940010] |One option is to flip the columns: [131042940020] |Then you get output like this: [131042940030] |You can pipe that through sort -nr to sort it the way you want. [131042940040] |You can even pipe the sorted result through something like awk -F'\t' '{print $2 "\t" $1}' to flip the columns back if you need them in that order [131042950010] |Pipe the lines through sort -n -r -k2. [131042950020] |Edited to sort from largest to smallest. [131042960010] |What is /usr/local/bin? Came across it in an script installation for Applescript but would like to know more. [131042960020] |Before today, I've used Terminal to a limited extent of moving in and out of directories, changing the dates of files using the touch command, but had realised the full extent of Terminal after installing a fun script in Mac and having to chmod 755 the file to make it executable afterwards. [131042960030] |I'd like to know what is /usr/local/bin though. /usr/, I assume is the user of the computer. [131042960040] |I'm not sure why /local/ is there though. [131042960050] |It obviously stands for the local computer, but since it's on the computer (Or a server), would it really be necessary? [131042960060] |Wouldn't /usr/bin be fine? [131042960070] |And what is /bin? [131042960080] |Why is this area usually used for installing scripts into Terminal? [131042970010] |/usr/local/bin is for programs that a normal user may run. [131042970020] |
  • The /usr/local hierarchy is for use by the system administrator when installing software locally.
  • [131042970030] |
  • It needs to be safe from being overwritten when the system software is updated.
  • [131042970040] |
  • It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.
  • [131042970050] |
  • Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
  • [131042970060] |Source: Filesystem Hierarchy Standard [131042970070] |To understand the filesystem hierarchy better, visit: http://www.pathname.com/fhs/ [131042970080] |You might find this article interesting: Use and Abuse of /usr/local/bin [131042980010] |I would recommend referring to Wikipedia for structure related questions in general, it will cover the basics. [131042980020] |To answer your question directly, however: [131042980030] |
  • /usr is, loosely, non-critical system libraries and executables
  • [131042980040] |
  • /usr/local is, again loosely, for non-system libraries and executables
  • [131042980050] |This is why you tend to find similar structure between the two; /usr/{,local/}{bin,sbin,lib}. [131042980060] |Being new to the shell, that bit with the {}'s is a shell expansion. [131042980070] |Try executing [131042980080] |from your local shell to see how it works. [131042990010] |/usr/local/bin shows the UNIX-esque roots of the latest Mac OS (its BSD based under there). [131042990020] |usr stands for UNIX System Resources. [131042990030] |This is the location that system programs and libraries are stored. [131042990040] |local represents resources that were not shipped with the standard distribution and, usually, compiled and maintained on a per site basis. [131042990050] |bin represents binary compiled executables. [131042990060] |This has morphed since the early implementations of UNIX to Linux and BSD, but the convention has stayed. [131042990070] |Now, /usr/bin would be for "main" or core programs and libraries where /usr/local/bin would be for add-on and non-critical programs and libraries. [131043000010] |/usr/, I assume is the user of the computer. [131043000020] |Originally, yes, it did refer to the system's users, as I explained in my comment on nzwulfin's answer. [131043000030] |That reason is now historical. [131043000040] |The best reason for it to still be called that is that it contains "user files", which is to say things that don't need to be available until the system has booted up far enough to support normal use by users. [131043000050] |There's a clear dividing line: a Unix box is supposed to be able to boot up into single-user mode without needing any file under /usr. [131043000060] |You can try it on your Mac, if you like: hold Cmd-S while it boots, and you will land in single-user mode. [131043000070] |It's like running under the Terminal, but it takes over the whole screen because the GUI hasn't started yet, and you're running as root. [131043000080] |(Type "exit" at the single-user root prompt to leave single-user mode and continue booting into multi-user mode.) [131043000090] |Unix systems are organized in this fashion because Unix dates from the days of 5 MB hard disks the size of washing machines. [131043000100] |It was common for a big Unix system to have multiple physical hard disks, and for /usr to be off on a separate disk from the system's boot volume. [131043000110] |If the /usr volume wouldn't mount for some reason, you could still get a Unix box to boot up into single-user mode to fix it. [131043000120] |.../local/...obviously stands for the local computer... [131043000130] |Yes. [131043000140] |It refers to the fact that files under /usr/local are supposed to be particular to that single system. [131043000150] |Files that are in any way generic are supposed to live elsewhere. [131043000160] |This also has roots in the way Unix systems were commonly used decades ago when all this was standardized. [131043000170] |In this case, it's again because hard disks were bulky, really expensive, and stored little by today's standards. [131043000180] |To save money and space on disks, a computer lab full of Unix boxes would often share most of /usr over NFS or some other network file sharing protocol, so each box didn't have to have its own redundant copy. [131043000190] |(This is also where we get /usr/share: it segregates files that could be shared even between Unix boxes with different processor types. [131043000200] |Typically, text files: man pages, the dictionary, etc.) [131043000210] |Files specific to a single box would go under /usr/local, which would be a separate volume from /usr. [131043000220] |This historical heritage is why it's still the default for most third-party Unix software to install into /usr/local when installed by hand. [131043000230] |Most such software will let you install the package somewhere else, but by making a non-choice, you get the safe default, which doesn't interfere with other common install locations with more specific purposes. [131043000240] |There are good reasons to make software install somewhere else instead. [131043000250] |Apple's OS X team does this when they build, say, grep from the GNU grep source code. [131043000260] |They use /usr as the installation prefix, overriding the /usr/local default. [131043000270] |Another common prefix is /usr/X11R6. [131043000280] |And what is /bin? [131043000290] |It's short for "binary", a generic term that can refer to many different things, depending on context. [131043000300] |In the context of Unix directories, it refers to that fact that the files in that directory are compiled executable programs, as opposed to text files, which live elsewhere. [131043000310] |On a modern system, it's common to find the occasional script file in a bin directory. [131043000320] |That bends the original meaning behind the purpose of this directory, since scripts are text files, but it's not a problem in practice. [131043000330] |The original Unix systems were carefully enough scoped that this didn't happen, at least not with the OS as originally delivered. [131043000340] |Scripts that came with the OS lived elsewhere, like /etc. [131043010010] |/usr/local/bin is the most popular default location executable, especially for open source ones. [131043010020] |This is however arguably a poor choice as, on Unix systems, /usr has been standardized in the early nineties to contain a hierarchy of files that belong to the operating system and thus can be shared by multiple systems using that OS. [131043010030] |As these files are static, the /usr file system can be mounted read-only. /usr/local is defeating this standard as it is by design local thus non shared, need to be read-write to allow local compilation and isn't part of the operation system. [131043010040] |Too bad something like /opt/local wasn't chosen instead ... [131043020010] |Temporary .vimrc [131043020020] |Is there a way to read a .vimrc file for only a single ssh session? [131043020030] |That is, when I log in I perform some operation so that vim uses say /tmp/myvimrc until I log out? [131043020040] |I do not want to permanently overwrite the current .vimrc, I just need to use a different set of settings for the duration of my login every once in a while. [131043030010] |Suppose you have this other set of settings in /tmp/myvimrc. [131043030020] |If my reading of man vim is correct you can start vim with this set of settings using the following: [131043030030] |Thus, to make this an option for the rest of the session, I would create a function that sets this as an alias for vim. [131043030040] |Thus, in bash I would put something like this in my .bashrc file: [131043030050] |Then, when I wanted my new vim settings, I would just run: [131043030060] |Note that I wouldn't store myvimrc in /tmp since this could easily be cleared out upon reboot. [131043030070] |If you are using a shell other than bash this should still be possible, but the syntax could differ slightly. [131043040010] |When you log in via ssh, ssh sets variable $SSH_CONNECTION. [131043040020] |Your .bashrc could check for this var and if it is set sets alias that you want: [131043050010] |You can use the VIMINIT environment variable to override the use of the usual .vimrc while keeping other parts of the initialization process. [131043050020] |VIMINIT should be set to one or more ex-style commands (“colon” commands; use pipe (|) to separate multiple commands), not just the path to a different initialization file. [131043050030] |The main difference from using -u is that VIMINIT will still allow the other parts of initialization process to be used (e.g. system vimrc, evim.vim (if applicable), et cetera). [131043060010] |Is there a way in bash to redirect output and still have it go to stdout? [131043060020] |Okay. [131043060030] |If I wanted to redirect the output of a program to a file, I'd do something like this [131043060040] |If I wanted to redirect both stdout and stderr to that file, then I'd do [131043060050] |This is all well and good if you want the output to go to the file. [131043060060] |But what if you want the output to go to the file and yet still go to stdout/stderr? [131043060070] |So, the output is saved in the file, but you can still see it on the console as the program is running. [131043060080] |Is there a way to do that? [131043060090] |And if so, how? [131043070010] |tee exists for this purpose; it takes a filename argument and writes the data it reads from stdin to both stdout and the file: [131043080010] |How to make my linux-2.6.24.4 to identify a hard disk with serial mode on intel 3201 mainboard. [131043080020] |How to make my linux-2.6.24.4 to identify a hard disk with serial mode on intel 3201 mainboard? [131043080030] |I have pre-load modules libata.ko ahci.ko scsi_mod.ko sd_mod.ko,But it doesn't work on intel 3210 mainboard. [131043080040] |It can work on intel 5000P mainboard. [131043080050] |Any modules I should to load for support intel 3210 sata hard disk support? [131043090010] |FreeNAS grub2 booting ISO [131043090020] |I've got usb-keys setup to multi-boot different Linux images. [131043090030] |I wouldn't mind adding FreeNAS, and there's a doc with samples to add to grub.cfg [131043090040] |I'm unsure how far off the mark I am with this attempt, or even if it's possible: [131043100010] |How can I write a new syntax highlighter for gedit? [131043100020] |Some times I wish the particular language I happen to be writing in had syntax highlighting. [131043100030] |How can I add that? [131043110010] |
  • GtkSourceView is a portable C library which supports configurable syntax highlighting in gedit.
  • [131043110020] |
  • Create an xml file with custom syntax highlighting for the language.
  • [131043110030] |
  • Save it in /usr/share/gtksourceview*/language-specs as language_name.lang [131043110040] |Refer Language Definition v2.0 Reference for help with syntax highlighting.
  • [131043120010] |What is the typical file limit of a folder on *nix file systems? [131043120020] |Obviously, if you stick a lot of files in one folder, the efficiency of various file operations is going to go down (e.g. ls takes a lot longer). [131043120030] |However, what's the limit for how many files you can stick in a folder before it chokes on you? [131043120040] |Obviously, this may vary from file system to file system, but I would think that they'd at least be similar in their limits. [131043120050] |Can you stuff files in there until you run out of disk space, or are going to run into some sort of limit like you can only put 65536 (or some other multiple of 2) files in a folder before your file system chokes on you? [131043120060] |I'm most interested in jfs, since that's what I use primarily use for my large partitions, but it would be good to know for *nix file systems in general. [131043130010] |In the old UFS, directory size was limited only by your disk space as directories are just files which - like other files - have effectively unbounded length. [131043130020] |I don't know, but expect that JFS is no different. [131043130030] |As to how much is too much, it reminds me of the story of the manager who notices that when there are more than 8 users on the machine, performance drops dramatically so he asks the system administrator to find the 8 in the code and change it to 16. [131043130040] |The point being that there is no 8, it is an emergent property of the system as a whole. [131043130050] |How to know how big is too big? [131043130060] |The only practical way is to add entries until it takes longer than you want. [131043130070] |This is obviously a rather subjective approach but there isn't any other. [131043130080] |If you are looking to store 65k+ files, there are probably better approaches depending on the nature of your data and how you wish to access it. [131043140010] |How to mount external hard disk every time the server is restarted? [131043140020] |I have a server which the date will be backup to a external windows server hard disk which is mounted. [131043140030] |But problem is every time the server is restarted I will need to mount the disk manually. [131043140040] |How do I setup such as it will be mounted on server startup? [131043150010] |you need to put an entry into /etc/fstab [131043150020] |The exact line you put in depends on how you mount the filesystem e.g. is it NFS ,sftp or samba accessed. [131043160010] |What is the difference between a job and a process? [131043160020] |What is the difference between a "job" and a "process"? [131043170010] |A process is any running program with its own address space. [131043170020] |A job is a concept used by the shell - any program you interactively start that doesn't detach (ie, not a daemon) is a job. [131043170030] |If you're running an interactive program, you can press + to suspend it. [131043170040] |Then you can start it back in the forground (using fg) or in the background (using bg). [131043170050] |While the program is suspended or running in the background, you can start another program - you would then have two jobs running. [131043170060] |You can also start a program running in the background by appending an "&" like this: program &. [131043170070] |That program would become a background job. [131043170080] |To list all the jobs you are running, you can use jobs. [131043170090] |For more information on jobs, see http://www.faqs.org/docs/bashman/bashref_77.html . [131043180010] |UNIX has separate concepts "process", "process group", and "session". [131043180020] |Each shell you get at login becomes the leader of its own new session and process group, and sets the controlling process group of the terminal to itself. [131043180030] |The shell creates a process group within the current session for each "job" it launches, and places each process it starts into the appropriate process group. [131043180040] |For example, ls | head is a pipeline of two processes, which the shell considers a single job, and will belong to a single, new process group. [131043180050] |A process is a (collection of) thread of execution and other context, such as address space and file descriptor table. [131043180060] |A process may start other processes; these new processes will belong to the same process group as the parent unless other action is taken. [131043180070] |Each process may also have a "controlling terminal", which starts off the same as its parent. [131043180080] |The shell has the concept of "foreground" jobs and "background" jobs. [131043180090] |Foreground jobs are process groups with control of the terminal, and background jobs are process groups without control of the terminal. [131043180100] |Each terminal has a foreground process group. [131043180110] |When bringing a job to the foreground, the shell sets it as the terminal's foreground process group; when putting a job to the background, the shell sets the terminal's foreground process group to another process group or itself. [131043180120] |Processes may read from and write to their controlling terminal if they are in the foreground process group. [131043180130] |Otherwise they receive SIGTTIN and SIGTTOU signals on attempts to read from and write to the terminal respectively. [131043180140] |By default these signals suspend the process, although most shells mask SIGTTOU so that a background job can write to the terminal uninterrupted. [131043190010] |How to install Fedora from an ISO on a USB? [131043190020] |I have a Fedora 14 x86_64 iso image and I want to install it using a USB stick. [131043190030] |How do I get this stick to boot up, and use the image to start the installation? [131043190040] |I'm running Debian. [131043200010] |Fedora has a good page about this here: http://fedoraproject.org/wiki/FedoraLiveCD/USBHowTo . [131043200020] |They have a tool called live usb creator that will setup the USB for you. [131043200030] |For a general tool, UNetbootin will allow you to create a bootable USB drive from just about any bootable ISO image. [131043210010] |How do I get bash completion for command aliases? [131043210020] |I am looking to get tab-completion on my command line aliases, for example, say I defined the following alias : [131043210030] |Is there a way to get the completions provided by aptitude when I hit the tab key? i.e. when I write 'sudo aptitude install gnumer' and hit tab, aptitude completes this to gnumeric, or if there was uncertainty lists all the available packages starting with gnumer. [131043210040] |If I do it using my alias, nothing - no completion. [131043220010] |There is a great thread about this on the Ubuntu forums. [131043220020] |I prefer to use aliases for adding always-used arguments to existing programs. [131043220030] |For instance, with grep, I always want to skip devices and binary files, so I make an alias for grep. [131043220040] |For adding new commands such as grepbin, I use a shell script in my ~/bin folder. [131043220050] |If that folder is in your path, it will get autocompleted. [131043230010] |Good introduction to SubVersion for inexperienced users? [131043230020] |Can you suggest a good introduction to SubVersion for UNIX (or MacOSX) users? [131043230030] |It can assume familiarity with basic command-line usage, but not any advanced topic (with bash scripting counting as "advanced usage" here...) [131043230040] |Ideally, the guide should include: [131043230050] |
  • a short introduction to what a VCS is for (in general) and to the SubVersion model in particular;
  • [131043230060] |
  • quick-start to usage (checkout, update/edit/commit cycle)
  • [131043230070] |
  • installation instructions; bonus points if it mentions that it's already available for all major OSes out there and leads people to install from package and not compiling from source...
  • [131043240010] |I've always liked this subversion book, which contains a great intro and easy to follow examples. [131043240020] |It also has a quickstart guide in the appendix. [131043240030] |It's the only documentation I've ever used while I was a subversion user. [131043250010] |I understand that your interest is on SVN, but you should keep an open mind towards git. [131043250020] |The world is moving to decentralized version control systems and git is the leading system (developed by Sir Linus himself). [131043250030] |And you can host your code free at github. [131043260010] |The svn book (as others have mentioned) is probably the most comprehensive text. [131043260020] |If you want a quick introduction to the concepts then the second chapter of the TortoiseSVN documentation "Basic Version-Control Concepts" is quite good. [131043270010] |In addition to the books mentioned above, I have found svn help from the command line to be helpful, especially when using commands for the first time. e.g., svn help commit [131043270020] |I learned SVN basics by watching the command line while making changes using a GUI, like TortoiseSVN, and then moving onto the command line and using the built-in help. [131043280010] |@ Louis Salin, I am very happy to stumble across this subversion book! [131043280020] |I actually know Mercurial better, thanks to: http://hgbook.red-bean.com/ which is hosted at the same domain... :D [131043290010] |What is the most complete MS Word alternative? [131043290020] |I need to edit *.doc and *.docx files on Linux. [131043290030] |What should I use? [131043290040] |
  • Emulation + MS Office
  • [131043290050] |
  • OpenOffice
  • [131043290060] |
  • OpenOffice variants
  • [131043290070] |
  • Alternatives?
  • [131043300010] |The most complete is by far MS Office in a virtual machine: this is what I do. [131043300020] |If you will again be distributing those files you edited, it's pretty much necessary to use MS Office, because anything else can have unpredictable effects on the document. [131043300030] |If it is for your own use, OpenOffice (or LibreOffice or Go-oo, etc) is just about as good as MS Office and is the most feature-rich. [131043300040] |If you are in a KDE environment and the OO.o-derived products feel awkward or clumsy, then KOffice is an excellent alternative, although I find the .doc compatability less-suitable. [131043300050] |If you require a minimal install size, Abiword is quite good. [131043300060] |The online suites (Google Docs, Office Web Apps) are pretty good as well. [131043310010] |Use OpenOffice and recommend the ODF format. [131043310020] |For sending, just export to PDF. [131043310030] |Regards [131043320010] |Office 2007 runs quite well with wine. [131043320020] |Running a entire virtual machine just for office might be a overkill. [131043330010] |I do wish you had responded to the other questions I had asked in my comment, such as whether you need to distribute the files afterwards, and so on, because it really makes it hard to answer* (see below), but I'll have to ignore that and give my preference anyway. [131043330020] |For academic papers, the most "complete" linux solution in LaTeX, provided by TeXlive distribution on linux, which is an extremely powerful document preparation system widely used in the academic world, especially in mathematics and sciences, but is catching on even in the humanities. [131043330030] |LaTeX is free, open source software. [131043330040] |Some generic advocacy (a sample): [131043330050] |The LaTeX Project [131043330060] |Essay: Word Processors: Stupid and Inefficient [131043330070] |The Beauty of LaTeX [131043330080] |Introduction to LaTeX (written for academic philosophers) [131043330090] |Why TeX? [131043330100] |TeX showcase [131043330110] |LaTeX is not a word processor. [131043330120] |To use LaTeX, you use a regular text editor, and insert into your documents certain mark-up tags that focus on the semantic meaning of your document. [131043330130] |You say what is a heading, what is a section, what words are emphasized, what is a quotation. [131043330140] |Typically, while composing, you don't focus on how the document looks. [131043330150] |(Form is separated from content.) [131043330160] |You then use LaTeX (built on D. Knuth's TeX typesetting engine) to typeset your document. [131043330170] |It does this using very fussy typographical rules that derive from professional typesetting. [131043330180] |Unlike the default settings in Word you get very advanced typographical features like pair and margin kerning, typographical ligatures, hyphenation, white-space balancing, and so on. [131043330190] |The output's quality is comparable to InDesign or PageMaker. [131043330200] |The output is usually a PDF. [131043330210] |(You can also output to PostScript or DVI formats, or, with some loss of features, to HTML or OpenOffice format instead.) [131043330220] |Plugins exist for most good text editors like gedit, vim and emacs, and there are also LaTeX IDEs like Kile and TeXworks. [131043330230] |For a smoother transition, you might also consider a "What You See is What You Mean" editor like LyX, which is more similar to a Word Processor interface. [131043330240] |The quality of output it delivers far surpasses that of MS Word, and through the hundreds of user contributed packages, it is far richer and more powerful than MS Word or other traditional Word Processor. [131043330250] |Bibliography management through BibTeX or BibLaTeX is easier and more automated. [131043330260] |Changing, e.g., from Chicago Manual of Style bibliographies to APA style or AMS style is just a matter of changing a single setting. [131043330270] |LaTeX has a steep learning curve at first, but once you've gotten the hang of it (which isn't nearly as bad as it looks), you'll never look back, and you'll wonder how anyone puts up with stupid Word Processors. [131043330280] |LaTeX is to Word what Linux is to Windows. [131043330290] |It's not just "a better version of the same", but an entirely different trajectory in software that puts you in control of your documents. [131043330300] |
  • Caveat: My answer may not be right if you simply must have the files saved in .doc or .docx format (which the question kind of suggests). [131043330310] |But if you're just looking for something for producing academic papers, and you don't need to distribute them specifically in those formats (or receive them in those formats). [131043330320] |That's why I was asking those questions. [131043330330] |AbiWord, however, will convert from .doc(x) to LaTeX format, and as mentioned, you can output HTML from TeX source to import into Word or whatever.
  • [131043340010] |Should I install an antivirus? [131043340020] |Are builtin security features allied to secure user behavior enough to protect a Linux system? [131043340030] |Or should I install an antivirus software? [131043350010] |If its a company server then yes you should have anti-virus on it. [131043350020] |If you don't and it gets infected, you will either get your balls kicked, or get fired. [131043350030] |Neither is good. [131043350040] |At home, you can take more of a chance. however, if you have windows machines, the Linux samba shares can act as safe haven for the virus and can keep reinfecting your windows machines. [131043350050] |Whilst it's quite rare to catch a linux virus or worm, but they do appear from time to time. [131043350060] |Having a SSH port available to the internet is a major well known risk, there may well be other common attack methods for linux home servers. [131043360010] |I suggest a virus scanner (clamav) on server machines. [131043360020] |You could run one also on desktop linux to stop spreading infections. [131043370010] |Why do I need to hit enter to get my shell prompt after my init.d script completes? [131043370020] |I had to write my own CentOS init.d script for celery because it only ships with one for Debian. [131043370030] |You can see the script I wrote when I answered my own stack overflow question 3989656. [131043370040] |But there's a problem with this script. if I invoke it: [131043370050] |then I need to hit enter to get a shell prompt after it completes. [131043370060] |This is a problem because I want to invoke it via ssh from another machine by doing: [131043370070] |and ssh never returns. [131043370080] |(I use fabric to start and stop remote services, and this hangs it because it invokes the ssh command above). [131043370090] |What would cause this behavior, and how do I fix it in my script? [131043370100] |Note that if I do "sh -x /etc/init.d/celeryd" as recommended by Thomas Themel in the comments, the output is: [131043370110] |I don't understand how the daemon function in /etc/init.d/functions (which is what produces this series of bash commands) actually daemonizes the process. [131043380010] |You might want to figure out what exactly eats that return, by first running the /etc/init.d script directly with (sudo as required) sh -x /etc/init.d/celeryd start. [131043380020] |If it is in the shell script, you should see it this way. [131043380030] |If daemon itself is waiting for a newline before returning, your answer will be celeryd specific and might benefit from running it through strace or simply with a appended so that it doesn't have access to standard input through your terminal. [131043380040] |Another "grope in the dark" thing to try: run ssh with the -nt option to disable terminal allocation and standard input. [131043390010] |You might actually have a shell prompt and not realize it. [131043390020] |If you have a program that writes to the terminal while in the background, your prompt gets covered up, but it's still ready for input. [131043390030] |test.sh: [131043390040] |interactive shell: [131043390050] |In this example, the prompt is there. [131043390060] |You see the "$" right before "This is a test" that is the prompt. [131043390070] |At the bottom you can see the cursor waiting for input. [131043390080] |If you type a command here and press enter, it will work as usual. [131043390090] |Try running ls after starting your daemon but before pressing . [131043400010] |Does the daemon command need a &at the end. [131043400020] |I don't think it does. [131043400030] |This may be the source of your problem. [131043410010] |sbopkg is not working with proxy [131043410020] |Hello.. [131043410030] |Sbopkg used to work on my computer untill the network admin started to make a compulsory for the user to use proxy before connecting to the Internet. [131043410040] |So, when I tried to sync to slackbuilds, I'm getting these errors: [131043420010] |The rsync docs suggest: [131043420020] |You may establish the connection via a web proxy by setting the environment variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. [131043420030] |Note that your web proxy's configuration must allow proxying to port 873. [131043420040] |Have you tried that? [131043430010] |Tunnel through a NAT [131043430020] |I have a router that provides internet connection to a single client device via a wireless cellular data network. [131043430030] |This network provides non-public IP addresses which gets natted. [131043430040] |I would like to get a static IP address outside of the network that will route everything back to the device on the cell network. [131043430050] |Because this is an embedded device, space is limited (about 500kB to work with here). [131043430060] |Because the network is expensive, it has to not consume too much traffic. [131043430070] |First I tried creating an IPIP tunnel using iproute2. [131043430080] |From the server, I used the router's egress IP for the remote IP, not the private address the router received. [131043430090] |I hoped that once the router communicated over the tunnel to the server, the server could communicate back. [131043430100] |This was not the case. [131043430110] |I tried dropbear SSH and found it won't do a generic tunnel, but I thought I could probably get around that using iptables. [131043430120] |However, it seems that just having the ssh link open consumes about 150 bytes/sec. [131043430130] |I also tried nc, but the communication is only one direction, so I can initiate a connection to the server, but can't get anything back. [131043430140] |OpenSSH and OpenVPN are too big to fit on the device (both around 1MB). [131043430150] |My next attempt will probably be to write a program that keeps a persistent socket open to the server, and to use iptables to route the traffic to that program. [131043430160] |I wanted to see if there were any other ideas first. [131043430170] |So, any ideas? [131043440010] |The only NAT that an IPIP tunnel might work with is one-to-one NAT, which is clearly not what you have in the cellular case. [131043440020] |This "150 bytes/second for an open SSH connection" business is very strange and you should investigate. [131043440030] |No such thing happens for me with OpenSSH -> OpenSSH sessions (there's the unavoidable keepalives, but you actually WANT those when you're behind a NAT) and there's no reason it should unless you're actually passing traffic. [131043440040] |You are mistaken about netcat being unidirectional, a TCP session initiated with netcat works both ways. [131043440050] |I would suggest getting a bidirectional stream up any way you can (probably netcat and a TCP listener on the server) and running PPP over that. [131043440060] |You get all the usual disadvantages of running IP over TCP, but it's better than not having connectivity at all. [131043440070] |Here's what works for me in a quick test - on the server: [131043440080] |server:~$ sudo pppd noauth passive pty "nc -lp 9999" debug nodetach [131043440090] |On the client: [131043440100] |client:~$ sudo pppd noauth pty "nc server 9999" debug nodetach [131043440110] |I think having dialup semantics also provides a useful model for the cases where your cell device will simply not be reachable. [131043440120] |After you have the IP connection running, you can consider playing IPIP or 1:1 NAT. [131043450010] |Xorg partially working for a font error [131043450020] |Hi, in my Debian stable, when I execute: [131043450030] |startx [131043450040] |as normal user the Xorg server begin to work, but after some second I recive in console this error: [131043450050] |FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing. [131043450060] |(I cut the stacktrace :)) [131043450070] |When I execute Xorg as root, I haven't got this error! [131043450080] |I tried to: [131043450090] |
  • change permission in same file ->useless;
  • [131043450100] |
  • reinstall XOrg -->useless
  • [131043450110] |
  • file config not existing? -> what?
  • [131043450120] |I have see the doc in the Net but I found the root of the problem: for you, what's (better, what can be) the problem? [131043450130] |EDIT: [131043450140] |my /var/log/log.0 ---> http://pastebin.ca/1998075 [131043460010] |No one ever found the cause of this error, nor any actual problems caused by it, so it was resolved in later Xorg releases by simply removing the printing of the message. [131043470010] |What can I do when apt-get/aptitude doesn't create a menu item for an installed program? [131043470020] |Obviously, this question is specific to Debian-based setups. [131043470030] |I find that, often, packages I install using aptitude or apt-get only say that a menu item has been created. [131043470040] |No menu item actually appears. [131043470050] |Obviously, I can create one myself, but that requires knowing what the binary was actually called (in many cases different from the package name). [131043470060] |There must be a simple way to know which directories things have been installed in. [131043470070] |So, [131043470080] |
  • Does anyone know why the creation of menu entries fails?
  • [131043470090] |
  • How can I get info about where the binaries reside/what they're called, in order to create my own menu entry?
  • [131043480010] |You can use: [131043480020] |...to have a list of files that have been installed by the specific package. [131043480030] |If you just want executable files: [131043480040] |Here's a naively, hastily written script that does the above. [131043480050] |Usage: exec-files-from-package [package]. [131043490010] |If you see a message telling you that a menu entry has been created, it means the package has dropped a file into /usr/share/menu describing one or more menu entry, as per the Debian menu policy. [131043490020] |The documentation of the menu system (also available in /usr/share/doc/menu) explains the syntax of this file. [131043490030] |Each window manager is supposed to include the system menu. [131043490040] |Gnome doesn't do the standard thing, though (so what else is new). [131043490050] |Gnome and KDE show a menu constructed from entries in /usr/share/applications/*.desktop and /usr/share/applnk/**/*.desktop, following the Freedesktop menu specification. [131043490060] |Not all packages provide those. [131043490070] |You can create a .desktop file based on the Debian entries and put it in ~/.config/menus/. [131043500010] |Quick way to find the binaries: dpkg -L $pkg |grep bin/. [131043510010] |Dual network connection [131043510020] |I have a usb cellular modem and a Home LAN connection on my Ubuntu 10.10 box. [131043510030] |Both work independently. [131043510040] |I want to know how to have both connected at the same time, and be able to specify which application uses which device to connect to the internet. [131043510050] |Does anyone know how to do this? [131043520010] |There are several possibilities, depending on how you want to decide what packets go where. [131043520020] |Most of them will require some understanding of how TCP/IP networking works in Linux. [131043520030] |The main tools you'll have to know to do complex things are iptables (Ubuntu: iptables ) and iproute2 (ip command) (Ubuntu: iproute , iproute-doc ). [131043520040] |If you can discriminate fully by target IP address, it's simple: route the IP addresses according to your wishes. [131043520050] |For example, the following commands will cause all packets for 1.2.3.x and 1.2.4.2 to go via ppp0, and other packets to go via eth0. [131043520060] |For more complex requirements, you need to start using iptables and ip route. [131043520070] |For example, the following commands set up special routing tables so that all packets marked 1 go out via eth0 and all packets marked 2 go out via ppp0 (except that packets intended for localhost stick to the loopback interface). [131043520080] |Now you can use iptables to “mangle” outgoing packets, adding a mark that will decide what route they take. [131043520090] |For example, here's how to send all outgoing SMTP traffic (port 25) via eth0, and all traffic originated by an application running as the user proxy via ppp0. [131043520100] |See also 2 network interfaces connected to internet. [131043520110] |Choose the one to use according to the domain name and bind software to different network interfaces. [131043520120] |You'll need to arrange for these commands to run when both interfaces are connected. [131043520130] |I recommend that you write a script called /etc/network/if-up.d/0justin-routes that runs the commands you want. [131043520140] |This script will be executed whenever a network interface is brought up; as its name begins with a 0 it will run early in that process, before application-specific setup that might expect the routes to be in place. [131043520150] |There is a symmetric /etc/network/if-down.d/ in case you also want to do things when one of the interfaces comes down. [131043520160] |(All associated routes will automatically be erased, which may leave some packets stranded when you'd like them to fall back to the other interface.) [131043520170] |The ifup scripts are documented in the interfaces(5) man page. [131043520180] |The main thing to know is that the name of the interface being brought up or down is in the environement variable IFACE. [131043520190] |You can find out whether the other interface is already up with if ifconfig | sed 's/ .*//' | grep -Fqx 'eth0'; then …. [131043530010] |apt-get doesn't stop on Ctrl-c, what to do? [131043530020] |Occasionally I have connection problem with apt-get (typically because I use it behind a proxy and try to install/upgrade flash). [131043530030] |I have been trying sending Ctrlc but it would not stop. [131043530040] |I thought it was something wrong with synaptic but obviously I just tried with a terminal and don't know how to stop it now. [131043540010] |This is a known bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599007 https://bugs.launchpad.net/ubuntu/+source/apt/+bug/578625 [131043540020] |The bug report mentions that even Ctrl + \ doesn't work. [131043540030] |Solution: [131043540040] |
  • Suspend the job: Ctrl + Z
  • [131043540050] |
  • Kill it: sudo killall apt-get
  • [131043550010] |Good free intro to Ubuntu? [131043550020] |So a friend asked me if I knew of a good Ubuntu tutorial or book. [131043550030] |I remembered one from a while ago: the Ubuntu Pocket Guide, but it turns out it's from 2008, so it's not really ideal any more. [131043550040] |Are there any others out there that are updated for 10.4 or 10.10? [131043560010] |What about the Ubuntu Manual? [131043570010] |Official Ubuntu Documentation [131043580010] |Additionally to the already named Ubuntu-documentation and manual use http://askubuntu.com/. [131043590010] |Try Ubuntu 10.10 Essentials [131043600010] |Anacron job complains "Gtk-WARNING **: cannot open display" [131043600020] |I'm trying to make a simple weekly Anacron job that backs up my computer if I click yes on the dialog. [131043600030] |The script I wrote works fine if run manually, but when Anacron runs it, nothing happens and I see Gtk-WARNING **: cannot open display in the logs. [131043600040] |Apparently the script is run at a stage where graphical operations cannot be run. [131043600050] |Is there any way to get this dialog to open from an Anacron job? [131043600060] |Code: [131043600070] |Error: [131043610010] |It's probably just running without the $DISPLAY environment variable. [131043610020] |If you echo $DISPLAY in your shell you can see what its value is (most likely :0.0), and then you can specify that in the crontab file: [131043620010] |You should use user's crontab instead of system-wide. [131043620020] |Try crontab -e (opens user's crontab in $EDITOR) or echo 'your crontab line here' | crontab - [131043630010] |works for me with DISPLAY=:0.0 but I have just one user on the system so I specify that user in /etc/crontab [131043640010] |Using software OpenGL rendering with X [131043640020] |I want to try the most basic OpenGL driver, in order to find out what's the problem of my X server with OpenGL. [131043640030] |I want then to have X use software rendering for OpenGL, like windows do with opengl.dll with no driver installed. [131043640040] |How can I do that? [131043640050] |Didn't find anything when searching for X OpenGL software rendering. [131043640060] |I'll be glad for a reference, and for the keywords I had to use in order to find out how to do that. [131043640070] |I'm using Xorg in RHEL 5.3. [131043650010] |I think you're looking for Mesa. [131043650020] |I'm not sure if RHEL has RPMs for that. [131043650030] |(Although Mesa is used in some hardware OpenGL drivers for X, it also provides a software-only renderer.) [131043660010] |Duplicating my answer Force software based opengl rendering - Super User: [131043660020] |will remove the libgl1-mesa-glx hardware-accelerated Mesa libraries and install the software-only renderer. [131043660030] |Alternately, you can set LIBGL_ALWAYS_SOFTWARE=1, which will only affect programs started with that environment variable, not the entire system. [131043660040] |Fedora doesn't package the swrast DRI backend separately from mesa-dri-drivers (and I assume the same is the case in RHEL), so the first isn't an option, but the latter is. [131043670010] |Another simpler solution is to add Option NoDRI, to the Device section in xorg.conf. [131043670020] |For example [131043670030] |According to this email, it should always work. [131043670040] |See this bug for more information. [131043670050] |I didn't find anything about it in Xorg's documentation, so if you find anything about it - do edit it into my answer. [131043680010] |Why is there a separate package repository for Debian security updates? [131043680020] |Why don't they upload packages to the normal package repository? [131043680030] |Is this a general convention (IE, do other distros separate the repositories also)? [131043690010] |I'm pretty sure Debian puts security updates in the regular repo as well. [131043690020] |The reason to have a separate repo that only contains security updates is so you can set up a server, only point it at the security repo, and automate updates. [131043690030] |Now you've got a server that is guaranteed to have the latest security patches without accidentally introducing bugs caused by incompatible versions, etc. [131043690040] |I'm not sure if this exact mechanism is used by other distros. [131043690050] |There's a yum plugin to handle this kind of thing for CentOS, and Gentoo currently has a security mailing list (portage is currently being modified to support security-only updates). [131043690060] |FreeBSD and NetBSD both provide ways to do security audits of installed ports/packages, which integrate well with the built-in update mechanisms. [131043690070] |All told, Debian's approach (and probably Ubuntu's, since they're so closely related) is one of the slicker solutions to this problem. [131043700010] |It helps with two things: [131043700020] |
  • safety - first get your security fixes, then you are at lower risk while updating the rest
  • [131043700030] |
  • security updates should be stored at a high security level, as you tend to rely on them to protect the rest of your system, so it could be that this repo has stronger security controls to prevent compromise
  • [131043700040] |there could well be other reasons, but those are the two I would find useful [131043710010] |Debian has a distribution channel that provides security updates only so that administrators can choose to run a stable system with only the absolute minimum of changes. [131043710020] |Additionally, this distribution channel is kept somewhat separate from the normal channel: all security updates are fed directly from security.debian.org, whereas it is recommended to use mirrors for everything else. [131043710030] |This has a number of advantages. [131043710040] |(I don't remember which of these are official motivations I read on Debian mailing lists and which are my own mini-analysis. [131043710050] |Some of these are touched on in the Debian security FAQ.) [131043710060] |
  • Security updates are spread immediately, without the delay incurred by mirror updates (which can add about 1 day of propagation time).
  • [131043710070] |
  • Mirrors can go stale. [131043710080] |Direct distribution avoids that problem.
  • [131043710090] |
  • There is less infrastructure to maintain as a critical service. [131043710100] |Even if most of Debian's servers are unavailable and people can't install new packages, as long as security.debian.org points to a working server, security updates can be distributed.
  • [131043710110] |
  • Mirrors can be compromised (this has happened in the past). [131043710120] |It's easier to watch a single distribution point. [131043710130] |If an attacker managed to upload a malicious package somewhere, security.debian.org could push a package with a more recent version number. [131043710140] |Depending on the nature of the exploit and the timeliness of the response, this could be enough to keep some machines uninfected or at least warn administrators.
  • [131043710150] |
  • Fewer people have upload rights on security.debian.org. [131043710160] |This limits the possibilities for an attacker trying to subvert an account or machine in order to inject a malicious package.
  • [131043710170] |
  • Servers that don't need ordinary web access can be kept behind a firewall that only allows security.debian.org through.
  • [131043720010] |Can't access select https sites on Linux over PPPoE [131043720020] |My internet connection used to be a direct LAN connection to my provider. [131043720030] |Back then, everything would load fine on both Windows and Ubuntu (dual boot). [131043720040] |However, a while ago they started needing me to dial (PPPoE) using a username and password. [131043720050] |Gateway, subnet mask, IP, DNS servers all stayed the same. [131043720060] |But since then, I haven't been able to browse certain websites on Ubuntu, even though there have been no such issues on Windows. [131043720070] |Some example websites are - Ovi's sign in page (although share.ovi.com loads fine, and nokia.com loads fine), Live Mail (works on Chrome(ium) and Opera but not on Firefox (both 3.6 and 4)) Mozilla Addons website and other random websites. [131043720080] |Some of the websites that don't load show timeout messages and for some websites (like the moz addons one), the browser will keep trying to load without an end (I've left it like that even for hours but not noticed anything different happen). [131043720090] |I have tried changing the DNS servers to public ones. [131043720100] |I have even tried booting from a Fedora LiveCD and then changing the DNS to those (and even to the ones of OpenDNS), but the exact same thing happens. [131043720110] |What could be inherently wrong with some config within Linux itself that is causing this problem? [131043720120] |Does anyone know why this is happening and how it can be fixed? [131043720130] |Note: This question has been cross-posted on SU, but not gotten any responses. [131043720140] |Update: Just saw here http://ubuntuforums.org/showthread.php?t=1571086&highlight=pppoe that someone else was having similar problem and solved it by putting a NetworkManager.conf file in /etc/NetworkManager. [131043720150] |What needs to be in that file? [131043730010] |It appears that the core problem is something to do with SSL. [131043730020] |All of your problem URLs are https://.... ones. [131043730030] |I don't see why a change to PPPoE affects this, but perhaps your ISP changed more than one thing at once, and you're blaming the wrong change. [131043730040] |I would try adding a hardware router, one specifically recommended by model number by your ISP. [131043730050] |Not only is that likely to negotiate the PPPoE connection exactly as your ISP wants, perhaps it will solve the issue with SSL connections, too. [131043730060] |If it doesn't help your immediate problem, you do still get a few side benefits from it. [131043730070] |First, a hardware firewall adds a layer of security. [131043730080] |If you need to allow connections to the machine behind the firewall, see PortForward.com for guides for port forwarding guides every router you're likely to use. [131043730090] |Second, most home routers let you share your Internet connection with multiple PCs. [131043740010] |I had this exact same problem with chromium (and chrome). [131043740020] |I assumed it was a webkit issue. [131043740030] |I never found a permanent solution but if you google that error code (without the actual values) you'll see many people have the same issue. [131043740040] |I could temporarily get it to work by closing the tab that was connected to the particular website and then cleared my cache and cookies and everything. [131043740050] |I never found a solution and have since gone back to firefox. [131043750010] |You have the symptoms of an MTU problem: some TCP connections freeze, more or less reproducibly for a given command or URL but with no easily discernible overall pattern. [131043750020] |A telltale symptom is that interactive ssh sessions work well but file transfers almost always fail. [131043750030] |Furthermore pppoe is the number one bringer of MTU problem for home users. [131043750040] |So I prescribe an MTU check. [131043750050] |What is it? [131043750060] |The maximum transmission unit is the maximum size of a packet over a network link. [131043750070] |The MTU varies from transport medium to transport medium, e.g. wired Ethernet and wifi (802.11) have different MTUs, and ATM links (which make up most of the long-distance infrastructure) each have their own MTU. [131043750080] |PPPOE is an encapsulated protocol, which means that every packet consists of a few bytes of header followed by the underlying packet — so it lowers the maximum packet size by the size of the header. [131043750090] |IP allows routers to fragment packets if they detect that they're too big for the next hop, but this doesn't always work. [131043750100] |In theory the proper MTU should be discovered automatically, but this also doesn't always work either. [131043750110] |In particular googling suggests that Network Manager doesn't always properly act on MTU information obtained from MTU discovery, but I don't know what versions are affected or what the problematic use cases are. [131043750120] |How to measure it. [131043750130] |Try sending ping packets of a given size to an outside hosts that responds to them, e.g. ping -c 1 -s 42 8.8.8.8 (on Linux; on other systems, look up the documentation of your ping command). [131043750140] |Your packets should get through for small enough values of 42 (if 42 doesn't work, something is blocking pings.). [131043750150] |For larger values, the packet won't get through. [131043750160] |1464 is a typical maximum value if the limiting piece of infrastructure is your local Ethernet network. [131043750170] |If you're lucky, when you send a too large packet, you'll see a message like Frag needed and DF set (mtu = 1492). [131043750180] |If you're not lucky, just keep experimenting with the value until you find what the maximum is, then add 28 (-s specifies the payload size, and there are 28 bytes of headers in addition to that). [131043750190] |See also How to Optimize your Internet Connection using MTU and RWIN on the Ubuntu forums. [131043750200] |How to set it (replace 1454 by the MTU you have determined, and eth0 by the name of your network interface) [131043750210] |
  • As a once-off (Linux): run ifconfig eth0 mtu 1454
  • [131043750220] |
  • Permanently (Debian and derivatives such as Ubuntu, if not using Network Manager): Edit /etc/network/interfaces. [131043750230] |Just after the entry for your network interface (after the iface eth0 … directive), add a line with pre-up ifconfig $IFACE mtu 1454. [131043750240] |Alternatively, if your IP address is static, you can add the mtu 1454 parameter to the iface eth0 inet static directive.
  • [131043750250] |
  • Permanently (Debian and derivatives such as Ubuntu, with or without Network Manager): Create a script called /etc/network/if-pre-up.d/mtu with the following contents and make it world-executable (chmod a+rx): [131043760010] |Strange change directory [131043760020] |Is it possible to make bash change directory in command line simply by typing that directory without any commands like 'cd'? [131043760030] |For example is it possible instead of writing this: [131043760040] |I just want to write only this: [131043760050] |In other words if I call directory as an application then I want to set that directory as a working one. [131043770010] |I would imagine so. [131043770020] |There is some catch-all mechanism that Ubuntu has. [131043770030] |When you run a command that isn't on the system, it sometimes says : [131043770040] |No command 'foo' found did you mean:... [131043770050] |I'd bet you can hijack whatever that is and add a check to see if it's given a directory. [131043770060] |It's probably worth posting another question asking what does that. [131043770070] |EDIT: Found it: https://wiki.ubuntu.com/CommandNotFoundMagic [131043780010] |In bash there is also autocd option. [131043780020] |You can enable it by using shopt -s autocd: [131043790010] |bash get file name and extension [131043790020] |Possible Duplicate: bash : get file extension [131043790030] |I have file names like below [131043790040] |
  • filename.jar
  • [131043790050] |
  • filename.tar.gz
  • [131043790060] |
  • filename with no extension
  • [131043790070] |
  • org.eclipse.birt.chart.reportitem_2.1.0.N20060628-1351.jar
  • [131043790080] |
  • OPSWoracle10g_instantclient-10.2.0.3.0-3.sparc64.rpm
  • [131043790090] |
  • web-app_2_3.dtd
  • [131043790100] |How can I get the file names and extensions for all these scenarios in a bash script. [131043790110] |Can you please help me. [131043790120] |Iuse3d the solution by Gilles @ bash : get file extension