我的用户级别: noob-ish,所以请容忍我。
我在跑12.04 LTS。我已经安装并在某种程度上配置了xmonad 0.10
为其创建的“自动”xsession工作正常,但当我登录时,它将不会运行我创建的启动脚本和“从”/usr/share/xsessions/xmonad.desktop调用,如果是这样的话。我已经阅读了几乎所有关于.xinitrc和.xsession的资料,我试过这样做,如果我解释得对的话,其他的“会话”就会搞砸了。必须通过$unity --reset才能让“主会话”再次工作。
无论如何,我的问题是,如何在登录到xmonad的默认Xsession后自动启动xmobar并设置桌面背景?
我试过这个脚本,开始-xmonad:
#!/bin/bash
#
#I only used one of the following each time I tried, none worked
#Also, do I really need the '&'? I know what they're for, but...
nitrogen --restore &
feh --bg-scale ~/Pictures/picture.png &
#Then I want xmobar to start, again do I need the '&'? I know it's for it to run
#in the background, but I tried removing the '&' and xmonad still launched
xmobar &
#Finally, the only thing that seems to work in this script
exec xmonad是的,我确定我做了chomd +x ~/start-xmonad
xmonad.desktop是
[Desktop Entry]
Name=XMonad
Encoding=UTF-8
Comment=Lightweight tiling window manager
Exec=/home/myusername/start-xmonad
Icon=custom_xmonad_badge.png
Type=XSession所以,这不管用,现在我来了。请帮助:s谢谢
发布于 2013-10-23 03:40:57
我是debian用户,但对您来说应该是相同的解决方案:
我就这样解决了:
(注意.sh结尾)
[Desktop Entry]
Name=XMonad
Encoding=UTF-8
Comment=Lightweight tiling window manager
Exec=/home/myusername/start-xmonad.sh
Icon=custom_xmonad_badge.png
Type=XSession然后,我在主文件夹中创建了start-xmonad.sh文件。此文件中的命令应可在终端中运行。
#!/bin/bash
yourStartUpApplication &
xmobar &
xmonad确保start-xmonad.sh具有正确的权限,使用
chmod 755 /home/myusername/start-xmonad.sh注意:&符号用于在后面运行另一个命令。
希望这会有所帮助!
https://askubuntu.com/questions/295935
复制相似问题