[131045560010] |keyboard shortcuts not working in kde 4.5.0 [131045560020] |My printscreen button doesn't work (by doesn't work I mean it doesn't launch ksnapshot, xev registers it's events just fine), does anyone have any idea how to fix it? old workarounds don't seem to be working [131045560030] |update [131045560040] |~/.xsession-errors has this in it... [131045570010] |I figured it out by trying to rebuild kdelibs it told me attica wasn't installed, turned out it was corrupted. [131045570020] |A reinstall fixed the issue. [131045580010] |How do I use SSH keys for passwordless SSH via X11 apps (like nautilus)? [131045580020] |I just reinstalled Linux on my laptop, and I'm trying to get SSH pubkey authentication working via X11 applications. [131045580030] |Specifically, I'm trying to use baobab to display the usage of a remote filesystem, and I need to SSH in as root but root has no password, o I need to use an SSH key to authenticate. [131045580040] |In the terminal, if I ssh root@theserver I get right in with no password, but if I use Baobab or Nautilus to connect, it asks me for my password. [131045580050] |How can I have it use my SSH key? [131045580060] |I'm using Gnome on Ubuntu 10.10 in case it matters. [131045580070] |On my previous install this worked, and I don't know if I did something before to make it work. if so, I've forgotten what... [131045580080] |In fact, my previous install would pop up an X11 dialog asking for my SSH private key password if I needed to unlock it. [131045580090] |How do I make that happen again? [131045590010] |Sorry everyone, it was a bonehead error on my part. [131045590020] |The authorized_keys2 file for root was incorrect. [131045590030] |Once I re-copied that file to the server, it works as it should. [131045600010] |count lines in a file [131045600020] |I'm sure there are many ways to do this: how can I count the number of lines in a text file? [131045610010] |The standard way is with wc, which takes arguments to specify what it should count (bytes, chars, words, etc.); -l is for lines: [131045620010] |As Michael said, wc -l is the way to go. [131045620020] |But, just in case you inexplicably have bash, perl, or awk but not wc, here are a few more solutions: [131045620030] |

Bash-only

[131045620040] |

Perl Solutions

[131045620050] |and the far less readable: [131045620060] |

Awk Solution

[131045630010] |Steven D forgot GNU sed: [131045630020] |Also, if you want the count without outputting the filename and you're using wc: [131045630030] |Just for the heck of it: [131045640010] |ssh prompts for password despite ssh-copy-id [131045640020] |I've been using public key authentication on a remote server for some time now for remote shell use as well as for sshfs mounts. [131045640030] |After forcing a umount of my sshfs directory, I noticed that ssh began to prompt me for a password. [131045640040] |I tried purging the remote .ssh/authorized_keys from any mention the local machine, and I cleaned the local machine from references to the remote machine. [131045640050] |I then repeated my ssh-copy-id, it prompted me for a password, and returned normally. [131045640060] |But lo and behold, when I ssh to the remote server I am still prompted for a password. [131045640070] |I'm a little confused as to what the issue could be, any suggestions? [131045650010] |sshd gets weird about permissions on $HOME, $HOME/.ssh (both directories) and on $HOME/.ssh/authorized_keys. [131045650020] |One of my linux boxes ended up with drwxrwxrwx permissions on my $HOME directory. [131045650030] |An Arch linux box absolutely would not log in using public keys until I removed 'w' permission for group, other on my $HOME directory. [131045650040] |Try making $HOME and $HOME/.ssh/ have more restrictive permissions for group and other. [131045650050] |See if that doesn't let sshd do its stuff. [131045660010] |Reassign Ctl and Alt keys - xmodmap error [131045660020] |I am attempting to remap my keyboard in order to make emacs usable - my ergonomic keyboard puts its single Control key in an isolated 4-key island way off to the left. [131045660030] |The OS is debian squeeze. [131045660040] |Here are the lines I am attempting to feed to xmodmap, I place them into a file ~/.Xmodmap [131045660050] |My goal is to make my Option (a.k.a. Alt) keys behave like Control keys, and to get my Windows (a.k.a. Super) keys to behave like Alt. [131045660060] |Here are the keycodes and keysms output by xev for the keys in question. [131045660070] |Note, my keyboard (a Goldtouch ergonomic keyboard) has only one control key. [131045660080] |Here is what xev displays while running xmodmap .Xmodmap [131045660090] |And here is the error returned by xmodmap: [131045660100] |Whats the deal? [131045670010] |This is another solution to your problem although it doesn't really answer your question. [131045670020] |Edit xorg.conf, inserting the following into Section "InputDevice": [131045680010] |This has already been reported as Debian bug #564327, Debian bug #565279, Ubuntu bug #524774, and FreeDesktop bug 20145. [131045680020] |There is a source patch attached to the FreeDesktop bug discussion. [131045680030] |There are several workaround proposals in the Ubuntu bug discussion, in particular a .Xmodmap workaround. [131045690010] |Looking at the workaround linked by Giles, this is what worked for me: [131045690020] |My Option keys now function like Control keys and my Windows Keys like Alt keys. [131045700010] |IMAP mail notifier for window manager/task bar? [131045700020] |I am searching for a small new-email-notifier for IMAP mailboxes that displays it's status in the icon-bar (how do you call it?) of a window manager. [131045700030] |Basically some biff/xbiff like tool ported to 21th century technology. ;) [131045700040] |I am using awesomewm, which is able to display in its taskbar the 'applets' (?), which also work under gnome (I guess that it implements some freedesktop standard). [131045700050] |Basic requirements: [131045700060] |
  • should not waste memory/CPU (e.g. a pythonGTK based solution probably would)
  • [131045700070] |
  • support for IMAPS, and should check the host TLS certificate
  • [131045700080] |
  • configurable poll intervalls
  • [131045700090] |
  • should not distract too much
  • [131045700100] |
  • nice interface
  • [131045700110] |Nice to have: [131045700120] |
  • optional configuration of a user defined action (executing an external command)
  • [131045710010] |Have looked at gnubiff? [131045710020] |I use it under GNOME for file mailbox, but it supports IMAP too. [131045720010] |hey you can always write your own! [131045720020] |you can emit this into dmenu or another wm notification tool [131045730010] |I am now using Trysterobiff. [131045730020] |It is a non-polling IMAP mail notifier for the systray. [131045730030] |It implements the requirements, including the execution of external commands and does not crash. [131045730040] |I've written it using Qt, thus Trysterobiff is quite portable. [131045730050] |The non-polling operation is implemented using the IDLE extension of IMAP, i.e. you are immedialtely notified of new mail (in contrast to a polling approach). [131045740010] |A tool for automatically applying RandR configuration when external display is plugged in [131045740020] |Hello there, [131045740030] |is there a tool which enables one to: [131045740040] |
  • remember current RandR configuration (position, orientation, resolution etc) on per-monitor basis,
  • [131045740050] |
  • automatically apply last known good configuration as soon as the display is plugged in, with no need to muck around with applets or xrandr(1)?
  • [131045740060] |The configurations would have to be applied on a per-user, per-display basis. [131045740070] |If there is no such tool in the wild, I'd like to throw together one myself, but as far as I can see, there's no way to tell that a monitor has been plugged in. [131045740080] |Do I have to poll with xrandr -q once in a while to figure out that an output was connected or disconnected, or is there a more efficient way to do it? [131045740090] |Can udev be tuned to do just that? [131045750010] |I am not aware of such a tool and I guess that not a lot of hardware support the generation of such events (an Intel related discussion). [131045750020] |And polling would not be a very elegant solution - would waste CPU cycles and energy. [131045760010] |How can I solve wifi connection problems between Arch Linux and a WPA2 network? [131045760020] |My home network uses WPA2 for encryption. [131045760030] |To connect to it from my Arch Linux insallation, I first tried using NetworkManager, however, that only managed to connect for a minute at most before dropping the connection. [131045760040] |I replaced it with wicd, which worked satisfactorily until somewhat recently. [131045760050] |Since then, if it fails to establish the connection at startup, or if it loses connection, it will be unable to establish a connection. [131045760060] |Attempting to reconnect with the GUI slows the system down so much that I have to switch from X to a tty and kill the process. [131045760070] |The curses interface is unable to establish a connection in these circumstances, but doesn't impair system performance. [131045760080] |Restarting the daemon is not enough to fix it from the bugged state. [131045760090] |I need to power the system off and on again. [131045760100] |The windows installation on the same laptop does suffer some intermittent connectivity problems (it's a crappy ISP router powering the network), but recovers from them, only requiring reconnecting to the network. [131045760110] |Prior to using Arch Linux, I used to use Ubuntu as the Linux distro on the laptop, and that had the same results as Windows. [131045760120] |What could be causing this problem (which I suspect may be related to the earlier NetworkManager problem), and how can I resolve it? [131045760130] |For what it's worth, my wireless network card is a broadcom BCM4312, and it is using the b43 drivers. [131045760140] |EDIT: Attempting to run wpa_supplicant while wicd is unable to connect produces this output: [131045760150] |ioctl[SIOCSIWSCAN]: Device or resource busy Failed to initiate AP scan. ioctl[SIOCSIWSCAN]: Device or resource busy Failed to initiate AP scan. [131045760160] |No network configuration found for the current AP CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0 ioctl[SIOCSIWSCAN]: Device or resource busy Failed to initiate AP scan. [131045760170] |Further edit: The problem is significantly more likely to occur when the system is running on battery power, but can still occur while it is plugged in. [131045760180] |EDIT 3: This is almost certainly related to power saving options. [131045760190] |Paying more attention, this always occurs when either the system is running on battery power, when it has been left alone for a significant period of time, or when the lid is closed. [131045770010] |You can start by running wpa_supplicant manually without the -B option: it will stay in the foreground and show you what's happening. [131045770020] |The Arch wiki has a good section on wpa_supplicant [131045780010] |Object-oriented shell for *nix [131045780020] |Preface: I love bash and have no intention of starting any sort of argument or holy-war, and hopefully this is not an extremely naive question. [131045780030] |This question is somewhat related to this post on superuser, but I don't think the OP really knew what he was asking for. [131045780040] |I use bash on FreeBSD, linux, OS X, and cygwin on Windows. [131045780050] |I've also had extensive experience recently with PowerShell on Windows. [131045780060] |Is there a shell for *nix, already available or in the works, that is compatible with bash but adds a layer of object-oriented scripting into the mix? [131045780070] |The only thing I know of that comes close is the python console, but as far as I can tell it doesn't provide access to the standard shell environment. [131045780080] |For example, I can't just cd ~ and ls, then chmod +x file inside the python console. [131045780090] |I would have to use python to perform those tasks rather than the standard unix binaries, or call the binaries using python code. [131045780100] |Does such a shell exist? [131045790010] |There're Rush which uses ruby and Psh which is based on perl. [131045800010] |I can think of three desirable features in a shell: [131045800020] |
  • Interactive usability: common commands should be quick to type; completion; ...
  • [131045800030] |
  • Programming: data structures; concurrency (jobs, pipe, ...); ...
  • [131045800040] |
  • System access: working with files, processes, windows, databases, system configuration, ...
  • [131045800050] |Unix shells tend to concentrate on the interactive aspect and subcontract most of the system access and some of the programming to external tools, such as: [131045800060] |
  • bc for simple math
  • [131045800070] |
  • openssl for cryptography
  • [131045800080] |
  • sed, awk and others for text processing
  • [131045800090] |
  • nc for basic TCP/IP networking
  • [131045800100] |
  • ftp for FTP
  • [131045800110] |
  • mail, Mail, mailx, etc. for basic e-mail
  • [131045800120] |
  • cron for scheduled tasks
  • [131045800130] |
  • wmctrl for basic X window manipulation
  • [131045800140] |
  • dcop for KDE ≤3.x libraries
  • [131045800150] |
  • dbus tools (dbus-* or qdbus) for various system information and configuration tasks (including modern desktop environments such as KDE ≥4)
  • [131045800160] |Many, many things can be done by invoking a command with the right arguments or piped input. [131045800170] |This is a very powerful approach — better have one tool per task that does it well, than a single program that does everything but badly — but it does have its limitations. [131045800180] |A major limitation of unix shells, and I suspect this is what you're after with your “object-oriented scripting” requirement, is that they are not good at retaining information from one command to the next, or combining commands in ways fancier than a pipeline. [131045800190] |In particular, inter-program communication is text-based, so applications can only be combined if they serialize their data in a compatible way. [131045800200] |This is both a blessing and a curse: the everything-is-text approach makes it easy to accomplish simple tasks quickly, but raises the barrier for more complex tasks. [131045800210] |Interactive usability also runs rather against program maintainability. [131045800220] |Interactive programs should be short, require little quoting, not bother you with variable declarations or typing, etc. [131045800230] |Maintainable programs should be readable (so not have many abbreviations), should be readable (so you don't have to wonder whether a bare word is a string, a function name, a variable name, etc.), should have consistency checks such as variable declarations and typing, etc. [131045800240] |In summary, a shell is a difficult compromise to reach. [131045800250] |Ok, this ends the rant section, on to the examples. [131045800260] |
  • The Perl Shell (psh) “combines the interactive nature of a Unix shell with the power of Perl”. [131045800270] |Simple commands (even pipelines) can be entered in shell syntax; everything else is Perl. [131045800280] |The project hasn't been in development for a long time. [131045800290] |It's usable, but hasn't reached the point where I'd consider using it over pure Perl (for scripting) or pure shell (interactively or for scripting).
  • [131045800300] |
  • IPython is an improved interactive Python console, particularly targetted at numerical and parallel computing. [131045800310] |This is a relatively young project.
  • [131045800320] |
  • irb (interactive ruby) is the Ruby equivalent of the Python console.
  • [131045800330] |
  • scsh is a scheme implementation (i.e. a decent programming language) with the kind of system bindings traditionally found in unix shells (strings, processes, files). [131045800340] |It doesn't aim to be usable as an interactive shell however.
  • [131045800350] |
  • zsh is an improved interactive shell. [131045800360] |Its strong point is interactivity (command line edition, completion, common tasks accomplished with terse but cryptic syntax). [131045800370] |Its programming features aren't that great (on par with ksh), but it comes with a number of libraries for terminal control, regexps, networking, etc.
  • [131045800380] |
  • fish is a clean start at a unix-style shell. [131045800390] |It doesn't have better programming or system access features, but has room to evolve them one day (in the form of a new, more powerful set of control structures).
  • [131045800400] |Addendum: another part of the unix toolbox is treating many things as files: [131045800410] |
  • Most hardware devices are accessible as files.
  • [131045800420] |
  • Under Linux, /sys provides more hardware and system control.
  • [131045800430] |
  • On many unix variants, process control can be done through the /proc filesystem.
  • [131045800440] |
  • FUSE makes it easy to write new filesystems. [131045800450] |There are already existing filesystems for converting file formats on the fly, accessing files over various network protocols, looking inside archives, etc.
  • [131045800460] |Maybe the future of unix shells is not better system access through commands (and better control structures to combine commands) but better system access through filesystems (which combine somewhat differently — I don't think we've worked out what the key idioms (like the shell pipe) are yet). [131045810010] |IPython is surprisingly convenient to use. [131045810020] |Standard shell features: job control, readline editing and history, aliases, cat ls cd and pwd, pager integration, running any system command by prefixing it with a ! or enabling %rehashx, command output assignable to a python variable, python values available as shell variables. [131045810030] |Python-specific: reusing results from the last commands, quick access to documentation and source, module reloading, debugger. [131045810040] |Some cluster support if you're into that. [131045810050] |That said, running complex pipes isn't done in Python; you'll be using the posix shell as well, just with some glue to pass values to and fro. [131045820010] |ksh93t+ is introducing some OO concepts while retaining the bourne/posix shell syntax: http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html [131045830010] |Hello, [131045830020] |oo-style library for bash 4. [131045830030] |Written in bash. [131045830040] |Source and use. [131045830050] |http://sourceforge.net/projects/oobash/files/ [131045830060] |Still a very young fun project... [131045840010] |Getting visual feedback of workspace switch in xfce [131045840020] |I make heavy use of workspaces, and have a lot of them (a 6x4 grid). [131045840030] |I usually run openbox, but am currently using a machine that doesn't have openbox set up, so I'm using xfce because it's already mostly configured to my liking. [131045840040] |I've gotten used to getting visual feedback when I switch workspaces, showing me which one I've just moved to, and am finding myself a bit disoriented in xfce. [131045840050] |In openbox this is a big heads-up display, which is pretty much ideal. [131045840060] |I'm aware that the workspace switcher panel applet will highlight the active workspace, but this only seems to work for workspaces which have some desktop space showing; since I generally have all my windows maximized, this isn't super helpful. [131045840070] |Is there a way to enable visual feedback showing the new workspace when switching workspaces in xfce? [131045850010] |I also keep windows maximized 95% of the time, but the workspace switcher panel does change depending on what workspace I am in. [131045850020] |For the currently selected workspace, the active window is light blue, all other windows are dark blue, and all windows in all other workspaces are grey. [131045850030] |This may be a function of the theme I'm using (theme called 'Xfce-4.2'), I'm not sure. [131045850040] |Have you tried using different themes? [131045850050] |I realize that this isn't as obvious as the big numbers that flash up when you change that I've seen elsewhere. [131045850060] |If someone knows how to get those working in xfce, I would like to know. [131045850070] |But barring that, I'd poke around with the color settings, it is possible to get the workspace switcher to colorize the windows based on which workspace is active. [131045850080] |I am running ubuntu 10.4 with xfce 4.6.1 installed (I tried xubuntu, but couldn't get it to work as well). [131045860010] |If you're so inclined, you can install pyxfce and somehow handle active_workspace_changed callback, e.g. by showing a notification via notify-send or aosd_cat. [131045860020] |But this is, of course, a hack, and no, I didn't try it. [131045870010] |How many cores can Linux kernel handle? [131045870020] |I'm interested in theoretical limits, perhaps with examples of systems having huge numbers of CPU's. [131045880010] |this is what Launchpad has to say about Ubuntu, so I guess it applies to others: 32 or 64 CPUs for x86 and x86_64 respectively. [131045880020] |Redhat says the same, but in a management-friendly table. [131045880030] |Redhat EL6 can do 32 for x86, or 128 or 4096 CPUs cores for x86_64. [131045890010] |At least 2048 in practice. [131045890020] |As a concrete example, SGI sells its UV system, which can use 256 sockets (2,048 cores) and 16TB of shared memory, all running under a single kernel. [131045890030] |I know that there are at least a few systems that have been sold in this configuration. [131045890040] |According to SGI: [131045890050] |Altix UV runs completely unmodified Linux, including standard distributions from both Novell and Red Hat. [131045900010] |How to use STL in unix and linux? [131045900020] |How to use STL(standard template library) in HP-Unix . [131045900030] |How to compile and run the program with STL functions? [131045910010] |I guess all you need is a package providing the g++ command (plus all the dependencies, of course). [131045920010] |Every standard conforming compiler should come with STL, as it is part of the standard library. [131045920020] |The first standard was finalized in 1998, so unless you are using a really old system, it should be available. [131045920030] |All you need to do is use the proper #includes. [131045930010] |Do I need to cross-compile my program when my target is 64 bit arch. and host is 32 bit arch from x86 family? [131045930020] |I have scenario in which my host is : x86 32 bit processor my target is : x86 64 bit processor [131045930030] |I have a couple of questions : [131045930040] |
  • I want to know if i can simply compile a program in my host using the available gcc and run it on the target?
  • [131045930050] |
  • Do i need to cross compile it for x86 64 bit processor? [131045930060] |If yes, how can i specify it while compiling?
  • [131045930070] |
  • Do i need to use separate tool-chain for cross-compiling the program?
  • [131045940010] |yes you can: just specify the correct comnpiler options and you're done. [131045940020] |You won't be able to run the resulting binary on your 32 bit host. [131045940030] |I think you need: CFLAGS=-m64 you'll also need to set LD_LIBRARY_PATH and similar to the 64-bit headers and libraries for your dependancies. [131045940040] |stackoverflow has a question with more answers. [131045950010] |All amd64 (i.e. 64-bit x64) processors can run 32-bit x86 binaries. [131045950020] |Also, on most operating systems, you can run x86 programs on an amd64 OS. [131045950030] |So it is often possible to deploy x86 binaries on amd64 processors. [131045950040] |Whether it's desirable to do so is a different matter. [131045950050] |64-bit OSes often come with a restricted set of 32-bit libraries, so if your program uses some uncommon libraries it will be easier to install a 64-bit executable. [131045950060] |Depending on your application, there may or may not be a performance advantage to 32-bit or 64-bit binaries. [131045950070] |If you decide you want to deploy 64-bit executables, you'll need a cross-compililation environment for the amd64 (a.k.a. x86_64) architecture running on an x86 architecture. [131045950080] |This means both a compiler, and static libraries to link against. [131045950090] |A gcc installation can share frontends and include multiple backends. [131045950100] |But not many distributions ship with amd64 development tools on x86 platforms, so you may have to get your own (gcc is fairly straightforward to cross-compile). [131045950110] |The same goes for libraries to link against (of course, once you have the compiler, you can recompile them from source). [131045950120] |As an example, Ubuntu 10.04 on x86 comes with a “multilib” version of gcc and an amd64 backend, plus a small set of 64-bit development packages (libc6-dev-amd64 and depending and dependent packages). [131045960010] |What killed Beagle? [131045960020] |Beagle was all the rage some years ago, and then it just died... silently. [131045960030] |Anyone knows why? [131045970010] |Lack of time and support by Novell. [131045970020] |From a thread in their mailing list: [131045970030] |A couple people mentioned whether Novell or Canonical (Ubuntu) would fund Beagle development. [131045970040] |I used to work at Novell, and I had the great fortune of working on Beagle pretty much from the start. [131045970050] |For a couple of years there they paid two full time developers to work on the project: Jon Trowbridge and myself. [131045970060] |When Jon left the company, it was just me -- although there was occasional part-time help, like Dan Winship's excellent work on the search UI. [131045970070] |Since I left Novell nearly two years ago, there has been none. [131045970080] |I think it's safe to say that Novell no longer has any dedication to the project. [131045970090] |I don't mean that as a dig -- having worked on Ximian and SUSE distributions you have to make strategic and tactical decisions where to put your resources, since you can't hack full time on everything. [131045970100] |It appears clear that desktop search hasn't panned out as they thought and that experimental projects like Dashboard, Association Browser, etc. aren't feasible. [131045970110] |As for Canonical and Ubuntu, a number of releases ago that community decided to go with Tracker instead of Beagle, I believe in part due to a major backlash against Mono following the Microsoft/Novell patent agreement. [131045970120] |Although I think Beagle is still for the moment ahead of Tracker in terms of core user functionality, Tracker has a vibrant development community backed by open source companies whereas Beagle's is completely stagnant and bordering on nonexistent. [131045970130] |If I were an impartial party trying to decide in which to invest development resources, Beagle is simply a tougher case to make. [131045970140] |Read the thread here [131045980010] |Fake serial number of USB device [131045980020] |I have a mobile phone connected to my PC via USB. [131045980030] |When viewing the device info using [131045980040] |the product and vendor id's show up fine, but there is no ATTR{serial}. [131045980050] |An application I'm using (Android adb) needs the device to report a serial number to work properly. [131045980060] |Is there any way I can fake the serial number of the device, for example by using a udev rule? [131045990010] |Probably it's not serial but FTDI, so you can try this way: [131045990020] |1) Get the serial [131045990030] |2) Create the rule and substitute the XXXXXXXX with the serial you found or a FAKE serial [131045990040] |3) Reload the rules [131045990050] |Hope it helps... [131045990060] |In the case try to contact the author of this article. [131046000010] |Configuring the display properties on openSuse (Gnome) running as VirtualBox VM [131046000020] |I just created a VM using Suse Studio and I built just a simple openSUSE 11.3 VM based on the gnome template. [131046000030] |I have not added any other software (except for Firefox and the Kernel modules, to be able to add VirtualBox Guest Additions, but using Yast). [131046000040] |I am trying to use the gnome display program to change my resolution, and I am getting the following message: "Display configuration could not be run" - "Failed to execute child process "gnome-display-properties" (No such file or directory)". [131046000050] |Of course I tried to lookup gnome-display in the software repository, but I had no luck there. [131046000060] |Anyone has run into the same issue? [131046010010] |The question is whether or not you actually have the necessary files installed on your VM. gnome-display-properties seems to belong to the gnome-control-center package for OpenSuse. [131046010020] |You can open the Install Software program in OpenSuse and look to see if this package is installed, or you can do a search using zypper search gnome-control-center. [131046010030] |You will need to be the super user to install it, if it is not already installed. [131046020010] |How do you highlight ops' messages in Irssi? [131046020020] |I'm watching a large IRC channel with a lot of noise and precious few ops. [131046020030] |How can I have all messages from ops highlighted? [131046030010] |If there is only few people who you want to highlight, you can just add multiple hilights. [131046030020] |For help with hilight, see [131046030030] |If that's not practical, trigger.pl can help you. [131046040010] |Program that passes STDIN to STDOUT with color codes stripped? [131046040020] |I have a command that produces output in color, and I would like to pipe it into a file with the color codes stripped out. [131046040030] |Is there a command that works like cat except that it strips color codes? [131046040040] |I plan to do something like this: [131046050010] |You'd think there'd be a utility for that, but I couldn't find it. [131046050020] |However, this Perl one-liner should do the trick: [131046050030] |Example: [131046050040] |Or, if you want a script you can save as stripcolorcodes: [131046050050] |If you want to strip only color codes, and leave any other ANSI codes (like cursor movement) alone, use [131046050060] |instead of the substitution I used above (which removes all ANSI escape codes). [131046060010] |If you can install the Term::ANSIColor module, this perl script works: [131046070010] |

    Remove color codes (special characters) with sed

    [131046070020] |Or [131046070030] |

    Strip ANSI escape sequences in Python

    [131046070040] |Install colorama python package (pip install colorama). [131046070050] |Put into stripcolorcodes: [131046070060] |Run chmod +x stripcolorcodes. [131046080010] |Download Manager for my Linux. [131046080020] |I need some good download manager for my Linux like IDM(on windows), I want it can install a plugin on browser too like IDM that you can download movies from youtube or other site easily. and make as many as connection possible. [131046090010] |I'd suggest aria2 (in the repositories) with the FlashGot plugin for Firefox. [131046100010] |I find myself using DownThemAll (was "downthemall") for my downloads. [131046100020] |It's a Firefox plugin and thus available everywhere (a very important reason why I chose it). [131046100030] |You can [131046100040] |
  • download all links / media in a page
  • [131046100050] |
  • download each item with up to 10 connections
  • [131046100060] |
  • and yes, you can download Facebook videos
  • [131046110010] |I'd suggest Fatrat - http://fatrat.dolezel.info - the best download manager I've come across myself. [131046110020] |The Jabber remote control feature is what I love the most in the software. [131046110030] |I'd urge everyone to check it out. [131046120010] |Why did Debian create the DFSG? [131046120020] |I'm curious why Debian created the DFSG when the FSD already existed. [131046120030] |There are some differences (conflicts) of course, but was that the main motivation? [131046130010] |The early definition of free software (set forth in the GNU’s Bullentin Volume 1, Number 1 in 1986) was unknown to the authors of the Debian Free Software Guidelines in 1997. [131046130020] |This early definition was much weaker than the DFSG and it seems that The Free Software Definition had not yet been published as such. [131046130030] |Here is an excerpt from a comment by Bruce Perens (the primary author of DFSG) (found as a reference in Wikipedia’s Debian Free Software Guidelines article): [131046130040] |Richard wrote a statement of the Four Freedoms in an early edition of the GNUs Bulletin, which was mostly distributed in paper form on the MIT campus and environs. [131046130050] |He did not further promote them until a long time later. [131046130060] |So, when I had to write license guidelines for Debian, the Four Freedoms document was unknown. … [131046130070] |Much later, FSF published its statement of the Four Freedoms on its web site as an alternative to the Open Source Definition. [131046130080] |In fact, the 1986 GNU’s Bulletin definition was not the modern “Four Freedoms”, but a simplified version that focuses on the abilities to redistribute and change programs (but not specifically the ability to redistribute changed programs!). [131046130090] |This early definition is close to the “modern” freedoms two and one. [131046130100] |The DFSG were first published in the July 1997 announcement of the Debian “Social Contract”. [131046130110] |It explicitly mentions the ability to redistribute modified source code (or at least “original plus patches”). [131046130120] |This was not explicit in the early GNU’s Bulletin definition, though it is related to “modern” freedom three. [131046130130] |archive.org’s http://www.gnu.org/philosophy/free-sw.html [131046130140] |
  • January 1998 - first archived version; (unnumbered) freedoms one through three
  • [131046130150] |
  • April 1999 - added freedom zero
  • [131046130160] |
  • May 2001 - first version called “The Free Software Definition”
  • [131046140010] |Politics, for free as in "abundance of" by the free as in with "lots of time to waste" ! [131046140020] |Most of these guys were anyway leeching off universities and the infrastructure ! [131046150010] |What is a "loop device" when mounting? [131046150020] |I am doing a mounting of an iso file and looking at this tutorial. [131046150030] |They use the command: [131046150040] |I'm trying to understand the use of -o loop. [131046150050] |So I have two questions: [131046150060] |When I look at the long man page for mount, it takes time to find that -o option. [131046150070] |If I do man mount | grep "-o" I get and error, and when I look in the file I do not find info that "loop" is a command text for option -o. [131046150080] |Where is that documented? [131046150090] |Also, what is the "loop device" concept for mounting? [131046150100] |Even a good link to an explanation would be appreciated. [131046160010] |loop device is a pseudo ("fake") device (actually just a file) that acts as a block-based device. [131046160020] |You want to mount a file (disk1.iso) that will act as entire filesystem, so you use loop. [131046160030] |The -o comes from the -options. [131046160040] |And the last thing, if you want to search for "-o" you need to escape the '-'. [131046160050] |Try: [131046170010] |Traditionally, UNIX systems have had various types of nodes in their filesystems: [131046170020] |
  • directory
  • [131046170030] |
  • file
  • [131046170040] |
  • symlink
  • [131046170050] |
  • block device
  • [131046170060] |
  • character device
  • [131046170070] |
  • FIFO
  • [131046170080] |
  • UNIX domain socket
  • [131046170090] |While there are now exceptions, generally block devices containing filesystems are mounted on directories. [131046170100] |Since you want to mount a file, you must first create a loop block device that is backed by the file. [131046170110] |This can be done using losetup, but mount -o loop is a shortcut that handles that behind the scenes. [131046180010] |Nano syntax highlighting for C# and/or ASP.Net [131046180020] |Has anyone got (or can point in the direction of) a nanorc file that contains syntax highlighting for C# and/or ASP.Net? [131046180030] |Thanks [131046180040] |Rob [131046190010] |Duplicated here: http://ubuntu.stackexchange.com/questions/2163/nano-syntax-highlighting-for-c-and-or-asp-net [131046200010] |Using the Java example from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting, you can try to add something like the following into your ~/.nanorc: [131046210010] |Diagnosing xmodmap errors [131046210020] |I'm getting this error when trying to use xmodmap to get rid of caps lock: [131046210030] |I'm running xfce. [131046210040] |This problem did not occur before I added the Keyboard Layouts applet to a panel; before doing that, I was able to run my xmodmap script to swap Esc and CapsLock: [131046210050] |It may be relevant that I chose alt-capslock as the keyboard switch combo in the Keyboard Layouts preferences. [131046210060] |I've had a similar problem before, on a different machine, running openbox. [131046210070] |On that machine, this problem started when I upgraded to Lucid. [131046210080] |I reported a bug in xorg. [131046210090] |However, it remains unclear whether it's really a problem with xorg, or if I'm just doing something wrong with my configuration. [131046210100] |Have other people experienced this problem? [131046210110] |Can someone shed some light on what's going on here? [131046210120] |It seems there are quite a few layers involved, and I don't understand any of them particularly well, so any information would be helpful. [131046210130] |update [131046210140] |I've discovered that the problem is specifically triggered by adding the Canada layout variant "Multilingual" (ca-multix). [131046210150] |If I instead add the variant "Multilingual (first part)" (ca-multi), the problem does not occur. [131046210160] |I think this will probably end up being a usable workaround, but I don't yet know what the difference between these variants is. [131046210170] |I've filed a freedesktop issue, and am commenting on a related ubuntu issue. [131046220010] |Modern Xorg uses the XKB extension for supporting keyboard layouts. [131046220020] |Xmodmap is emulated through a compatibility layer, but it has quirks. [131046220030] |You can disable XKB entirely and Xorg will revert to using the old Xmodmap keyboard mappings. [131046220040] |I think it's setting the option XkbDisable to true in xorg.conf, but you probably want to do it the XKB method. [131046220050] |There are many configurable options located in /usr/share/X11/xkb/rules/xorg.xml and I think you want caps:swapescape which swaps Caps Lock and Escape. [131046220060] |Try setxkbmap -option caps:swapescape [131046230010] |NIS and autofs error [131046230020] |I am trying to share the home directory of a NIS user using NFS and autofs. [131046230030] |During testing, I get the following error message: [131046230040] |How can I troubleshoot the above error? [131046240010] |Use getent passwd nis1 (where nis1 is the user in your example) to get the passwd entry the NFS client is seeing for 'nis1'. getent respects nsswitch.conf, which supplies ordering for nameservice lookups across multiple services (files, nis, ldap, etc...). [131046240020] |After you determine the UID in that response, compare it to the UID who owns the home directory, /home/guest/nis1 by running: stat /home/guest/nis1. [131046240030] |Your problem may be that the permissions on the home directory are restrictive such that there is no execute bit for other (o+x) and the UID that owns the directory is not actually the UID that the NFS client can resolve for that username. [131046240040] |It would be helpful if you provided the output of these commands, even if this answer is not correct so that we can continue to troubleshoot. [131046250010] |How to do a recursive download with gwget (wget frontend)? [131046250020] |I usually run wget with the -np -r options, but it doesn't include a preview of the queue size, so I'm checking out the wget frontend gwget (on debian). [131046250030] |I can't get the recursive option to work; does anybody know how to do it? [131046260010] |EDIT Unfortunately, my initial test was a bit hasty. [131046260020] |It seems that Gwget has a bug: [131046260030] |https://bugzilla.gnome.org/show_bug.cgi?id=628514 [131046260040] |https://bugs.launchpad.net/gwget/+bug/626607 [131046260050] |The following directions should work but doesn't seem to: [131046260060] |
  • Open Gwget
  • [131046260070] |
  • Press the "New" icon or select Archive -> New from the menu.
  • [131046260080] |
  • In the URL box put the URL of the site that you want to recursively download.
  • [131046260090] |
  • Press OK.
  • [131046260100] |
  • A Dialog Box should appear with various options for recursive download.
  • [131046260110] |
  • Choose one that makes sense for you.
  • [131046270010] |Copy text from one terminal into another [131046270020] |I am logged into ssh to a university account from my home computer. [131046270030] |Then I find a file that I want to copy onto my local system. [131046270040] |So I open a new shell terminal and am about to use scp to copy that file onto my system. [131046270050] |But the path to the file on the system I am ssh'ed into is long so I select it with the mouse and then paste it with the mouse into the other locally connected terminal. [131046270060] |What I would like to do is something along the lines of: feed the output of pwd into a variable that is temporary and visible to all terminals even though I made it under the ssh'ed terminal, or some other way that I can't think of. [131046280010] |If you have ssh server running on your home machine, you may do the reverse scp: [131046280020] |[student@university ~/rather/long/path/to/interesting/file]$ scp ./secrect.txt user@myhomesystem.net:~ [131046290010] |The way to do that is to use an ordinary file or a named pipe. [131046290020] |Why not do the scp in the original terminal in the first place (even in the background)? [131046290030] |If the host system uses proc, in the second terminal do cd -P /proc/PID/cwd then do your scp from . (where PID is that of the shell which is in the cwd/pwd that you are interested in). [131046300010] |If you have X forwarding active (ssh -X, ForwardX11 in ~/.ssh/config, or any other method), you can manipulate the X selection from the shell: [131046300020] |Depending on your terminal emulator, you may want to set the CLIPBOARD (xsel -bi) instead of the PRIMARY selection (xsel -p). [131046300030] |You can also use the SECONDARY selection (xsel -si). [131046300040] |You can use the middle mouse button to paste the PRIMARY selection, or (in some terminals) the CLIPBOARD with Ctrl+V, or you can use xsel (or xsel -s or xsel -b) in the shell on the other side. [131046300050] |There are other possible workflows, involving for example a reverse ssh connection, ~ escapes, or zssh. [131046300060] |See SSH easily copy file to local system, Download a file over an active SSH session. [131046300070] |You could also mount the remote filesystem over sshfs. [131046310010] |If your terminal supports the zmodem protocol (KDE's Konsole does), and the remote system has the lrzsz package installed, you can trigger a direct transfer via the terminal using: [131046310020] |Konsole prompts you were to save the file and that's that. [131046310030] |GNU screen apparently has zmodem support too. [131046320010] |My Fedora 13 crashes several times a day. [131046320020] |Reported bugs through bugzilla, anything else I can do? [131046320030] |I'm actually a bit disappointed as a friend of mine is a network admin and he told me they have a linux server that has not been rebooted for a few years now, so why is mine crashing so often? [131046320040] |I'm a big fun of Debian and Fedora, but Fedora latest release keeps annoying me. [131046320050] |Is the only solution to switch to something more stable, like Debian Lenny or hopefully Fedora 11 or 12? [131046320060] |UPDATE: [131046320070] |here is the error message: [131046320080] |I'm still not convinced that the crashes are caused by faulty cdrom drive. [131046320090] |Have added my vote on the launchpad bug issue hoping someone is going to fix it soon. [131046320100] |UPDATE2: Memory has been tested thoroughly and no errors were detected during the test [131046330010] |A Linux crash is almost invariably caused by a hardware driver. [131046330020] |I would start by looking at the graphics card driver. [131046330030] |Find an alternative driver that can support your hardware (for instance, if you have an Nvidia graphics chipset, find out if you have the proprietary or open-source version of the driver installed and install the other one then see if the problem persists. [131046330040] |After you determine which driver is causing the problem, you should submit a bug report. [131046330050] |Then you can make a decision to either switch to an alternative driver permanently, try to install the latest version of the same driver manually, or to wait for Fedora to update the driver in the repositories. [131046340010] |Command to get CPU, hard drive space, etc. [131046340020] |What command(s) can show me the hardware information of a computer? [131046350010] |Bandwidth control in linux [131046350020] |How do I control both the inbound and outbound bandwidth in a RHEL 5 router? [131046360010] |tc (traffic control), from the iproute2 suite. [131046360020] |See the Linux Advanced Routing &Traffic Control HOWTO – notably, the queuing section – and netem for help. [131046370010] |Storing output of command in shell variable [131046370020] |I have an operation using cut that I would like to assign result to a variable [131046370030] |I get the error: [131046370040] |ztemp.xml is not a command [131046370050] |The value of var4 never gets assigned; I'm trying to assign it the output of: [131046370060] |How can I do that? [131046380010] |You'll want to modify your assignment to read: [131046390010] |Ksh, Zsh and Bash all offer another, perhaps clearer syntax: [131046390020] |var4=$(echo ztemp.xml | cut -f1 -d '.') [131046390030] |The backticks (a.k.a. "grave accent") is unreadable in some fonts. [131046390040] |The $(blahblah) syntax is a lot more obvious at least. [131046390050] |Note that you can pipe values int a "read" command in some shells: [131046390060] |ls -1 *.* | cut -f1 -d'.' | while read VAR4; do echo $VAR4; done [131046410010] |Linux distribution that offers a good KDE experience [131046410020] |I have been a Gnome user for years (8 years), and I'm looking for recommendations and comparisons of Linux distributions that offers good KDE integration/experience. [131046410030] |Some details to mention: [131046410040] |
  • the environments speed,
  • [131046410050] |
  • selection of default apps
  • [131046410060] |
  • whether it's a modified KDE
  • [131046410070] |
  • what makes the distro special regarding KDE and KDE/QT apps?
  • [131046410080] |
  • Employed or active KDE developers who are also distro developers
  • [131046410090] |
  • integration with gtk apps
  • [131046410100] |
  • how friendly is it for a novice user (e.g. all cli, do it yourself, or pretty much set up to just work)
  • [131046410110] |Thanks [131046420010] |The two mainstream ones with a lot of software would be [131046420020] |
  • fedora
  • [131046420030] |
  • kUbuntu
  • [131046430010] |I'm liking OpenSUSE 11.3. [131046430020] |It seems to have quite a good selection of software available in the repositories, and it seems plenty fast to me (but then, I'm running it on fast hardware, so YMMV). [131046440010] |I've primarily used OpenSuSE, Gentoo, and Arch, and all of them have worked quite well with KDE. [131046440020] |However, aside from the fact that Gentoo and Arch are rather more hardcore than OpenSuSE, I believe that both of them use a vanilla version of KDE whereas OpenSuSE adds more of their own stuff, including a really nice KPart for viewing system information (which probably should be added to KDE proper) and increased integration for some non-KDE programs such as Firefox. [131046440030] |So, whether OpenSuSE is better than the others is probably a combination of how newbie-friendly a distro you want and whether or not you want a vanilla version of KDE. [131046440040] |The one thing that I can say beyond that is that I frequently hear people say not to use Kubuntu and that it's a poor KDE distro with relatively poor stability. [131046440050] |I played around with it a little a while back but not long enough to really be able to comment on that (I really didn't like its package management and found multilib to be much more of a pain than with OpenSuSE, though others may disagree). [131046440060] |It is about the main consistent thing that I've heard about KDE distros though: many folks say not to use Kubuntu. [131046440070] |Every distro that I've really used though has been fine for KDE. [131046440080] |For the most part, I would think that it's more of a general issue of how a distro works than what it does with KDE - unless you're talking about a gnome-centric distro instead of a more DE-agnostic one, in which case it probably matters more, since KDE wouldn't get as much attention and might be treated as a second-class citizen. [131046450010] |No one's suggested Kubuntu? [131046450020] |Kubuntu is by far the best KDE distro. [131046450030] |Gnome apps use the correct themes out of the box. [131046450040] |I use Kubuntu and have nothing but good things to say. [131046460010] |I've used a lot of distributions and here's what I know. [131046460020] |
  • OpenSuse [131046460030] |
  • Suse was primarily KDE before it bought novell a long term
  • [131046460040] |
  • used some KDE 4 code before KDE was released - kickoff and games
  • [131046460050] |
  • has been known to modify kde
  • [131046460060] |
  • installs and configures things for gtk for you
  • [131046460070] |
  • might contribute upstream / have actual kde devs - not 100%
  • [131046460080] |
  • qt driven apps
  • [131046460090] |
  • Mandriva [131046460100] |
  • I've never used it (not since it was mandrake)
  • [131046460110] |
  • I know they assigned 2 devs to work on k3b 2 - lots of bonus points
  • [131046460120] |
  • Chakra [131046460130] |
  • A distribution based on Arch Linux which is KDE specific
  • [131046460140] |
  • some custom kde/qt apps
  • [131046460150] |
  • shaman - qt package manager
  • [131046460160] |
  • Everyone else - Kubuntu, Fedora, Arch, Gentoo (note: kubuntu, fedora might not be accurate) [131046460170] |
  • AFAIK vanilla KDE installs
  • [131046460180] |
  • User Friendly's will do the gtk theming for you, the others you do it yourself
  • [131046460190] |
  • they are unlikely to have any kde/qt (adept excluded) apps that aren't available everywhere
  • [131046460200] |To be honest I might be giving everyone else an unfair accounting... [131046460210] |I haven't used kubuntu, or fedora much at all. [131046460220] |I use Arch Linux KDE myself, which follows upstream. [131046470010] |If your into rolling distros there's the new OpenSuSE-Tumbleweed -- OpenSuSE but rolling :-). [131046470020] |Other good KDE4 rolling disros include: Aptosid, PCLinuxOS, Yoper, Chakra, Sabayon. [131046470030] |Toorox is not 100% rolling but is based on Gentoo. [131046470040] |I think all of these are quite newbie friendly and have a big focus on KDE (GUI-centric, "just work", etc). [131046470050] |BTW Mageia (community fork of Mandriva) are in talks on whether to go rolling or not. [131046470060] |If you want DEB, a friend of mine has only good things to say about Aptosid (fka Sidux). [131046470070] |Chakra (based on Arch) is currently still in alpha but has a modular &modifiable KDE allowing you to customize it, optimize it, and remove unwanted bloat. [131046470080] |PCLinuxOS can need a reinstall when they re-fork the Mandriva base every year or so; though with Mandriva's troubles they may switch to Mageia or Unity Linux as their base. [131046470090] |They might even go independent but I don't know if they have the devs for that. [131046470100] |I've used Linux Mint-Gnome for the last year (and previously Ubuntu) and I'm about to switch to a rolling KDE4 distro with E17 as my 2nd DE, so I'm in pretty much the same boat as you and would definitely still call my self a "newbie". [131046470110] |BTW I really recommend going rolling: latest software and no reinstalls! [131046470120] |I've generally only heard/read good things by those who've tried rolling (though there are always exceptions) and most seem unwilling to switch to any distro that isn't once they've got a taste. [131046480010] |Pardus 2011, Kde is primary desktop environment. it is fast, elegant, doesn't spend too much memory, stable, fully integrated with gtk apps(thanks to the new gtk theme). [131046480020] |It is really user-friendly( Since it's primary customers are government institutes.) [131046490010] |Which GUI diff viewer would you recommend? [131046490020] |I've hardly ever used anything other than Meld. [131046490030] |Can you recommend anything else? [131046490040] |It would be extra nice if you give a reason for your recommendation (as a Comment). [131046490050] |[note] I want an alternative because Meld has recently lost the feature to copy entire contents from one file to another. [131046490060] |I'm referring to the functionality available via the Copy To Left/Right right-click menu item. [131046490070] |[update] I just checked, and the problem was introduced by 1.3.2. [131046490080] |1.3.1 works well, and the latest I've checked is 1.4.0, and it doesn't work. [131046500010] |There are a number of tools that are usable: [131046500020] |
  • meld
  • [131046500030] |
  • kompare
  • [131046500040] |
  • kdiff3
  • [131046500050] |
  • Diffuse
  • [131046500060] |But they do approximately the same, so it is hard to give any general advice here. [131046510010] |Emacs is a pretty good diff viewer (start with the commands in the Tools / Compare and Tools / Merge menus). [131046510020] |It has all the basic features (highlight the differences between two files, jump between differing blocks) and most common intermediate features (compare portions of files, compare revisions grabbed from version control, compare directory trees, use a common ancestor as a reference point, produce a merged version). [131046510030] |It doesn't have very fancy ignore capabilities, however. [131046510040] |What Emacs has over most other diff viewers includes better search capabilities, syntax highlighting, Lisp extensibility. [131046510050] |Oh, and an integrated editor. [131046520010] |I have used tkdiff (http://sourceforge.net/projects/tkdiff/) for years. [131046520020] |It does what I want as far as displaying differences between files, and it's able to write out a "merge" file with any ol' selection of left and right file difference selections. [131046520030] |Drawback: it's written in Tcl/Tk, and not all systems have that. [131046530010] |There is also vimdiff (with its GUI version gvimdiff). [131046540010] |A comparison of various diff utils. [131046540020] |Old but still valid. [131046540030] |http://amjith.blogspot.com/2007/07/visual-diff-tools-in-linux.html [131046550010] |I think xxdiff does what you want. [131046560010] |Yum update error: "can't start new thread" [131046560020] |I found several posts on this, but none of them work. [131046560030] |When I do yum update, I get the error thread.error: can't start new thread; full stacktrace follows: [131046560040] |I've already tried yum clean, that didn't help. [131046560050] |My OS is Centos 5.5. [131046570010] |You could try to disable fastestmirror plugin and check if after that change yum will be working properly. [131046570020] |To disable it do: edit /etc/yum/pluginconf.d/fastestmirror.conf and change enabled = 1 to 0 or just remove plugin package: yum remove yum-fastestmirror or yum install yum-plugin-fastestmirror. [131046580010] |What is [jbd2/dm-3-8] and [kdmflush]? And why are they constantly on iotop? [131046580020] |The title says it all. [131046580030] |Using Fedora for a small Samba and development server. [131046590010] |They're kernel threads. [131046590020] |[jbd2/%s] are used by JBD2 (the journal manager for ext4) to periodically flush journal commits and other changes to disk. [131046590030] |[kdmflush] is used by Device Mapper to process deferred work that it has queued up from other contexts where doing immediately so would be problematic. [131046600010] |Calculate the date from 1125 days ago on non-GNU systems? [131046600020] |On the Unix Bash commandline, I want to calculate the date from 1125 days ago using the base operating system (e.g. No Perl or Python). [131046600030] |On systems running GNU Date, I can do something like this: [131046600040] |FreeBSD or MacOSX systems don't ship with GNU Date, and don't support values like "X days ago". [131046600050] |I can calculate a date from a few days ago on a Mac or FreeBSD system, but this is limited to a few days: [131046600060] |Can I calculate old dates on non-GNU systems without delving into tools like Perl or Python? [131046600070] |Or must I use a more powerful scripting language? [131046610010] |Well, you can do something sneaky like: [131046610020] |Tested on OpenBSD (definitely non gnu based date), and seems to work. [131046610030] |Breaking it down in steps: [131046610040] |
  • get the current unixtime (seconds since beginning of unix epoch):
  • [131046610050] |
  • get the number of seconds in 1125 days
  • [131046610060] |
  • subtract one from the other (1291679934 - 97200000) = 1194478815
  • [131046610070] |
  • use the new unixtime (1194478815) to print a pretty date [131046610080] |
  • As an alternative, on solaris you can do this to print the date*: [131046610090] |* referenced from http://www.sun.com/bigadmin/shellme/ [131046610100] |Also, an alternative on Solaris for getting the current timestamp from the date command** is: [131046610110] |** referenced from http://www.commandlinefu.com/commands/view/7647/unix-timestamp-solaris [131046620010] |Easy/simple input method package that works with minimal window manager? [131046620020] |Hello, I am trying out minimalist window managers such as, but not limited to, Xmonad, ScrotWM, ratpoison, etc. [131046620030] |Since I occasionally need to enter Traditional Chinese characters, how do I install an input manager that lets me switch between input methods easily, such as through a hotkey combo? [131046620040] |Any instructions would be appreciated. [131046630010] |As Michael suggests, the window manager is not responsible for managing the input method. [131046630020] |First you will need to choose an input method, of which IBus, SCIM and uim appear to be the most popular. [131046630030] |Next, you need to make sure it is started when X is launched. [131046630040] |You've mentioned you are using a lightweight WM, therefore you'll likely want to add it to an X init file, such as ~/.xinitrc: [131046630050] |Depending on the input method you choose, the method to switch languages will differ. [131046630060] |Typically, you'll need to export LANG, such as [131046630070] |... but sometimes right clicking on an input field and choosing "Input Methods" may suffice. [131046640010] |Is it possible to compile a code from within target? [131046640020] |I have a target in which i have the toolchain installed with the RFS image. [131046640030] |If i have the kernel source code in some PC in the network which i can mount via NFS, is it possible to compile the source code from the target? [131046640040] |If yes, could you explain how or what different techniques are available for it. [131046640050] |EDIT : The Scenario I wish to Execute - When my board boots up it will mount my root file system(RFS) which has the toolchain and the binutils present within it. [131046640060] |After the RFS has been mounted successfully, it will connect to the NFS location where my kernel source is present and using the binutils in my RFS, it will try to compile that source code. [131046640070] |Once the compilation is successful the new executable (for eg. vmlinux.bin) will be flashed to the ROM and board will be restarted with the new image. [131046640080] |I just want to know if this scenario can be realized. [131046640090] |If Yes, how can it be done in a more technical way? [131046650010] |Because you have the binutils and compiler on the target, and because you're able to mount the NFS volume, this should be as simple as mounting the NFS volume, navigating to the directory, and running make. [131046650020] |It's not a cross-compile; it's your run-of-the-mill native compile. [131046650030] |Give it a try and if you get stuck, you'll be able to ask a more specific question. [131046660010] |Searching for a command line tagging tool for mp3 and ogg that supports pictures [131046660020] |I am searching a command-line tagging tool that supports ogg- and mp3-tagging and allows to add a picture to the tags. [131046660030] |Currently I use lltag but that does not support pictures. dagger is the tool I use before but it is lacking picture support as well. [131046670010] |For MP3, try eyeD3, found in this SO answer. [131046670020] |For Ogg, there's vorbiscomment. [131046670030] |It doesn't support loading image files out of the box, but a cover art tag in Vorbis is just an image file encoded in base64, stored in the COVERART tag and its mimetype in COVERARTMIME - something like [131046680010] |Is there a way to store Firefox passwords in a local encrypted database in Linux? [131046680020] |I want Firefox to "remember" my passwords so I don't have to type them in; unfortunately, the built-in password manager stores them in plain text, which is too high a security risk. [131046680030] |I'd like to find a secure way for Firefox to do basically the same thing. [131046680040] |Though I've heard good things about LastPass and other such services, I'm not too comfortable entrusting them with my data; any of those companies could suddenly change their terms, start charging, or just go under. [131046680050] |I love the idea of KeeFox, but alas, it's not available for Linux. [131046680060] |Any ideas? [131046690010] |I don't know why keefox isn't running in linux, i havent looked at it yet. [131046690020] |I'm securing my important files with encfs and fuse, because it doesn't need a block or loop device and encrypts file by file. http://www.arg0.net/encfs [131046700010] |Depending what Desktop Environment you're using you could integrate Firefox with default password storage mechanism for this environment: [131046700020] |
  • KDE - KWallet
  • [131046700030] |
  • GNOME - GNOMEKeyring
  • [131046700040] |If you want integrate Firefox with KWallet you could use KDE Wallet password integration extension for Firefox. [131046700050] |If you are GNOME user there is Gnome-keyring password integration extension (you need to modify it to install with newest Firefox version - instructions are in comments at the extension site). [131046710010] |I believe you are mistaken. [131046710020] |When using the Password manager, Firefox does not store your passwords in clear text: [131046710030] |Firefox stores your password data in two files: key3.db (Master Password / Encryption key) and a "signons" file (encrypted names and passwords). [131046710040] |You can back up your passwords by making a copy of both "Key3.db" and the "signons" file for your Firefox version. [131046710050] |Firefox 2 uses signons2.txt, Firefox 3.0.x uses signons3.txt, and Firefox 3.5 and 3.6, including current Beta and nightly builds, use signons.sqlite. [131046710060] |[4] See Profile folder - Firefox and Profile backup for additional information. [131046710070] |If you are concerned, you could enable encryption of your entire home directory as an added protection. [131046720010] |You can encrypt and protect your Firefox passwords with a master password: [131046720020] |Preferences → Security → Passwords [131046720030] |Then check: [131046720040] |☑ Use a master password [131046720050] |Then set a master password. [131046730010] |Motd doesn't show up [131046730020] |I'd like to set a custom motd ("message of the day") on my machine (currently Mac OS X 10.6.5 using Bash with Terminal.app). [131046730030] |In /etc/ there was no motd file so I created one with some sample text. [131046730040] |But the message doesn't show up when I restart Terminal. [131046730050] |I've tried to logout and then login but it still doesn't seem to kick in. [131046730060] |If I do ls -l /etc/motd I get (if it's any clue): [131046730070] |-rw-r--r-- 1 root wheel 30 7 Dec 11:58 /etc/motd [131046730080] |Am I missing something? [131046740010] |Depending on your distribution, the system may create a new motd automatically on each startup. [131046740020] |Ubuntu seems to be doing that at least. [131046740030] |Cheers [131046750010] |Seems I worked it out. [131046750020] |My motd not showing up must have been due to the fact that I had touched/added an empty file in my home directory called .hushlogin, which actually supresses any login messages (seems it doesn't just kill motd but any other login messages as well, as I understand it). [131046750030] |At any rate, my problem is somehow solved and chances are I forgot to delete that .hushlogin file. [131046760010] |kernel compilation error [131046760020] |Possible Duplicate: Kernel can't find /dev/sda file during boot [131046760030] |I got the following errors after new kernel compilation (linux-2.6.25.tar.bz2) [131046760040] |mount: could not find filesystem '/dev/root' setuproot: moving /dev failed: no such file or directory setuproot: error mounting /proc: No such file or directory setuproot: error mounting /sys: No such file or directory switchroot: mount failed: No such file or directory kernel panic - not syncing: Attempted to kill init! [131046760050] |How to troubleshoot? [131046770010] |What is the significance of Linux's Disk caching Mechanisms? [131046770020] |I would like to know the exact meaning and significance of Linux's Disk caching Mechanisms. [131046770030] |In one of the articles I have read, page cache and dentry cache are two forms of them. [131046770040] |Could somebody explain to me these concepts? [131046780010] |Page cache, sometimes referred to as disk cache, is a transparent RAM buffer for access to and from on-disk files. [131046780020] |In general any memory not allocated to running applications is used for page cache space. /proc/meminfo contains information about, among other things, page cache. [131046780030] |Executing cat /proc/meminfo | grep -iE "^(cached|dirty)" will display the size of the page cache and the volume of data marked "dirty", meaning file data that has been marked for writing to disk. [131046780040] |Dentry cache serves to improve performance access to the file system by storing entries representing the directory levels which comprise the representation of a path. Also contained in the dentry cache is an inode representing the object. [131046780050] |Dentry cache resides opposite, or along side depending on perspective, the inode cache. [131046780060] |The inode cache is comprised of two lists containing used and unused inodes respectively as well as a hash table of inodes in use. [131046780070] |Every entry in the dentry cache contains an entry in the inode cache. [131046790010] |Is Ramdisk and initrd the same? [131046790020] |While reading through the kernel documentation on ramdisk in ramfs-rootfs-initramfs.txt i was having a doubt like the ramdisk explained there is same as the initrd features described in the post at the-difference-between-initrd-and-initramfs. [131046790030] |Could someone clarify me on this?? [131046790040] |And if it is the same, i read that there are many disadvantages for it, but still in my fedora PC, i see [131046790050] |initrd-2.6.29.4-167.fc11.i686.PAE.img [131046790060] |in my boot folder. [131046790070] |Is it different from the initrd mentioned above?? [131046790080] |UPDATE_EDIT : In of the articles I even saw a command like # update-initramfs -u all update-initramfs: Generating /boot/initrd.img-2.6.18-5-amd64 [131046790090] |So how is this initramfs linked to initrd.img ? [131046800010] |A ramdisk is a set of blocks that gets copied to an allocated chunk of memory, then treated as a block device. [131046800020] |A normal filesystem is created on the ramdisk. [131046800030] |The initrd (initial ramdisk) is a ramdisk that is mounted during bootup. [131046800040] |The initramfs is something different. [131046800050] |It's a cpio archive of files that is loaded during bootup. [131046800060] |The kernel loads the contents into a virtual filesystem it calls rootfs. [131046800070] |Unlike a ramdisk, deleting files directly frees memory, and there's no extra filesystem and block layer involved. [131046800080] |Both methods result in files being available to the kernel at boot time before any devices have been loaded, and so in practice you can achieve similar results with both. [131046800090] |Older systems use initrd (it was created before initramfs) but modern systems should all be using initramfs. [131046800100] |You may still see the word initrd in reference to something that is really an initramfs; it's just naming for compatibility's sake. [131046810010] |how to recover a file from yesterday which is now missing [131046810020] |Hi, [131046810030] |I am running ubuntu and last week the system didn't let me alter files as if I had no write permissions. [131046810040] |Then on reboot the system did a check of the system which took some time. [131046810050] |Then everything went normally. [131046810060] |Yesterday I was using matlab. [131046810070] |I created 2 function ".m" files, and matlab crashed from an out of memory exception. [131046810080] |This morning after checking my computer, I see that 1 of the files is missing, non-existant. [131046810090] |What can I do about this? [131046810100] |I heard of a folder called yesterday but I can't find it. [131046810110] |If there are any other ways this would be great. [131046810120] |Best, [131046820010] |First of all - you can recover file from backup. [131046820020] |Ok. given that you ask your question you don't have backup - but you should. [131046820030] |The second step depends largly on filesystem you are using. [131046820040] |If you are using ext2/3(/4?) you are lucky - there is great chance that there is some tool that will recover file - IF data is on disk. [131046820050] |Please remember to copy data before using any tool. [131046820060] |Unfortunatly IMHO you have hardware problem with your disk which have bad sectors. [131046820070] |You may want to try test disk for bad blocks. [131046820080] |Alternativly you may want to look on tools like Spinrite. [131046820090] |PS. [131046820100] |I haven't heard of yesterday - only trash and lost+found (the second one is accessable only by root and contains found parts of files - you may have luck). [131046820110] |However iI doubt that in yesterday/trash will contain files you are looking for. [131046830010] |How can I chase a program who is rising up my laptop's temperature? [131046830020] |After 40 days of non-upgrading I came back from a trip and I decided to dist-upgrade my Debian Sid box. [131046830030] |Everything went fine but after rebooting I noticed that the temperature was 15°C over its average. [131046830040] |There isn't any process eating more CPU than normal but something is clearly going on. [131046830050] |Seeing my system monitor applet for Processor load, when the machine is idle, I can see little blue peaks from time to time which I don't remember having them, maybe that could be a clue. [131046830060] |Anyway, I cannot see anything strange in my top command output. [131046830070] |So, how can I trace the origin of this heater process? [131046840010] |ptop (top for power consumption) and iotop (top for i/o operations) might be able to help you. [131046850010] |I belive atop allows to monitor even short programs. [131046850020] |Powertop allows to monitor states of processor. [131046850030] |However if the peaks are hardly noticable it is unlikely that it caused this problem. [131046850040] |There are however few possible causes: [131046850050] |
  • Corrected ACPI handling. [131046850060] |For some reasons the temperature in ACPI was read incorrectly and the correct temperature was always 15°C highier (or incorrect). [131046850070] |Does the computer feels warmer
  • [131046850080] |
  • The newer kernel may have worst temperature management (like lacking p4-clockmod etc.) - it may be bug in kernel.
  • [131046850090] |
  • Previously mentioned dust.
  • [131046860010] |Set ls color listings based on regex instead of globbing [131046860020] |Is it possible to set regex patterns for color matching in the LS_COLORS variable? [131046860030] |So instead of just [131046860040] |*.jpg=38;5;220 [131046860050] |Can I do [131046860060] |\.(jpg|gif)=38;5;220 [131046860070] |That's just an example, I'd like to get more complicated than that. [131046860080] |Am I asking too much from this? [131046860090] |Is there another way to do terminal color schemes that I can get fancier? [131046860100] |I'm using zsh btw, so if I can do it there but not bash, that's fine. [131046870010] |That's a feature of the ls utility in GNU coreutils. [131046870020] |It doesn't depend on the shell. [131046870030] |The syntax is not documented (you're supposed to use dircolors and figure it from there), but a quick look at the source shows that the only way to match files by name is to use * followed by a string which must be a suffix for a file name to match. [131046870040] |The string is interpreted literally, except that \ and ^ introduce escape sequences (e.g. \n = ^J = newline). [131046870050] |So you can't match different extensions with the same pattern. [131046870060] |But you can use shell programming constructs to build LS_COLORS: [131046880010] |Why Mac applications never get "closed"? [131046880020] |I'm a Linux/Windows/Mac user. [131046880030] |I like all systems, *nixes more than Windows, but I like all nonethless. [131046880040] |I started using a Mac this year, and a difference between Linux and Windows that I can't understand is: why applications never get closes when I hit the "x" button, since this is the way Linux and Windows behave? [131046880050] |I need to hit cmd+q or quit by the up menu. [131046880060] |I mean, is that only to be different from all of them, or there's a reason for this behavior? [131046880070] |I can't see any advantage. [131046880080] |If I want to close, I want to close. [131046880090] |Period. [131046880100] |Anyone knows the reason for that? [131046890010] |This may be what you're looking for: [131046890020] |http://developer.apple.com/ue/switch/windows.html#macOSXDoesntUseMDI [131046900010] |This is application specific. [131046900020] |For example the System Preferences application does quit when you click on the red button. [131046900030] |However, the majority of programs only close the window (an the documents within) when you try to "close" it. [131046900040] |I guess the idea behind this is to make things faster when you want to use the application again. [131046900050] |If I want to close, I want to close. [131046900060] |Period. [131046900070] |I agree, so I use keyboard shortcuts, Cmd+w for closing the window, and Cmd+q for really quitting. [131046900080] |Most applications have this implemented. [131046900090] |An alternative is to right click on the application icon and choose "Quit", which is much slower. [131046910010] |The window is not the application in MacOS, in MacOS the windows connects to the application. [131046910020] |That is why the application don't exit when you close a window. [131046910030] |On Windows the window is the application, that is why the the application should exit when you hit the exit button. [131046910040] |On Linux the developer decide what architecture he like to use, both ways is possible... [131046920010] |In some sense, it is a UI convention with history that goes back all the way to 1984. [131046920020] |Since Windows and X11 both post date the original Mac GUI, one might say that Windows does it the Windows way "just to be different" rather than suggesting that the Mac is the oddball. [131046920030] |Back in the earliest days of the Macintosh, you could only run one application at a time. [131046920040] |It was perfectly reasonable for an application to open with no windows because the application always had a visible menu bar at the top of the screen. [131046920050] |When you closed all the windows of an application, it made sense to keep the application open because you could always use the menu bar to create a new document, or open an existing one. [131046920060] |Exiting the process just because a window was closed didn't make any sense at the time, because there would have been no other process to yield focus to. [131046920070] |A few years on, the Macintosh of the late 80's advanced to the point where there was enough memory to have multiple applications open at once. [131046920080] |Since the tools for doing this had to retain backwards compatibility with existing applications, they naturally weren't going to change the basic UI conventions and go killing applications without any windows open. [131046920090] |The result was a clean distinction in the UI between a visual GUI element (a window), and an abstract running process (the application). [131046920100] |Meanwhile, Microsoft had been developing Windows. [131046920110] |By the early 90's, Microsoft had Windows 3.X working well, and Motif on X11 had been heavily inspired by Microsoft's work. [131046920120] |While the Macintosh was built around presenting a UI of Applications, Windows (as the name would suggest) was built around the philosophy that the Window itself should be the fundamental unit of the UI, with the only concept of an application being in the form of MDI style container windows. [131046920130] |X11 also considered an application largely unimportant from a UI standpoint. [131046920140] |A single process could even open up windows on multiple displays connected to several machines across a (very new-fangled) local area network. [131046920150] |The trouble with the Windows style approach was that you couldn't do some forms of user interaction, such as opening with just a menu bar, and the user had no real guarantee that a process had actually exited when the windows were gone. [131046920160] |A Macintosh user could easily switch to an application that was running without windows to quit it, or to use it, but Windows provided absolutely no way for the user to interact with such a process. [131046920170] |(Except to notice it in the task manager, and kill it.) [131046920180] |Also, a user couldn't choose to leave a process running so that they could get back to it without relaunching it, except to keep some visible UI from the process cluttering up the screen, and consuming (at the time, very limited) resources. [131046920190] |While the Macintosh had an "Applications" menu for switching, Windows popularised a "task bar," which displayed all top level windows without any regard for the process that had opened them. [131046920200] |For heavy multitaskers, the "task bar soup" proved unweildy. [131046920210] |For more basic users, the upredictability about what exactly qualified as a "top level window" was sometimes confusing as there was no learnable rule about exactly which windows would actually show up on the bar. [131046920220] |By the late 90's, Microsoft's GUI was the most commonly used. [131046920230] |Most users has a Windows PC rather than a Macintosh or a UNIX X11 workstation. [131046920240] |Consequently, as Linux grew in popularity over time, many developers were coming from a background of using Windows UI conventions rather than UNIX UI conventions. [131046920250] |That combined with the history of early work on things like Motif drawing from Windows UI conventions, to result in modern Linux desktop environments behaving much more like Windows than classic X11 things like twm or the Macintosh. [131046920260] |At this point, "classic" Mac OS had run its course with Mac OS 9, and the Macintosh became a Unix powered machine with very different guts in the form of Mac OS X. Thus, it inherited the NeXT UI concept of a Dock. [131046920270] |On the original NeXT machines, X11 was used, but with a fairly unique set of widgets and UI conventions. [131046920280] |Probably the most distinctive of them was the Dock, which was a sort of combination program launcher and task switcher. [131046920290] |(The "multicolumn" open file dialog box that is known in OS-X also came from NeXT, as well as some other visible things. [131046920300] |The most significant changes in the OS-X transition were all the invisible ones, though.) [131046920310] |The Dock worked well with the Macintosh's concept of "Application as the fundamental UI element." [131046920320] |So, a user could see that an application is open by a mark on the dock icon, and switch to it or launch it by clicking on it. [131046920330] |Since modern OS-X now supported multitasking so much better than the classic Mac OS had, it suddenly made sense that a user might want to have all sorts of things running in the background, such as some video conversion software that cranks away in the background, a screen recorder, VOIP software, Internet Radio, a web server, something that speaks in response to a spoken command, etc. [131046920340] |None of that stuff necessarily requires a visible window to be open to still have a sensible user experience, and the menu bar was still separate from the windows at the top of the screen, and you could have a menu directly on the dock icon, so a user could always interact with a program that had no open UI. consequently, ditching the existing convention of keeping an application open, just to be more like Windows, would have been seen by most Mac users as a horrible step in the wrong direction. [131046920350] |It makes several modes of interaction impossible, with no real benefit. [131046920360] |Obviously, some users prefer the Windows convention, and neither is "provably correct." [131046920370] |But, migrating away from something useful like that, without any good reason would just make no sense. [131046920380] |Hopefully, this tour through some of the history gives you a bit of context that you find useful. [131046930010] |How to create strong passwords in Linux? [131046930020] |I wonder how I can create strong passwords on Linux (for both normal and admin users) and if there are specific programs to do that. [131046940010] |pwgen is one of many programs for generating passwords [131046950010] |Personally I prefer not to use password generator as password generated are very hard to remember :-). [131046950020] |But one portable solution could be to use /dev/random [131046950030] |Creating random passwords which contains no special characters, is 10 characters long [131046950040] |cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 10| head -n 1 [131046950050] |Creating random passwords which contains special characters, is 10 characters long [131046950060] |cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='|fold -w 10 | head -n 1| grep -i '[!@#$%^&*()_+{}|:<>?=]' [131046950070] |you can increase length by changing number after -w switch in fold command. [131046950080] |I hope this will help. [131046960010] |I wrote this little script a few years ago and have been using it ever since. [131046960020] |If anything, it's an interesting abuse of printf and uses a lovely feature of BASH that I unfortunately rarely see in scripts: typeset. [131046970010] |I use a non random, but is varied enough for all attack purposes... master password, and last pass to generate other passwords. [131046970020] |Here's how I generate the master password. [131046970030] |and the output [131046970040] |now just pick a few of the sections and make a password, rearrange them, leave some out, add a character or 2 to make it as good as random. [131046970050] |As long as you can remember your seed you can regenerate this, and recover your password (so long as you don't make too many modifications) [131046980010] |I'd also add KeePassX which gives you the option of using system entropy to generate strong passwords with a few nice features - all using GUI. [131046980020] |It also gives you the option of managing your passwords, and saving them to an encrypted file. [131046980030] |This is how KPX password generator interface looks like: [131046990010] |pwgen is a wonderful little cli tool that let's you specify a number of parameters to set complexity, character classes number of passwords to generate, length, etc. [131047000010] |Correctly setting enviroment [131047000020] |I'm using zsh and gdm to run gnome. [131047000030] |Some time ago I discovered that variables are not set correctly. [131047000040] |For example LANG/LC_ALL are incorrect ("" instead of en_GB.UTF-8). [131047000050] |I split the .zshrc into .zshrc and .profile. [131047000060] |In the latter I set the environment variables, but how can I set the variables before the session starts? [131047000070] |I tried a few choices (.xinitrc, .xsessionrc) but none seemed to work. [131047000080] |Edit To clarify - I used .profile and manually sourced it in .zshrc. [131047000090] |It does not change question anyway. [131047010010] |In Gentoo documentation there is article Gentoo Linux Localization Guide. [131047010020] |Chapter 3 is about setting locale. [131047010030] |Most typically users only set the LANG variable on the global basis. [131047010040] |This example is for a unicode German locale: [131047010050] |Code Listing 3.1: Setting the default system locale in /etc/env.d/02locale [131047010060] |In my Gentoo LANG is set in this file and everything is working properly... [131047020010] |The simple way is to invent a time machine, visit the various people who devised shell startup files and tell them to cleanly distinguish between three things: [131047020020] |
  • session setup, e.g. environment variables;
  • [131047020030] |
  • session launching, i.e., e.g. starting a command-line shell or a window manager or running startx;
  • [131047020040] |
  • shell initialization, e.g. aliases, prompt, key bindings.
  • [131047020050] |It's not too hard to get session vs. shell right in a portable way: login-time initialization goes into .profile (or .zprofile, or .login), shell initialization goes in .bashrc or .zshrc. [131047020060] |I've previously written about .bash_profile, zsh vs. other shells, more about portability (mostly about bash), more about who reads .profile. [131047020070] |A remaining problem is distinguishing between session setup and session launching. [131047020080] |In most cases, ~/.profile is executed when you log in and can double as both, but there are exceptions: [131047020090] |
  • If your login shell is (t)csh or zsh, ~/.login and ~/.zprofile is sourced instead of ~/.profile. [131047020100] |Ditto for bash and ~/.bash_profile, but this is easily solved by sourcing ~/.profile from ~/.bash_profile.
  • [131047020110] |
  • If you log in under a display manager (xdm, gdm, kdm, …), whether your ~/.profile is read depends on the version of the program, on your distribution (Linux or otherwise), and on what session type you choose. [131047020120] |
  • If you count on the display manager to start a session for you, your .profile must set environment variables but not start a session (e.g. a window manager).
  • [131047020130] |
  • The traditional configuration file for X sessions is ~/.xsession, doing both session setup and session launching. [131047020140] |So the file can be essentially . ~/.xsession; . ~/.xinitrc. [131047020150] |Some distributions source ~/.profile before ~/.xsession. [131047020160] |Modern distributions only source ~/.xsession when you select a “custom” session from the display manager, and such a session is not always available.
  • [131047020170] |
  • Your session manager may have its own way of setting environment variables. [131047020180] |(That's an optional part of your desktop environment, chosen by you through a configuration file or by selecting a session type when logging in; don't confuse it with the session startup scripts provided by the display manager, which are executed under your user but chosen on a system-wide basis. [131047020190] |Yes, it's a mess.)
  • [131047020200] |In summary, ~/.profile is the right place for environment variables. [131047020210] |If it's not read, try sourcing it from ~/.xsession (and start your X programs from there), or look for a system-specific method (which may depend on your distribution, display manager if any, session type if display manager, and desktop environment or session manager). [131047030010] |joystick as a mouse with Fedora [131047030020] |Hi, [131047030030] |I would like to use a joystick as a mouse with Fedora 12. I tried js2mouse but didn't work. [131047030040] |Any other solution? how to configure the system? [131047030050] |Thx. [131047030060] |Luke [131047040010] |I've never tried, but these instructions for Ubuntu look plausible, and mostly distribution-independent. [131047040020] |Add a section for the joystick in /etc/X11/xorg.conf. [131047040030] |(If you don't have one, generate it with Xorg -configure.) [131047040040] |The critical line is the SendCoreEvents option, which makes the joystick events move the mouse pointer. [131047040050] |If your distribution splits up X11 drivers into separate packages, make sure you have the joystick input driver. [131047040060] |Add a line with InputDevice "Joystick" to the ServerLayout section. [131047040070] |For more control, grab the utilities in the joystick package. [131047050010] |try QJoyPad... it worked realy well with my joypad (it also supports joysticks) it can autodetect your joystick, number of axes, button number, also - supports joysticks with multiple axes... [131047050020] |for the extended list of features look here [131047050030] |I use it on Arch, but I imagine there probably is a Fedora package for it... =) [131047050040] |after you install it, you should just configure the axes to act as a mouse.. you will also be able to set it's sensitivity, treshold etc... [131047060010] |Is it possible to find out which files are setting/adding to environment variables, and their order of precedence? [131047060020] |Some of my environment variables ($PATH, $MANPATH and friends) are partially set up in different source files. [131047060030] |I find myself wishing for a command or method to quickly gather what part, in a specific environment variable, came from what file. [131047060040] |My $PATH, for instance, has obviously been set (added to) in .bashrc, /etc/paths, /etc/paths.d/X11 … and I'm still looking for that last mysterious file which superfluously created a duplicate path definition in my $PATH. [131047060050] |It takes a good while to manually pinpoint the files that contribute to environment variables. [131047060060] |There must be a useful way to bypass this unnecessary labor of tracing all the setters … or am I the only one thinking along these lines? [131047070010] |It is very unlikely that a mechanism for this exists. [131047070020] |Just think about how many ways there are to change the value of an env variable in the shell. [131047070030] |You may have some luck with set -x though. [131047080010] |Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value. [131047080020] |Remove any change to PATH in .bashrc, environment settings don't below there: see Difference between .bashrc and .bash_profile. [131047080030] |First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode. [131047080040] |Put set -x at the beginning of /etc/profile and ~/.profile. [131047080050] |The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace. [131047080060] |There is no notion of precedence to environment variable assignments: whoever assigns last wins. [131047090010] |How to get Nautilus to "Open with Archive Mounter"? [131047090020] |I see Ubuntu screenshots showing that one can right-click an ISO, and have an option to "Open with Archive Mount". [131047090030] |How do I get that running elsewhere where it isn't default (Debian in my case)? [131047090040] |This is so as to avoid having to use the command-line to loop-mount it. [131047090050] |Note that I use GNOME 2.30. [131047100010] |I found this feature request which suggests that it is part of the nautilus package: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529297 [131047100020] |I found the file "mount-archive.desktop" at: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/nautilus/natty/annotate/head:/debian/mount-archive.desktop [131047100030] |On my Ubuntu PC it is at /usr/share/applications/mount-archive.desktop [131047110010] |What Linux distro would you recommend for a big all-purpose LiveUSB? [131047110020] |I am about to buy a 2TB hard drive to have all my scrap in one place. [131047110030] |I will split it to some partitions one to store my data, and others to store OS distros and bootable OSes like WinPE and Linux. [131047110040] |I'd like the Linux system to be a fully-equipped all-purpose graphical environment (preferably with XFCE, but this doesn't really matter) with all hardware (including 3D graphics) automatic support on virtually any machine and automatic RW mounting of all available partitions (incl. those on this HDD and on a host machine (incl. NTFS, LVM, and FreeBSD partitions)). [131047110050] |I'd like as fresh software versions as possible. [131047110060] |Should I use Mandriva Move, Knoppix, or something else? [131047120010] |I happen to like Mint as a base for a LiveUSB along with changes that I applied to the iso using Remastersys. [131047120020] |This allows me to add additional packages along with patching the system to have all the latest fixes. [131047120030] |I tend to remaster the iso every couple of weeks so I have a very up to date version that I keep with me. [131047120040] |This is very useful so I can visit other people and boot off my image without needing to trust that their computer is free of viruses and spyware. [131047120050] |http://www.geekconnection.org/remastersys/ubuntu.html [131047130010] |There's a new version of Unity Linux that can be used to create a live USB from a HD install. [131047130020] |Just tune the HD install the way you want it and then install to live USB. [131047130030] |The 2010.2 release provides many updates to core packages, much more stability, refinements to the core tools of the project like mklivecd and unity-installer. [131047130040] |Since our 2010.1 Final Release the changes include: [131047130050] |kernel 2.6.35.7, repository restructuring and snapshot of the 2010 repository. * Addition of more than 2000 packages to bring the total to over 10,600 packages per architecture. * XFCE 4.6.2, KDE 4.5.1 (but 4.5.3 can be found in the Synergy repository), Gnome 2.32.0, Openbox 3.4.11.2, E17 0.16.999.52995 and EFL beta libraries as well as several proprietary video drivers for Nvidia and ATI. [131047130060] |Our work for the past 5 months has been concentrated on making branding easier, adding functionality to the unity-installer to allow installation of a livecd with a command line interface, the release of mklivecd 0.8.0. [131047130070] |Also be sure to note several new howtos over in the wiki (http://docs.unity-linux.org/Category:HowTos) [131047130080] |As mentioned above, the main branching tool, mklivecd, got a lot of attention: [131047130090] |out of it * Build an ISO from scratch using selected rpms * Create a live USB starting from any ISO or LiveCD [131047130100] |Another very notable mention is the possibility to use unity-installer via the command line interface without Xorg running. [131047130110] |This refinement allows the livecd to be installed with as little as 64MB of RAM. [131047140010] |How to create .ko files in Linux [131047140020] |I have written one driver for one device in Linux. [131047140030] |How can I create (using gcc) a .ko file so that I can insert it into the kernel? [131047150010] |Create a Makefile like this. [131047150020] |Assuming your module's source is in mymodule.c, running make will create mymodule.ko. [131047160010] |Short answer: you can't. A .ko file is more than just a compiled version of your driver source. [131047160020] |The kernel build system includes some extra information for instance (compiler version, module dependencies, ...). [131047160030] |You can probably dig through the kernel build system to find all required operations, but you shouldn't. [131047160040] |It will almost certainly break with the next kernel release, or the one after that. [131047160050] |You should use the makefile ephemient supplied. [131047170010] |Any tips for surviving Terminal.app? [131047170020] |I've recently switched to using a Mac full-time, and am having trouble getting used to Terminal.app after years of loving gnome-terminal. [131047170030] |I miss having URLs show up underlined, using alt+arrow to move between words, and having screen+ssh behave the way I'm used to it. [131047170040] |I'm trying to get used to the following key combinations to survive in Terminal.app: [131047170050] |
  • AltB to go back a word
  • [131047170060] |
  • AltF to go forward a word
  • [131047170070] |
  • AltA to go to the beginning of a line
  • [131047170080] |
  • AltE to go to the end of a line
  • [131047170090] |
  • you can still right-click on a URL to open it, it just doesn't look pretty like in gnome-terminal
  • [131047170100] |Does anyone have any other good tips or alternative terminal suggestions to retain command line efficiency on a Mac? [131047180010] |Use iTerm. [131047180020] |Its great. [131047190010] |You can install gnome terminal on mac os X using fink, or other unix package tool available on the mac. [131047190020] |You will have to have X11 running though which may not be ideal, depending on your needs. [131047190030] |Also, I'd suggest learning actual shell specific commands for moving around in a terminal, as those will generally be the same regardless of the terminal emulator you are using. [131047190040] |That is, as long as you have a bash shell, Ctrl-a will get you to the beginning of a line in any terminal (gnome termainal, kterm, xterm, rxvt, etc.) assuming that they aren't doing something silly like stealing your control characters! [131047200010] |Wi-Fi constantly disconnects [131047200020] |Using either NetworkManager or Wicd to manage wireless networking on my Wi-Fi-powered laptop, too often I get randomly disconnected, and I see these messages on /var/log/syslog: [131047200030] |I think 05:40:38 is the first line that indicates trouble [131047200040] |With NetworkManager, I recover from this situation with the following command each time this happens: [131047200050] |Output of uname -a: [131047200060] |notes: [131047200070] |
  • Wi-Fi chipset is Intel's 4965.
  • [131047200080] |
  • I reproduced this problem on 2.6.32, 2.6.36 and 2.6.37-rc4 kernel versions.
  • [131047210010] |This is a known bug with the iwlagn driver. [131047210020] |Updating the driver and/or firmware may fix your issue: [131047210030] |https://bugs.launchpad.net/linux/+bug/200509 [131047220010] |Bash script and Database [131047220020] |I have an iptables firewall in Linux bridge (RHEL5). [131047220030] |I want to extract information like IP address, port number, port type, date and time, etc. from log messages using a Bash script, and then want to upload it to a MySQL database to generate the reports. [131047220040] |How can I do this? [131047220050] |Is there any way to accomplish the same thing? [131047230010] |If you're using syslog-ng, there is a great guide here. [131047230020] |He sets up a queue: syslog-ng writes to it, and he has a consumer that reads from it and performs an SQL insert. [131047230030] |If you are using rsyslogd, it has native support for mysql, but I'd still recommend the message-passing method of the first article; especially if you have high traffic spikes since the database insert takes a substantial amount of time (comparatively). [131047240010] |Problem with NIS. [131047240020] |I have one server and one client machine. [131047240030] |In Server, I have configured NIS, and /home/guest/nis1 is shared through NFS. [131047240040] |Both NFS and NIS are configured in same server. [131047240050] |In client, I have configured autofs to export home directory of NIS user. [131047240060] |When I try to login in client from nis1 username then I got the following error message. [131047240070] |Could not chdir to home directory /home/guest/nis1: Permission denied -bash: /home/guest/nis1/.bash_profile: Permission denied -bash-3.1$ [131047240080] |How Can i troubleshot??