Hot answers tagged

7

I'm going to guess the following all of those tools use XdgUtils if you type xdg-open http://google.com it'll open with Chromium and that you have the problem described in this Ubuntu forumspost So my suggested answer is: $ xdg-mime default firefox.desktop x-scheme-handler/http (and ditto for https)


7

Link Mint is an Ubuntu-based distribution intended for desktop systems. One of its chief priorities is "ease of use" so a firewall just puts into play something that could break things for users. It's easier if the firewall only gets turned on if the operator is someone who knows what such a thing even is versus a novice user saying "Why don't it no worky?"


6

If using xdg-open to open applications, then use xdg-mime to set the default application for a given mime type (typically, installing xdg-utils gives you the xdg-mime and related programs). For example, to see the "filetype" (mime-type, if you will) of given file: $ xdg-mime query filetype tmp.txt text/plain $ xdg-mime query filetype foo.pdf ...


5

The appres utility lists the resources used by an application, both user and default. appres XTerm xterm The first argument is the class name (xterm -class Xxx). The second argument, which is optional, is the instance name (xterm -name xxx). The “Large” font is .VT100.font5 or .VT100.utf8Fonts.font5. See the manual for whether .utf8Fonts is used, it's a ...


5

The key is File|Properties. Choose this menu item with a file of the target filetype selected, go to "Open With" tab and press "Reset." Then select an application and press "Set as Default." Kitchen tested on Nautilus 3.2.1.


5

With setfacl you can set default permissions but not default owner/group for newly created files. To get new files to be owned by a specific user, you'd need a setuid bit that works like the setgid bit on directories. Unfortunately that is not implemented. With setfacl you can do something which is nearly equivalent in most scenarios: You can set an ACL ...


5

As @Zelda mentioned the messages are hardcoded. If you want to change it beyond amending the message with additional bits: $ sudo shutdown -h +120 Save your work. You'll need to recompile shutdown, creating your own executable that includes the customized message. For example, here's a sample source file, shutdown.c. Lines such as these would need to be ...


5

The first versions of Unix happened to use 512-byte blocks in their filesystem and disk drivers. Unix started out as a pretty minimalist and low-level system, with an interface that closely followed the implementation, and leaked details that should have remained abstracted away such as the block size. This is why today, “block” still means 512 bytes in many ...


4

The default is unlimited - keep going until you run out of space.


4

Count means amounts of blocks to copy. From man page: count=N copy only N input blocks It means amount of times to copy each block of input file. Block size specified by bs parameter. If you wont to specify count parameter, dd will read-write until the end of input file. So, there is no default numberic value, only EOF.


4

You cannot change the default message, you can only add some specific message of your by providing this after the time: # shutdown 60 Down in an hour Broadcast message from zelda@mongrel2_test (/dev/pts/0) at 6:37 ... The system is going down for maintenance in 60 minutes! Down in an hour You do not have to quote the text after the number of ...


4

I don't have Chrome installed, only Chromium, but I hope they aren't too different for this to work. When I choose "Don't ask again", Chromiom stores the following setting in my ~/.config/chromium/Profile 1/Preferences file: { "alternate_error_pages": { "enabled": false }, "apps": { "shortcuts_have_been_created": true }, ...


4

When a new user and his home directory are created, the home directory is "inititalized" with the contents of /etc/skel. So if you setup a desktop like you want it to be for new users and then copy the relevant config-files to /etc/skel, that's what the desktop will look like for new users.


3

I'd help you out but I no longer run gentoo so here's a faster way to find out than installing a VM. Download the latest tarball to a directory and extract it. mount proc and dev like you would for an install. chroot in and install whatever server daemons you've installed, you probably need to start them too. now run. find /var ! -user root -ls this ...


3

To change the version of python that is executed when you type python on the command line, and only then, define an alias in your shell initialization file (the one for interactive shells). This is ~/.bashrc for bash, ~/.zshrc for zsh, ~/.cshrc for csh, ~/.config/fish/config.fish for fish. Use the correct path for Python 3.3 for your installation. alias ...


3

You can use lsof to list all files by given process id and grep for fonts. lsof -p <process_id_of_xterm> | grep fonts for example, lsof -p `ps -a | grep xterm | cut -d' ' -f1` | grep fonts sample output: $ lsof -p `ps -a | grep xterm | cut -d' ' -f1` | grep fonts xterm 17560 testuser mem REG 253,1 137272 9154732 ...


3

FreeBSD grep is GNU grep, with a few patches applied: # which grep /usr/bin/grep # /usr/bin/grep -V grep (GNU grep) 2.5.1-FreeBSD Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It ...


3

Traditionally, by login(1): ENVIRONMENT login sets the following environment variables: HOME The user's home directory, as specified by the password database. SHELL The user's shell, as specified by the password database. Though these days it might be a window manager or terminal program making those ...


3

Linux distributions typically don't have many services (any) running on the external interface and those that do usually require the external access. They systems don't gain significantly from having a firewall. However, I lock down each of my Linux hosts with a firewall, there are four main purposes. Log hosts scanning services that aren't running; ...


3

AFAIK there is no configuration file for cryptsetup. You can of course define an alias and put that somewhere where it gets read in at login: alias cryptsetup='cryptsetup --readonly'


3

Try going to /home/@user/.config/ and remove the whole deadbeef folder to reset. Save that file to backup configuration.


3

You could just print the second line. You can use many tools for this: sed defaults read -g AppleLanguages | sed -n '2s/,//p;' file Explanation: The 2 means "run the following commands only on the second line". The -n suppresses normal output (nothing is printed unless explicitly told to do so). The substitution (s///) deletes the comma and the /p at ...


3

Blocks were more important than bytes because from the beginning, files used a given number of blocks rather than bytes on the file system. A file with one byte still took up one block on the disk. For instance the find(1) manual page from Unix 6th edition says -size n True if the file is n blocks long (512 bytes per block). ...


2

The usual way is to create a script which calls the binary as part of the script. Then you can just set the variables in the script. In fact, it is not uncommon for executables corresponding to complex programs to be set up like that. E.g. chromium. So, if /usr/bin/thunderbird isn't already a script (check) you can create a script called /usr/bin/thunderbird ...


2

Actually only NM_CONTROLLED="no" (or is it "false" ?) does anything. Putting "yes" (or is it "true" ?) is the same as not having the line at all: for network devices supported by NetworkManager it will manage them; for those unknown to NetworkManager it will ignore them anyway.


2

First make .desktop application for lynx: [Desktop Entry] Type=Application Name=Lynx Exec=gnome-terminal -e 'lynx %u' And save it to application directory e.g /usr/share/applications/ naming like lynx.desktop and give it execution permission (chmod+ x). Then set it as default web browser by using: xdg-settings set default-web-browser lynx.desktop Now ...


2

You can do the following: awk -F, '/[^(]/{print $1;exit}' Explanation: -F,: treat , as field separator [^(]: for lines that contain at least one non-( character. print $1; exit: print first field and immediately exit the awk (so only first line which matches the pattern will be printed)


2

If you want to change the behaviour of all new workspaces, just add workspace_layout stacking (or tabbed or default) to your .i3/config file, see section 4.8 of the documentation. The default is either horizontal, vertical or automatic, and governed by the default_orientation option, see section 4.7. You can have finer-grained control using airblader's ...


2

You can add this entry manually: right click on the Places, choose Add Entry, enter this in Location field: recentdocuments:/// and save it. It should be available now in all KDE/Qt file dialogs.



Only top voted, non community-wiki answers of a minimum length are eligible