Tag Info

Hot answers tagged

16

Suppose that the new path that we want to add is: new=/opt/bin Then, using any POSIX shell, we can test to see if new is already in the path and add it if it isn't: case ":${PATH:=$new}:" in *:$new:*) ;; *) PATH="$new:$PATH" ;; esac Note the use of colons. Without the colons, we might think that, say, new=/bin was already in the path because ...


6

Create a file in /etc/profile.d called, e.g., mypath.sh (or whatever you want). If you are using lightdm, make sure that's viable or else use /etc/bashrc or a file sourced from same. Add to that the following functions: checkPath () { case ":$PATH:" in *":$1:"*) return 1 ;; esac return 0; } # ...


4

It depends on your configuration: you can have X-window Server started by itself and then the Display Manager process or Display Manager could start the X-window server. I have X server started by kdm in OpenSuse 12.1: kdm(4655)─┬─Xorg(4671) └─kdm(4698)───startkde(4800)─┬─gpg-agent(4877) ├─kwrapper4(4977) ...


3

UPDATE: I noticed your own answer had a separate function each for appending or prepending to the $PATH. I liked the idea. So I added a little argument handling. I also properly _namespaced it: _path_assign() { oFS=$IFS ; IFS=: ; add=$* ; unset P A ; A= set -- ${PATH:=$1} ; for p in $add ; do { [ -z "${p%-[AP]}" ] && { unset P A ...


3

The important part of the code is to check whether PATH contains a specific path: printf '%s' ":${PATH}:" | grep -Fq ":${my_path}:" That is, ensure that each path in PATH is delimited on both sides by the PATH separator (:), then check (-q) whether the literal string (-F) consisting of a PATH separator, your path, and another PATH separator exists in ...


3

For your first question, it typically depends on your session, i.e. the file in your example is not necessarily sufficient as it doesn't start your WM/DE. Normally ~/.xsession or ~/.xinitrc start the whole environment and are not only used to automatically launch some programs, i.e. they should contain a line like exec x-window-manager but the global ...


3

This just seems to be a bug in the service script. The behaviour is different for --status-all than for a single process. For a single process, service just uses exec to hand over to the init script itself (in this case /etc/init.d/lightdm). Here is the relevant snippet: if [ -x "${SERVICEDIR}/${SERVICE}" ]; then exec env -i LANG="$LANG" PATH="$PATH" ...


3

I was able to solve problem by using the following commands: (sleep 0.5 && systemctl suspend) & It would be interesting to know, why exactly the sleep command is needed to get the desired behaviour.


3

I Googled/emailed around a bit and got these two commands. To lock the screen: xflock4 To activate user switching: gdmflexiserver For Lightdm, this file resides in a strange spot (at least on Arch Linux): /usr/lib/lightdm/lightdm/gdmflexiserver I merged these two into XFCE's logout button dialog, in case anyone's interested, so the patch is ...


2

[The ArchWiki looks dead currently, so I don't know what is contained in the instructions you linked to.] To change the looks of LightDM, you need to install a theme and configure it. This page suggests that the relevant Arch packages might be lightdm-unity-greeter or lightdm-webkit-greeter.


2

If you want it to run after you login (which is how I read the title of your question), search for Startup Application in Unity and add your service there. If you are using the older desktop of Ubuntu Classic you should have something like that in the menu System Tools → Preferences → Startup Applications


2

Instead of having the notifications occur in pam_exec, you could have pam_exec write to a file (like you are, with /tmp/pam_output), and have a separate daemon executed by lightdm before the user logs in, which monitors /tmp/pam_output and pops up a note when it sees new output. The background process run by lightdm would have the X environment and X11 ...


2

Press Ctrl+Alt+F1 to switch to a different virtual console. You will have a text mode login prompt. Once you've done your repairs, you can switch back to the virtual console with the X window display by pressing Ctrl+Alt+F7. If you want to have several terminals, you get 6 virtual consoles with a login prompt by default: press Ctrl+Alt+F2, etc.


2

Linux Mint 16 uses the Mint-X theme by default which only displays the password box for chosen non-root users. In order to enable the User entry field (from which you will be able to specify root) do this. From Menu ==> Administration ==> Login Window ==> Theme choose Clouds and logout.


2

The display manager passes control to your desktop session by running a program. All you have to do to return control is have your desktop session terminate by calling exit. For example, on my Fedora system, the display manager runs /etc/X11/xinit/Xsession, which starts the desktop session manager. For shutdown? Terminate all the processes you started ...


2

You can do it this way: echo $PATH | grep /my/bin >/dev/null || PATH=$PATH:/my/bin Note: if you build PATH from other variables, do check that they're not empty, for many shells interpret "" like "." .


2

In Debian xterm is automatically started if no window manager is selected. Even if you have no slightest idea about who started xterm easiest way to find this out: as root rename /usr/bin/xterm to /usr/bin/xterm_. Create /usr/bin/xterm script: #!/bin/bash ( echo $$; ps -f --forest ) >/tmp/xterm.txt Than take a look into output.


1

LightDM is an x display manager that aims to be lightweight, fast, extensible and multi-desktop. It uses various front-ends to draw login interfaces, so-called Greeters. Key features are: A well-defined greeter API allowing multiple GUIs Support for all display manager use cases, with plugins where appropriate Low code complexity Fast performance ...


1

The problem was that I forgot the file /etc/X11/xorg.conf.d/20-keyboard.conf . I created it with the content: Section "InputClass" Identifier "keyboard" MatchIsKeyboard "yes" Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys" EndSection and now LightDM works.


1

I have been carrying this little function around with me in various ~/.profile files for years. I think it was written by the sysadmin in a lab I used to work in but I'm not sure. Anyway, it is similar to Goldilock's approach but slightly different: pathmunge () { if ! echo $PATH | /bin/grep -Eq "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ...


1

IDK if there is a way to do it with a GUI, but you could place a icon.face file in your user directory. That may cause issues, however. An alternative is to use the AccountsService. Edit/create the file /var/lib/AccountsService/users/<username>, and add the following lines: [User] Icon=/somewhere/pathToIcon.icon Make sure the lightdm user has read ...


1

Check to make sure your applications are using alsa output as opposed to pulseaudio or esd (Or start those daemons yourself). Also make sure your mixer is unmuted with alsamixer.


1

Update: (after comments) Try to modify in /etc/lightdm/lightdm.conf: greeter-hide-users=true in greeter-hide-users=false It's seems it's needed in all lightdm .conf files. It's possible you need to use lightdm-set-defaults [OPTION...] to fix it. The full options available are in the file: /usr/share/doc/lightdm/lightdm.conf.gz (if installed). ...


1

Boot into recovery mode, when the recovery menu is up, use the "Root Shell" option to gain a shell, then remove the command in the lightdm.conf.


1

You can always reconfigure lightdm and check settings or loads defaults, like this: sudo dpkg-reconfigure lightdm EDIT If you don't have trouble to start lightdm manually, maybe there is a problem with your PATH on boot. Check content of file /etc/X11/default-display-manager. If only entry is lightdm, change this to /usr/sbin/lightdm. sudo echo ...



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