alias open='nohup xdg-open >/dev/null 2>&1'Now you can start, for example a textfile, like this "open textfile.txt". Because of nohop in the alias you can even close the console session and the text editor stays open.
privatelinux
Mostly linux tips i gathered and personally use.
Saturday, January 7, 2012
Start applications with the default app from console
Its as simple as. Add this to your ~/.bashrc
Wednesday, January 4, 2012
Eclipse shortcuts
Ctrl + d = delete line
Alt + up = current line up
Ctrl + Alt + Up = Copy current line
F3 = open declaration
Ctrl + shift + G = Find all references
Ctrl + 1 = Quick fix popup
Ctrl + i = fixes indent
Alt + shift + R = rename variable
Ctrl + shift + f = format code
"syso" & Ctrl + space = System.out.println("");
"main" & Ctrl + space = public static void main(String[] args){}
Thursday, November 17, 2011
Increase sudo timeout
There are two relevant values:
I find i quit annoying when the prompt times out or you have to type in the password to often.
This are my values:
passwd_timeout Number of minutes before the sudo password prompt times out, or 0 for no timeout. The timeout may include a fractional component if minute granularity is insufficient, for example 2.5. The default is 5.
timestamp_timeout Number of minutes that can elapse before sudo will ask for a passwd again. The timeout may include a fractional component if minute granularity is insufficient, for example 2.5. The default is 5. Set this to 0 to always prompt for a password. If set to a value less than 0 the user's timestamp will never expire. This can be used to allow users to create or delete their own timestamps via sudo -v and sudo -k respectively.
I find i quit annoying when the prompt times out or you have to type in the password to often.
This are my values:
Defaults timestamp_timeout=30Add them to your sudo conf with visudo.
Defaults passwd_timeout=0
Sunday, October 2, 2011
More speed (responsiveness) for the linux desktop
Ram and file system cache:
Preload most used applications/libs:
BFS Kernel
vm.swappiness=20
vm.vfs_cache_pressure=50
more infoPreload most used applications/libs:
preload
more info
Mounting /tmp to RAM
add this to your fstab:
tmpfs /tmp tmpfs defaults,noatime,nodev,nosuid,mode=1777 0 0
more info
BFS Kernel
There is a set of kernel patches that increases the responsiveness of the linux desktop. This is not limited to archlinux btw.
There are two main ways to get it on archlinux:
Build it from AUR: yaourt -S linux-ck
Or us a repository with precompiled packages:
[repo-ck] Server = http://repo-ck.com/$arch
more info
Tuesday, September 13, 2011
Sync bash history between sessions on the fly
If you work with more then one bash terminal at a time, it can be annoying that the bash history is only available in the other session after you closed the terminal (default bash behavior).
You can fix it by adding this to your .bashrc
*EDIT:
I found it confusing that the history is always synced, even in the current session. This can be confusing while working, so i changed the above a bit:
Removing "history -n;" has the effect, that the history is still up to date when you open a new terminal but existing terminals will not get the changes immediately. You have to execute "history -n" manually if you need the changes in the current terminal.
You can fix it by adding this to your .bashrc
shopt -s histappendMore about it here: http://briancarper.net/blog/248/
export PROMPT_COMMAND="history -n; history -a"
*EDIT:
I found it confusing that the history is always synced, even in the current session. This can be confusing while working, so i changed the above a bit:
HISTSIZE=10000Beside the obvious changes there are some more variables changes . "HISTCONTROL=ignoreboth:ignoredups:erasedups" to prevents bash to add dups. So your .bash_history keeps clean. Beside that i have added some more fun stuff. "cdspell" fixes typos while changing directories (yeah) and HISTSIZE increases the history size to 10000 lines.
HISTCONTROL=ignoreboth:ignoredups:erasedups
shopt -s cmdhist
shopt -s cdspell
shopt -s histappend
#PROMPT_COMMAND="history -n; history -a"
PROMPT_COMMAND="history -a"
Removing "history -n;" has the effect, that the history is still up to date when you open a new terminal but existing terminals will not get the changes immediately. You have to execute "history -n" manually if you need the changes in the current terminal.
Sunday, April 17, 2011
change chrome gtk colors
Chrom(ium) has the ability to use the colors from the gtk theme currently used by your desktop. Anyway, sometimes the colors chrome extracts from you gtk theme do not match with the rest of your desktop. To fix this problem you can modify how chrome uses this colors or define complete new colors.
How to do it is described here: http://code.google.com/p/chromium/wiki/LinuxGtkThemeIntegration
You can add that stuff to your ".gtkrc-2.0" file.
I uses this in KDE4 with qtcurve and it works fine.
How to do it is described here: http://code.google.com/p/chromium/wiki/LinuxGtkThemeIntegration
You can add that stuff to your ".gtkrc-2.0" file.
I uses this in KDE4 with qtcurve and it works fine.
Sunday, February 6, 2011
Resetting screen resolution with xrandr
If a game or an other application messed up you resolution you can easiely reset it by executing:
$ xrandr -s 0
Subscribe to:
Posts (Atom)