Tag Info

New answers tagged

0

I couldn't get vlock to work un osx, so I created a simple shellscript alternative. https://github.com/acornejo/bashlock


0

Put scriptname.desktop containing this: [Desktop Entry] Name="devilspie" GenericName="devilspie" Comment="is this necesery?" Exec=/usr/bin/devilspie Terminal=false Type=Application X-Gnome-Autostart=true here: /home/user/.config/autostart


2

It sounds like what you are describing is actually program A running in the background. A process can still print to the terminal even if it is running in the background. A bash example: #----background_program----# #!/bin/bash for ((i=0;i<=10;i++)); do echo "$i" sleep 5 done exit 0 You can run this in the background, see its output popping ...


5

This is called typeahead, and it's not shell specific. What you type ends up being buffered in the terminal, and the next time a program running in the terminal is ready for input it reads what is waiting in the buffer. In your example that program is the shell, so it executes the command you typed as if you'd waited for A to finish before typing it. Some ...


1

This usually happens if another automated process has locked the apt database at the time you are running your command interactively. Most likely candidates for this (by Ubuntu package name): unattended-upgrades cron-apt but other candidates exist. These are scheduled using cron in most cases. Check out /etc/crontab, files in ...


2

Terminal resize generates a SIGWINCH signal that is sent to the foreground applications. Said applications are supposed to catch that signal (provided they care about terminal size to begin with), and adjust accordingly. What seems to be going on when you resize the terminal while nano is running from ipython is that ipython receives the SIGWINCH, but ...


1

If you do: stty eol = And then run the demo suggested in your EDIT, you will see foo bar in the printout of test.out. The terminal's line discipline will flush its output to its reader as it reads each special eol char in your input. A Linux canonical-mode terminal - as can be configured with stty icanon or probably just stty sane - handles the ...


0

In order to simplify the problem and since your are getting the variable sitename, why don't you read a username variable? With that you'd make sure that the script execution is not dependent on the environmental variables made available the way the script is executed.


0

If, for some reason, $USER is not set, you can use the id command to obtain the identity of the real user. So the first time you use the $USER variable, you can use the shell expansion to supply a default value. Change the chown line in your script to: sudo chown ${USER:=$(/usr/bin/id -run)}:$USER /var/www/$sitename If USER is empty or unset when this ...


4

The built-in delay is to slow down the process of password guessing. Looks like someone could programmatically guess about 27 potential passwords per minute, which, as you've observed is a good deal less than if there was no delay.


3

Have a look at the Drawille library. It uses the UTF braille characters to draw pixels.


4

Probably a limit of the terminal device line discipline internal line editor buffer. You should be able to enter long lines by pressing Ctrl+D in the middle of it (so the currently entered part be sent to cat and the line editor flushed), or by disabling that line editor altogether. For instance, if using zsh: STTY=-icanon cat > file Note that then ...


3

webster is not a common command among Unix systems. It is not a part of Debian's apt repository and it is also not part of the two major packaging tools Homebrew and MacPorts. Probably it is only available on Stanford computers. However additional commands can be installed with ease using one of the two. I would suggest using Homebrew since many packages ...


5

Perhaps the closest thing to what you are looking for is MacPorts (or some other package management system like Homebrew). It can be used to install software(including many Unix software) easily.


2

The argument to a LS_COLORS directive is a string that is written to the terminal as part of an escape sequence. When displaying a file name, ls writes \e[, then the string associated with the file type, then m, then the file name, then \e[0m (where \e represents an escape character). This is the escape sequence that tells xterm and compatible terminals ...


1

Open Disk Utility by entering "Disk Utility" in spotlight and waiting for Disk Utility to appear, or by opening it through any other means. In Disk Utility, select the OS partition on your internal drive1 and click the Repair Disk Permissions button. Footnotes: Typically called "Macintosh HD" and "Internal Drive", respectively.


0

From man less: -# or --shift Specifies the default number of positions to scroll horizontally in the RIGHTARROW and LEFTARROW commands. If the number specified is zero, it sets the default number of positions to one half of the screen width. Alternately, the number may be specified as a fraction of the width of the screen, starting with a decimal ...


0

Depending on how early in the boot you want this to run, you may want to use cron @reboot. (You may need to play with environmental variables.) Then wrap it in a detached terminal. tmux new -d '/path/to/python /full/path/program/proxy.py' # or # screen -d -m '/path/to/python /full/path/program/proxy.py' Effectively these are backgrounded to synthetic ...


6

Outgoing ICMP (ping) is probably blocked by your firewall or gateway. That you are able to browse the Internet does not need ICMP (ping) to be working. You also might have a proxy configured which allows you to only surf the web.


0

While Ubuntu's default AltF2 is pretty useful, I've noticed in the comments that it does not work for you. An alternative run dialog that you can use is bbrun. This run dialog is originally for black box desktop environment, but can still be used elsewhere. Install it using sudo apt-get install bbrun. Once you do, run it in terminal with nohup bbrun & ...


2

Try pressing Alt+F2. I'm not totally sure about this though, as when I search Alt+F2 in LXDE on Google there seem to be a fair number of results about a bug. Not sure if those still apply. However, this is the shortcut that worked for me last time I used LXDE.


1

You could try to download the deb package and open it up using the file explorer. Then it is possible it will install. You can download the .deb on the official Debian site at https://www.debian.org/distrib/packages then use dpkg -i package.deb


0

I can think of several ways, besides changing the colors, to make the cursor easier to find. One could toggle the cursorcolumn or the cursorline on and off or set them permanently on. With my favorite colorschemes, this can either be not enough of a hint or it can be too ugly to bear. Another solution is to toggle search highlighting – off with :se nohls ...


1

The terminal emulator translates events like “the Tab key was pressed” into sequences of characters that the application running in the terminal (bash, in your case) reads. See How do keyboard input and text output work? for a more detailed presentation of this topic. For historical reasons, a few of keys send a character that's the same as pressing Ctrl ...


0

Keyboards speak key transitions and keycodes, programs reading them directly can see every keydown and keyup. The terminals being emulated speak ASCII, and they universally produce TAB aka HT via ^I. There's really nothing any terminal emulator can do to work around that. So windowing-system-based programs can generally distinguish between TAB and ^I -- ...


0

Doing AT command communication from the command line with just plain shell operations is rather unreliable. I suggest that you try to use the program atinout which is specifically written to issue AT command from the command line: $ echo AT | atinout - /dev/ttyUSB0 - AT OK $


2

You should probably start at http://invisible-island.net/xterm/ctlseqs/ctlseqs.html and http://www.vt100.net/ which describe the desired behavior (at least the input/output sequences), as well as of course studying some of the terminal emulators out there, including their changelogs of the issues they addressed. I don't think there's a complete checklist ...


2

I haven't been able to find a full, detailed description of what the mapping between keypresses and control characters needs to be. What makes you think that it needs to be anything? Hint: Why do you think that every terminal emulator program has, either directly or indirectly (via X or some such), some sort of keyboard map file? Go and look at ...


1

Looks like compositor in Cinnamon is not working properly, it is probably an issue with your drivers. Unfortunately, it seems that you can't disable compositing in cinnamon manually: Github issue. My suggestion is to install some non-compositing wm like openbox and try if this issue will reproduce. Besides, try different drivers. Now you use drivers: ...


0

This isn't an entirely ideal solution but if you install VimRoom then you can set your mutt pager to vim and have it activate Vimroom. Set this in your ~/.muttrc: set pager="view -c 'set nomod nolist' -c 'runtime! macros/less.vim' -c ':VimroomToggle' -c ':map q :VimroomToggle<CR>:q<CR>'" set prompt_after=no Here I source less.vim which ...


0

I spoke with my system administrator and he suggested that the terminal session somehow inherits the environment variable from the current login process/session(?) and recommended I completely log out and log back in again (which I desperately wanted to avoid doing as I have a lot of important terminal sessions in various workspaces I didn't want to waste ...


3

I don't think this has to do with fonts. The invisible windows look like a graphics stack problem. Try switching to a non-compositing window manager temporarily, and see if the problem goes away. Re corrupt files, I'm not sure how they'd get corrupted unless they were being written or replaced during the crash. I suppose font caches and such might be ...


1

How will you know that the server has started successfully, and is not about to die with an error message? If you want to show the screen session until explicitly killed, it's easy. Run a command that doesn't terminate after the ruby command, for example to run a shell: screen -S server sh -c 'ruby start.rb true 3001; echo "Server terminated with status ...


1

In XTerm, you can use the control sequences in your .bashrc or such. Like: if tty -s; then case $HOSTNAME in server1) echo -e '\e]11;darkgray\a\e]10;black\a' ;; server2) echo -e '\e]11;darkblue\a\e]10;gray\a' ;; esac fi Other terminal emulators have similar features. In Putty, you can configure the color directly, not sure if these control ...


1

Ah yes. When you start and stop screen it resets the screen display, clearing it in the process. The easiest way to ensure that you can see errors generated by your ruby command is to separate it from the screen command, so that one is no longer dependent on the other: screen -S server ruby start.rb true 3001 ... exit You will presumably already know that ...


14

Characters of code 0 to 31 in ASCII are control characters. When sent to a terminal, they're used to do special things. For instance, \a (BEL, 0x7) rings the terminal's bell. \b (BS, 0x8) moves the cursor backward. \n (LF, 0xa) moves the cursor one row down, \t (TAB 0x9) moves the cursor to the next tabulation... \r (CR, 0xd) moves the cursor to the first ...


5

\x0d is the character \r which brings the cursor to the start of the line, then \x20 is a space, so it overwrites the a with a space. If you're on a unix-y system you may want to consider just removing \r from your output/file since it's not needed if it's for text output. The \n "implies" it for *nix, but not for Windows.


1

All you need to do to do this is (as the error message says) unset the $TMUX variable: (unset TMUX; urxvt -e tmux) The subshell is necessary to avoid it being unset in your current environment, too. If you don't care about that, you don't need the subshell.


1

Wait, the terminal text is invisible AND you don't see text in dropdown-boxes from X-Windows widgets?? That sounds like a font problem to me. You do know you have a console, right? CTL-ALT-F1 should get you there. At least then you have a working, local terminal, one which you can read. (Usually, ALT-F7 gets you back to X, but I can't say for sure on your ...


2

Sometimes, a reinstall might not work because there may be dependencies that are corrupt, but not reinstalled because the OS thinks they're good. Try these: On your invisible terminal, try installing debsums. sudo apt-get install debsums. Then, a visible terminal would really help at this point. Init the freshly-installed package. sudo debsums_init Then, ...


0

If you are compiling C programs on any edition of Fedora, you'll have best luck if you install the entire C Development Tools and Libraries group, rather than guessing piecemeal which parts might be required. Oh, and just plain Development Tools as well. Different "flavors" of Fedora — from the desktop-focused Fedora Workstation to the, well, server-focused ...


2

You can use script. It will basically save everything printed on the terminal in that script session. From man script: script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). ...


0

Sometimes my system gets freezed You needs to figure out what's triggered the freeze, try tail /var/log/dmesg or journalctl -f get ERR logs how to fix this? You can try restart Xserver, instead of power cycle your machine. Using keyboard combination ctrl+art+backspace or using GUI implements or killall X (you ought to start Xserver at ...


0

You don't need to mess with init scripts. In Debian, you can just add a line in /etc/init.d/rc.local that calls the program; it will then be run after all the init scripts. If you call the program in /etc/init.d/boot.local instead, it will run only at boot, not when switching runlevels.


0

This is bug/feature request number 303: http://www.greenwoodsoftware.com/less/bugs.html When -F is used, don't output terminal initialization and exit sequences when only one screen is displayed. Sorry, this is just an explanation, not a solution. I guess the maintainer would accept a patch which solves this.


1

Yes. This is easy. Install the system with the GUI libraries for X (drivers optional) and for the desktop environment you want. Then, run something like the TigerVNC server, and you're done.


2

There is currently no way to do this. See this accepted answer on stackoverflow which suggests changing pane-borders instead. You can set values for pane-active-border-style and pane-border-style in your ~/.tmux.conf. See this answer for more details configuring these values (and some inconsistencies between tmux versions).


1

You may try some values with xset r rate. This command will enable auto-repeat, but you can follow it by 2 numbers. The first one is the number of ms before auto-repeat starts, the second is the number of repeats by seconds. For example: xset r rate 300 20 The auto-repeat will start after 300 ms, then will repeat 20 times/second.


1

It seems that any interactive script launched from rc.local will have similar issues with stdin. I found a workaround on superuser: Just launch your script using openvt -s -w /path/to/script.sh (explanation at the original post)



Top 50 recent answers are included